Hi,
I have had this script for ages now and never had any problems with it. I tried filling it out for a client, and it would not insert the information into phpmyadmin.
This code just suddenly stopped working, and I haven't even interacted with it for a month now.
It was working fine, and I cant find any errors. (There should be no errors as it was working fine!)
There is more code which deals with the mail function, which works fine. All information inputted into the form is sent by email with no problems. The only issue is the sending of that information to mysql.
The code is below:
<?php
ob_start();
require_once('../../Connections/djdirect.php');
//Client Details//
$firstname = ($_POST['firstname']);
$lastname = ($_POST['lastname']);
$email = ($_POST['email']);
$password = ($_POST['password']);
$mobile = ($_POST['mobilenumber']);
$landline = ($_POST['landlinenumber']);
$addressline1 = ($_POST['addressline1']);
$addressline2 = ($_POST['addressline2']);
$addresscity = ($_POST['addresscity']);
$addresscounty = ($_POST['addresscounty']);
$addresspostcode = ($_POST['addresspostcode']);
//Event and Vanue Details//
$nameevent = ($_POST['nameevent']);
$date = ($_POST['datepicker']);
$timestart = ($_POST['timestart']);
$timeend = ($_POST['timeend']);
$typeofvenue = ($_POST['typeofvenue']);
$venuerestrictions = ($_POST['venuerestrictions']);
$typeofevent = ($_POST['typeofevent']);
$vaddressline1 = ($_POST['vaddressline1']);
$vaddressline2 = ($_POST['vaddressline2']);
$vaddresscity = ($_POST['vaddresscity']);
$vaddresscounty = ($_POST['vaddresscounty']);
$vaddresspostcode = ($_POST['vaddresspostcode']);
$amountofguests = ($_POST['amountofguests']);
$ageofguests = ($_POST['ageofguests']);
//Package and Addons//
$package = ($_POST['package']);
$addon1 = ($_POST['addon1']);
$addon2 = ($_POST['addon2']);
$addon3 = ($_POST['addon3']);
$addon4 = ($_POST['addon4']);
$addon5 = ($_POST['addon5']);
$addon6 = ($_POST['addon6']);
$fogmachine = ($_POST['fogmachine']);
$pricequoted = ($_POST['pricequoted']);
$comments = ($_POST['comments']);
$promocode = ($_POST['promocode']);
$tandc = ($_POST['tandc']);
$sql = "INSERT INTO clients (firstname, lastname, email, password, mobile, landline, addressline1, addressline2, addresscity, addresscounty, addresspostcode, nameevent, date, timestart, timeend, typeofvenue, venuerestrictions, typeofevent, vaddressline1, vaddressline2, vaddresscity, vaddresscounty, vaddresspostcode, amountofguests, ageofguests, package, addon1, addon2, addon3, addon4, addon5, addon6, fogmachine, quote, comments, promocode, tandc) VALUES ('$firstname', '$lastname', '$email', '$password', '$mobile', '$landline', '$addressline1', '$addressline2', '$addresscity', '$addresscounty', '$addresspostcode', '$nameevent', '$date', '$timestart', '$timeend', '$typeofvenue', '$venuerestrictions', '$typeofevent', '$vaddressline1', '$vaddressline2', '$vaddresscity', '$vaddresscounty', '$vaddresspostcode', '$amountofguests', '$ageofguests', '$package', '$addon1', '$addon2', '$addon3' '$addon4', '$addon5', '$addon6', '$fogmachine', '$pricequoted', '$comments', '$promocode', '$tandc')";
mysql_query($sql);
?>