Error on php programming

i have written 2 php files,index and reply.i ll enter some data on index.php page and ll submit and those data will be displayed in next page reply.php

here is the code for index.php file:-

[php]

Name
Address
Phone Number
Sex Male Female
City Select Country India UK USA
Password
[/php]

and here is code for reply.php:-
[php]

<?php echo $_REQUEST[name]; echo "
"; echo $_REQUEST[address]; echo "
"; echo $_REQUEST[phone]; echo "
"; echo $_REQUEST[sex]; echo "
"; echo $_REQUEST[city]; echo "
"; echo $_REQUEST[pswd]; echo "
"; ?>[/php]

but in the reply.php page along with the sumiytted data there are some error messages:-

here is the displayed content of reply.php:-

Notice: Use of undefined constant name - assumed ‘name’ in C:\xampp\htdocs\sanjit\reply.php on line 2
sourav

Notice: Use of undefined constant address - assumed ‘address’ in C:\xampp\htdocs\sanjit\reply.php on line 4
kolkata

Notice: Use of undefined constant phone - assumed ‘phone’ in C:\xampp\htdocs\sanjit\reply.php on line 6
9875412258

Notice: Use of undefined constant sex - assumed ‘sex’ in C:\xampp\htdocs\sanjit\reply.php on line 8
M

Notice: Use of undefined constant city - assumed ‘city’ in C:\xampp\htdocs\sanjit\reply.php on line 10
3

Notice: Use of undefined constant pswd - assumed ‘pswd’ in C:\xampp\htdocs\sanjit\reply.php on line 12
password1

where sourav,kolkata,9875412258,M,3,password1 are the submited data.

hello Sourav Mondal, please add single quote around the input box name attribute in reply.php page see below code you are using echo $_REQUEST[name]; which is wrong use as echo $_REQUEST['name'];

replace you reply.php page code with below code
[php]

<?php echo $_REQUEST['name']; echo "
"; echo $_REQUEST['address']; echo "
"; echo $_REQUEST['phone']; echo "
"; echo $_REQUEST['sex']; echo "
"; echo $_REQUEST['city']; echo "
"; echo $_REQUEST['pswd']; echo "
"; ?>

[/php]
i hope this will helpful for you…
Reply your feedback
SR

Sponsor our Newsletter | Privacy Policy | Terms of Service