[SOLVED] Problem with password field...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mikeypengelly
Forum Newbie
Posts: 7
Joined: Tue Jun 08, 2004 5:15 am

[SOLVED] Problem with password field...

Post by mikeypengelly »

hi, i have set up the for as below and are checking the fields for if they are valid etc... however when it comes to the password field i cant get it to accept that i have types something in.

i have pasted the code as below..

Code: Select all

<?php
	if ($_POST['submit']) { 
		$formfullname = $_POST['fullname'];
		$formusername = $_POST['username'];
		$formpassword = $_POST['txtPassword'];
		$formaccessrights = $_POST['accessrights'];
		if ($formfullname == "") {
			echo "<strong>Please enter their full name<br></strong>";
		} 
		If ($formusername == "") {
			echo "<strong>Please enter their username<br></strong>";
		}
		if ($formpassword == "") {
			echo "<strong>Please enter the password<br></strong>";
		}
		if ($formaccessrights == "") {
			echo "<strong>Please select some access rights<br></strong>";
		}		
	} 
     

	?>
	  <FORM ACTION="addmod.php" method="post"  enctype="multipart/form-data">
	   <TABLE ALIGN="center" WIDTH="400" CELLSPACING="0" CELLPADDING="2" BORDER="0">
<TR>
	<TD WIDTH="200">Full Name:</TD>
	<TD WIDTH="200"><INPUT TYPE="text" name="fullname" value="<?echo $formfullname?>"></TD>
</TR>
<TR>
	<TD>User Name:</TD>
	<TD><INPUT TYPE="text" name="username" value="<?echo $formusername?>"></TD>
</TR>
<TR>
	<TD>Password:</TD>
	<TD><INPUT TYPE="password" name"txtPassword" value="<?echo $formpassword ?>"></TD>
</TR>
<TR>
	<TD VALIGN="top">Access Rights:</TD>
	<TD><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<INPUT TYPE='checkbox' name='accessrights' VALUE='1'>Admin
	</TD>
</TR>
<TR>
	<TD COLSPAN="2" ALIGN="center"><BR>
	<BR><INPUT TYPE="submit" VALUE="Submit" name="submit"></TD>
</TR>
</TABLE>
<BR>
	    <BR>
	    <BR>
	   
	   </FORM>
I just cant get it to say yes there is something in the password field...

any help will be appreciated.



feyd | use

Code: Select all

tags; Read : [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in Forums[/url][/color]
User avatar
Wayne
Forum Contributor
Posts: 339
Joined: Wed Jun 05, 2002 10:59 am

Post by Wayne »

may have something to do with the missing = sign ... try

Code: Select all

<TD><INPUT TYPE="password" name="txtPassword" value="<?echo $formpassword ?>"></TD>
you may also want to use code tags or php tags when you post otherwise the moderators might hassle you!
mikeypengelly
Forum Newbie
Posts: 7
Joined: Tue Jun 08, 2004 5:15 am

thanks

Post by mikeypengelly »

thanks very much.

Its amazing what ya cant see after staring at code for ages..
Fresh eyes and all that :D

Thanks for the warning also.
Post Reply