Ok here is the script i have to update values in my database, the only problem is it doesnt do anything, doesnt even have any errors.
Ok the first one is the page that contains the form to fill out that you submit to update it.
<?
$id=$_GET['id'];
include("dbci.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM xfact_pages WHERE id='$id'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$data=mysql_result($result,$i,"data");
++$i;
}
?>
<form action="update_page.php" method="post">
Data
<textarea name="ud_data"></textarea>
<br>
ID #
<input type="text" name="ud_id">
<br>
<input type="Submit" value="Update">
</form>
<? echo ("$data"); ?>
Ok then it sends to this script.......
<?
$ud_data=$_POST['ud_data'];
$ud_id=$_POST['ud_id'];
include("dbci.php");
mysql_connect(localhost,$username,$password);
$query="UPDATE xfact_pages SET data='$ud_data' WHERE id='$ud_id'";
mysql_query($query);
echo "Record Updated";
mysql_close();
?>
Now i dont know if theres something wrong with this or whats goin on, if you can figure out whats wrong with it or just plain give me a new Update script i would really appreciate it =)
Thanks