How to UPDATE?
Hi,
dear friends..i've already try to check the coding and it seems doesn't have any problem with it..
can u suggest a solution why this coding can't use to update the database?? everytime i click the button, the dialog box contains 'failed to update' exist...
<?php
$db="projek"; //database name
$table="projek"; //table name
$con=mysql_connect("localhost","root","");
mysql_select_db($db,$con);
$id_projek=$_POST['id_projek'];
$homepage=$_POST['homepage'];
$project_name=$_POST['project_name'];
$desc=$_POST['desc'];
$day=$_POST['day'];
$month=$_POST['month'];
$year=$_POST['year'];
$status=$_POST['status'];
$email=$_POST['email'];
$q= "UPDATE $table SET id_projek='$id_projek', homepage='$homepage', project_name ='$project_name',desc ='$desc', day ='$day',month='$month', year ='$year', status ='$status', email ='$email' WHERE id_projek='$id_projek' ";
$rslt=mysql_query($q);
$numrow=mysql_affected_rows();
if ($numrow>0)
{
echo "<script>alert('..::UPDATE RECORD::..');<//script>";
include 'list_projek.php';
}
else
{
echo "<script>alert('..::!FAILED TO UPDATE!::..');</script>";
include 'list_projek.php';
}
?>
Subject
Written By
Posted
How to UPDATE?
June 20, 2005 09:15PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.