djheru:
The .html code that I'm utilizing to first accept the values:
<body>
<p class="style1">Add Answer:</p>
<p class="style1"> </p>
<form id="form1" name="form1" method="post" action="http://www.sampleurl.php">
<table width="49%" border="0" cellspacing="10">
<tr>
<td width="35%" height="25">Answer Text:</td>
<td width="65%"><label>
<input type="text" name="Answer" id="Answer" width="300" />
</label></td>
</tr>
<tr>
<td colspan="2"><label>
<div align="center">
<input name="Submit" type="submit" id="Submit" value="Submit" />
</div>
</label></td>
</tr>
</table>
</form>
<p class="style1"> </p>
</body>
</html>
The .php code that accepts the variables from the previous page and inserts the values into the database is...
<body>
<?php
include "../dbconnect.php";
print_r($REQUEST);
echo $POST['Answer'];
echo $_POST['Submit'];
if(isset($_POST['Submit']))
{
$Answer = $_POST['Answer'];
$query = "INSERT INTO Answer SET Answer='$Answer'";
mysql_query($query);
echo "Your answer was entered successfully";
}
else
{
echo "There was an error processing your request";
}
?>
</body>
</html>