0
<form action="process_registration.php" method="get" >
                <label for="lname">Login Name:</label>
                <input type="text" name="lname" id="lname" />
                <label for="pswrd">Password:</label>
                <input type="password" name="pswrd" id="pswrd" />
                <input type="submit" value="Submit" class="animated shake" />
                <input type="reset" value="reset" class="animated shake" />
            </form>

and the php code is

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>Thank You</title>
<link rel=”stylesheet” type=”text/css” href=”common.css” />
</head>
<body>
<h1>Thank You</h1>
<p>Thank you for registering. Here is the information you submitted:</p>
<dl>
<dt>Login Name</dt><dd><?php echo $_POST['lname']?></dd>
<dt>Password</dt><dd><?php echo $_POST['pswrd']?></dd>
</dl>
</body>
</html>

and the error is
Notice: Undefined index: lname in C:\wamp\www*****\process_registration.php on line 12
Notice: Undefined index: pswrd in C:\wamp\www*****\process_registration.php on line 13

2
Contributors
5
Replies
9
Views
4 Years
Discussion Span
Last Post by kakalahori
0
<form action="process_registration.php" method="get" >

This is your problem. This should work:

<form action="process_registration.php" method="post" >
0

i changed it to post but stili the same error....
previously it waws even post but i changed it to get to c if it works i even tried

0

At a loss then, sorry. I can't see why form data sent via post is not picked up by the 'action' url

0

i got it the zend server apache was runing with the wamp apache and i closed the zend one and it worked finally :P

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.