Make password asterix when user types

September 18, 2009 at 12:25:36
Specs: Windows XP
Hi everyone,

I've got a php form on my website and I want to know how to change the php code so that when the user types in the password, instead of letters showing in the box, i want only asterix's to be shown to protect the user from spying eyes. Here is the code from my form. I'd really appreacheate if someone could tell me how to do this....

<?php

$contact_form_fields = array(
array('name' => 'Advertising Type:',
'type' => 'department',
'require' => 1,
'default' => '-',
'items' => array('PPI',
'PPC')),
array('name' => 'Text or Banner Ad:',
'type' => 'department',
'require' => 1,
'default' => '-',
'items' => array('468x60 Banner',
'Text Ad')),
array('name' => 'Budget in $ (10$ minimum):',
'type' => 'name',
'require' => 1),
array('name' => 'Name:',
'type' => 'name',
'require' => 1),
array('name' => 'E-mail:',
'type' => 'email',
'require' => 1),
array('name' => 'Tel/fax:',
'type' => 'input',
'require' => 1),
array('name' => 'Your Websites URL:',
'type' => 'subject',
'require' => 1),
array('name' => 'Either Text Ad:',
'type' => 'textarea',
'require' => 0),
array('name' => 'Or Banner Ad:',
'type' => 'upload',
'require' => 0,
'maxsize' => 128*1024),
array('name' => 'Members Area Username:',
'type' => 'name',
'require' => 1),
array('name' => 'Members Area Password:',
'type' => 'password',
'require' => 1),
array('name' => 'Anti Spam:',
'type' => 'turing',
'require' => 1,
'url' => 'contact-form/image.php',
'prompt' => 'Enter the number displayed above'),
array('name' => '',
'type' => 'checkbox',
'require' => 1,
'prompt' => 'I confirm that I have read Terms and Conditions before submitting order'));


$contact_form_graph = false;
$contact_form_xhtml = false;

$contact_form_email = "test@test.com";
$contact_form_encoding = "utf-8";
$contact_form_message_prefix = "Sent from GetSeen Advertising Order form\r\n==============================\r\n\r\n";

include_once "contact-form/contact-form.php";

if ($valid == 1)
header("Location: http://www.test.com");

?>


See More: Make password asterix when user types

Report •


#1
September 27, 2009 at 08:03:14
Well for an input box you would use the (type="hidden") attribute

Hire A Geek


Report •
Related Solutions


Ask Question