jeudi 23 avril 2015

Having trouble inserting values into a database

I am trying to insert these values to my database but i am having some issues with it. i am not sure why. below are the values that need to be inserted and the current code i have written for this is below.

<?php
include ('db.php');

$cfname=$_POST['c_firstname']
$clname=$_POST['c_lastname'];
$address=$_POST['c_address'];
$postcode=$_POST['c_postcode'];
$mobno=$_POST['c_mobno'];
$emailad=$_POST['c_email'];
$expsttime=$_POST['e_sttime'];
$expendtime=$_POST['e_endtime'];
$expname=$_POST['experience'];
$car1=$_POST['car'];
$driver1=$_POST['driver'];
$host1=$_POST['host'];




$addnewbookingSQL="INSERT into experienceBooking 
(firstName, lastName, address, postcode, mobNo, emailAd, expStTime, expEndTime, experienceName, car, driver, host)
values ('".$cfname."','".$clname."','".$address."','".$postcode."','".$mobno."','".$emailad."','".$expsttime."','".$expendtime."','".$expname."','".$car1."','".$driver1."','".$host1."')";
$exeaddnewbookingSQL=mysql_query($addnewbookingSQL);



?>

i am not sure if my SQL query it right as it is displaying a blank screen when this code is performed.




Aucun commentaire:

Enregistrer un commentaire