Hi all,
I have created a single webpage(index.php) with the following code...
Basically when the user selects an option and clicks submit the information should appear on the same page below the select menu.
However, It doesn't work.
Please could you help me out here.
Thank you very much,
Kevin.
<body>
<form action="" name=form>
<p>
<select name=site>
<option value="0">Go to.... </option>
<option value="1">News </option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Select">
</p>
</form>
<?php
include('list.php');
// create short variables
$site = $HTTP_POST_VARS['site'];
switch($site)
{
case "0":
echo 'Please select an option.';
break;
case "1":
news();
break;
}
?>
</body>
Here is my news() function...
<?php
function ERHA()
{
?>
<img src="image.jpg" alt="news" width="150" height="205" align="left">
<table width="64%" border="0">
<tr align="right">
<td colspan="4"> </td>
</tr>
</table>
<?php
}
?>
Thanks again..