Computing.Net > Forums > Web Development > Make password asterix when user types

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Make password asterix when user types

Reply to Message Icon

Name: internize
Date: September 18, 2009 at 12:25:36 Pacific
OS: Windows XP
Subcategory: PHP
Tags: asterix, php, form, hidden, password
Comment:

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");

?>



Sponsored Link
Ads by Google

Response Number 1
Name: hireageek
Date: September 27, 2009 at 08:03:14 Pacific
Reply:

Well for an input box you would use the (type="hidden") attribute

Hire A Geek


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Make password asterix when user types

Apache2 .htaccess/.htpasswd files www.computing.net/answers/webdevel/apache2-htaccesshtpasswd-files/976.html

Guestbook spam, security image? www.computing.net/answers/webdevel/guestbook-spam-security-image/2868.html

Password protecting my website www.computing.net/answers/webdevel/password-protecting-my-website/4152.html