<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" />

and the php code is

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

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

Recommended Answers

All 5 Replies

Member Avatar
<form action="process_registration.php" method="get" >

This is your problem. This should work:

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

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

Member Avatar

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

should i change the error handling method in php.ini ??

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.