tjmbc Posted April 30, 2008 Share Posted April 30, 2008 I run a validation check in dreamweaver and I get this error: "<?echo $form->value("curpass"); ?>" is not a valid value for the "value" attribute in any of the currently active versions. I got the script from a tutorial that was written in 2004. I tried searching around for what a correct value is supposed to be but I can't find any information. The value that is not valid according to the error is the current password for a user. How do I fix this? Link to comment https://forums.phpfreaks.com/topic/103516-value-has-wrong-attribute/ Share on other sites More sharing options...
Fadion Posted April 30, 2008 Share Posted April 30, 2008 Post more code, the line u gave doesnt show anything. Link to comment https://forums.phpfreaks.com/topic/103516-value-has-wrong-attribute/#findComment-530026 Share on other sites More sharing options...
tjmbc Posted April 30, 2008 Author Share Posted April 30, 2008 Here's the form that I'm using... <form action="../login/process.php" method="POST"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr> <td>Current Password:</td> <td><input type="password" name="curpass" maxlength="30" value=" <?echo $form->value("curpass"); ?>"></td> <td><? echo $form->error("curpass"); ?></td> </tr> <tr> <td>New Password:</td> <td><input type="password" name="newpass" maxlength="30" value=" <? echo $form->value("newpass"); ?>"></td> <td><? echo $form->error("newpass"); ?></td> </tr> <tr> <td>Email:</td> <td><input type="text" name="email" maxlength="50" value=" <? if($form->value("email") == ""){ echo $session->userinfo['email']; }else{ echo $form->value("email"); } ?>"> </td> <td><? echo $form->error("email"); ?></td> </tr> <tr><td colspan="2" align="right"> <input type="hidden" name="subedit" value="1"> <input type="submit" value="Edit Account"></td></tr> <tr><td colspan="2" align="left"></td></tr> </table> </form> Link to comment https://forums.phpfreaks.com/topic/103516-value-has-wrong-attribute/#findComment-530031 Share on other sites More sharing options...
tjmbc Posted April 30, 2008 Author Share Posted April 30, 2008 Here's the value function in the form class: function value($field){ if(array_key_exists($field,$this->values)){ return htmlspecialchars(stripslashes($this->values[$field])); }else{ return ""; } } Link to comment https://forums.phpfreaks.com/topic/103516-value-has-wrong-attribute/#findComment-530045 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.