Retain what user inputted
Hello everyone,
I created a simple userform to test. What I wanted to do is have the user input a field,
and then click on the submitted button once the submitted button is click
the page refresh and still retain what the user input (it is not lost).
I know that to do this, we have to use the isset function, which I did, but it didn't work.
Here are my codes, please provide some suggestion and code examples.
[php]
Code:
<html>
<head>
<title></title>
</head>
<body>
<form method ="post" action="">
<table border = 1 >
<tr>
<td>
<?php session_start(); $firstname = (isset($_POST['firstname']));
$lastname = (isset($_POST[lastname]));?>
First Name: <input name="firstname" type="text" value='<?php $firstname ?>'/></td>
</td>
</tr>
<tr>
<td>
Last Name: <input name="lastname" type="text" value="' . $lastname . '"/></td>
</td>
</tr>
<tr>
<td>
<input name="submit" type="submit" value="Enter the information">
</tr>
</td>[/php]
thanks,