How to edit the code by only php? After I insert nothings in the textbox and click submit, the span there will run out with the message of 'Please insert this' . I done same code with yt but still not successfully done. Here is my code
<html>
<head>
<h1>Members</h1>
<style>
.error {color: #FF0000;}
</style>
</head>
<body>
<form method="post" action="process.php"></form>
<table border="1">
<tr>
<td >Number of Person</td>
<td align="center"><input type="text" name="person" size="18" maxlength="18"><span class="error"><?php echo $sperson;?></span></td>
</tr>
<tr>
<th colspan="2" align="right"><input type="submit" name="submit" value="submit"></th>
</tr>
</table>
</form>
<?php
if (isset($_POST['submit']))
{
$vperson = $_POST['person'];
if (empty($vperson))
{
$sperson = "Person is required";
}
else
{
$sperson = "Person is required";
}
}
?>