PHP forum value

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
hmvrulz
Forum Newbie
Posts: 20
Joined: Fri Oct 03, 2008 10:20 pm

PHP forum value

Post by hmvrulz »

Values in the text filed

Code: Select all

<br /> <b>Notice</b>:  Undefined index:  fname in <b>C:\Program Files\wamp\www\fw\views\users\registration.html</b> on line <b>4</b><br />
heres the form

registration.html

Code: Select all

 
<form action="./register/" method="post" name="registration">
  <div>First Name:</div>
  <div>
    <input type="text" name="fname" size="25" maxlength="25" value="<?php echo $_POST['fname']; ?>" />
  </div>
  <div>Last Name:</div>
  <div>
    <input type="text" name="lname" size="25" maxlength="25" value="<?php echo $_POST['lname']; ?>" />
  </div>
  <div>Username:</div>
  <div>
    <input type="text" name="username" size="25" maxlength="25" value="<?php echo $_POST['username']; ?>" />
  </div>
  <div>Password:</div>
  <div>
    <input type="password" name="password1" size="25" maxlength="50" value="<?php echo $_POST['password1']; ?>" />
  </div>
  <div>Retype Password:</div>
  <div>
    <input type="password" name="password2" size="25" maxlength="50" value="<?php echo $_POST['password2']; ?>" />
  </div>
  <div>Email:</div>
  <div>
    <input type="text" name="email" size="25" maxlength="50" value="<?php echo $_POST['email']; ?>" />
  </div><br/>
  <div><input name="submit" type="submit" value="Register"><input name="reset" type="reset" value="Reset"></div>
 
</form>
When ppl go to
http://localhost/fw/users/new/

then the registration.html form is included. and as values am getting the above content.

When ppl go to
http://localhost/fw/users/register/

the same page is loaded if there are errors in the fill up or the user is present already with username or same email.
Post Reply