Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
587 views
in Q2A Core by

i have a simple code contain a register.php as above:
<html>
<body>
<form action="login.php" method="POST"> 
<table>
<tr><td>firstname</td>
<td><input type="text" name= "fname" /></td>
<tr><td>lastname</td>
<td><input type="text" name= "lname" /></td>
</tr>
</table>
<input type="submit" name="submit" value="register"/></form>
</body>
</html>
second page is login.php and code is:
<?php
$fentry =isset($_POST['fname']);
$lentry =isset($_POST['lname']);
if(isset($_POST['submit']))
{
echo 'welcome' . "$fentry" . "$lentry";
}
?>
question is : when click on submit button it return ((welcome 1.1)) and not the value which i post>>>which is mean when enter for example abc on first name text field it will echo 1 and not abc which i enterd >>>>thank you for you Patience

1 Answer

0 votes
by

isset() return the output depending on if the value "Is Set". remove it and it will return field's value.

also this is Q&A site for Q2A platforn, not php. read http://www.w3schools.com/php/ and then use http://stackexchange.com/ to ask similar questions.

...