what do this code?
---- Original Message ----
From: Tedit kap <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, April 17, 2008 8:50:25 AM
Subject: Re: [php_mysql] updating mysql db through a simple form
there u go. it works now. thanks
----- Original Message ----
From: HardyBoyz <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ps.com
Sent: Tuesday, April 15, 2008 2:11:59 AM
Subject: Re: [php_mysql] updating mysql db through a simple form
Try using quotation mark in each of values. so this code ($vrb1,$vrb2,
$vrb3,$vrb4, $vrb5)
change to
('$vrb1','$vrb2' ,'$vrb3', '$vrb4',' $vrb5'). i had a problem like u long time
ago.
Tedit kap <[EMAIL PROTECTED] com> wrote: 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=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
[Non-text portions of this message have been removed]
Jualan Hosting
www.magnet-id. com
Jualan Bandwith
www.lintaswave. net.id
between 0000-00-00 and 9999-99-99
[Non-text portions of this message have been removed]
____________ _________ _________ _________ _________ _________ _
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile. yahoo.com/
;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
[Non-text portions of this message have been removed]
____________________________________________________________________________________
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]