Hi,
The code below takes variables vrb1 through vrb5 from a form and it is supposed
to update a database. It is displaying the results coming from the form on the
screen (so the form works correctly) but this code can not update the database,
displaying "I could not update the database" as below - and when I check it is
really not updated. Can anybody tell me why it can not update the database? The
columns written here also match with database columns.
<?php
//Connect To Database
$hostname='..............';
$username='.............';
$password='........';
$dbname='.............';
$usertable='table1';
mysql_connect($hostname,$username, $password) OR DIE ('Unable to connect to
database! Please try again later.');
mysql_select_db($dbname);
$vrb1=$_POST['vrb1'];
$vrb2=$_POST['vrb2'];
$vrb3=$_POST['vrb3'];
$vrb4=$_POST['vrb4'];
$vrb5=$_POST['vrb5'];
echo "updated database as follows: " ;
echo $vrb1 .$vrb2. $vrb3. $vrb4. $vrb5;
$query="INSERT INTO table1 (iid, title1, par1, par2, par3) VALUES
($vrb1,$vrb2,$vrb3,$vrb4,$vrb5)";
mysql_query($query) or die (' I could not update the database');
?>
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[Non-text portions of this message have been removed]