Help with form action (php-->mysql)
i'm using following php script send information html form mysql 4.0 database. following works fine want simplify form data little having single value form sent 4 different fields in database table. instance, want value entered "duration" in form sent "duration", "pic", , "sic" fields in database.i've tried altering following script no luck.
<?
$username="dbo2330*****";
$password="********";
$database="db2330*****";
$date=$_post['date'];
$acmod=$_post['acmod'];
$legs=$_post['legs'];
$route=$_post['route'];
$duration=$_post['duration'];
$dl=$_post['dl'];
$nl=$_post['nl'];
$inst=$_post['inst'];
$apps=$_post['apps'];
$nite=$_post['nite'];
$xc=$_post['xc'];
$pic=$_post['pic'];
$remarks=$_post['remarks'];
mysql_connect("db1359.perfora.net",$username,$password);
@mysql_select_db($database) or die( "unable select database");
$query = "insert contacts values ('','$date','$acmod','$legs','$route','$duration','$dl','$nl','$inst','$apps','$nite','$x c','$pic','$remarks')";
mysql_query($query);
mysql_close();
?>
<?
$username="dbo2330*****";
$password="********";
$database="db2330*****";
$date=$_post['date'];
$acmod=$_post['acmod'];
$legs=$_post['legs'];
$route=$_post['route'];
$duration=$_post['duration'];
$dl=$_post['dl'];
$nl=$_post['nl'];
$inst=$_post['inst'];
$apps=$_post['apps'];
$nite=$_post['nite'];
$xc=$_post['xc'];
$pic=$_post['pic'];
$remarks=$_post['remarks'];
mysql_connect("db1359.perfora.net",$username,$password);
@mysql_select_db($database) or die( "unable select database");
$query = "insert contacts values ('','$date','$acmod','$legs','$route','$duration','$dl','$nl','$inst','$apps','$nite','$x c','$pic','$remarks')";
mysql_query($query);
mysql_close();
?>
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment