Page 1 of 1

[SOLVED] Problem with password field...

Posted: Tue Jun 22, 2004 10:13 am
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]

Posted: Tue Jun 22, 2004 10:17 am
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!

thanks

Posted: Tue Jun 22, 2004 10:26 am
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.