scottyrob
09-08-2006, 01:35 AM
Hi there. I have this code
<?php require("index_top.php"); require("index_left.php"); ?>
<?php echo "<div class=\"caption\">Awards Admin</div><br><br>"; ?>
Add a new award below<br><br><br><br><br><br>
<?php
require("files/db_connect.php");
$result = @mysql_query("SELECT * FROM Awards WHERE ID = ".$_GET["ID"]);
while ($row = mysql_fetch_assoc($result))
{
?>
<form name="form1" method="post" action="">
<table width="571" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><div align="right">ID:</div></td>
<td><div align="center">
<input type="text" name="textfield2" value="<?php echo $row['ID'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Image URL: </div></td>
<td><div align="center">
<input type="text" name="textfield3" value="<?php echo $row['Image'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">URL Of Image when Clicked: </div></td>
<td><div align="center">
<input type="text" name="textfield4" value="<?php echo $row['Image_URL'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Badge Name: </div></td>
<td><div align="center">
<input type="text" name="textfield6" value="<?php echo $row['Name'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Badge Info:</div></td>
<td><div align="center">
<input type="text" name="textfield5" value="<?php echo $row['Info'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Badge Awarded To:</div></td>
<td><div align="center">
<input type="text" name="textfield7" value="<?php echo $row['People'] ?>">
</div></td>
</tr>
</table>
</form>
<?php } ?>
<?php require("index_right.php"); require("index_bottom.php"); ?>
How can i make it so that i can make changes to the text in the boxes, then update the DB with it? You can see what ive got so far... www.loddonexplorers.co.uk/New/awards_edit.php?ID-30
Thanks,
Scott
<?php require("index_top.php"); require("index_left.php"); ?>
<?php echo "<div class=\"caption\">Awards Admin</div><br><br>"; ?>
Add a new award below<br><br><br><br><br><br>
<?php
require("files/db_connect.php");
$result = @mysql_query("SELECT * FROM Awards WHERE ID = ".$_GET["ID"]);
while ($row = mysql_fetch_assoc($result))
{
?>
<form name="form1" method="post" action="">
<table width="571" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><div align="right">ID:</div></td>
<td><div align="center">
<input type="text" name="textfield2" value="<?php echo $row['ID'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Image URL: </div></td>
<td><div align="center">
<input type="text" name="textfield3" value="<?php echo $row['Image'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">URL Of Image when Clicked: </div></td>
<td><div align="center">
<input type="text" name="textfield4" value="<?php echo $row['Image_URL'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Badge Name: </div></td>
<td><div align="center">
<input type="text" name="textfield6" value="<?php echo $row['Name'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Badge Info:</div></td>
<td><div align="center">
<input type="text" name="textfield5" value="<?php echo $row['Info'] ?>">
</div></td>
</tr>
<tr>
<td><div align="right">Badge Awarded To:</div></td>
<td><div align="center">
<input type="text" name="textfield7" value="<?php echo $row['People'] ?>">
</div></td>
</tr>
</table>
</form>
<?php } ?>
<?php require("index_right.php"); require("index_bottom.php"); ?>
How can i make it so that i can make changes to the text in the boxes, then update the DB with it? You can see what ive got so far... www.loddonexplorers.co.uk/New/awards_edit.php?ID-30
Thanks,
Scott