Hi All,
This has me stumped, The following code, when submitted, only adds the address1, address2 and the last 5 columns to the database.
It misses, name, company, postcode, etc etc. Any ideas why this is happening?????
<?php
// Define post fields into simple variables
$company_name = $POST['company_name'];
$first_name = $POST['first_name'];
$surname = $POST['surname'];
$add_1 = $POST['address1'];
$add_2 = $POST['address2'];
$town = $POST['town'];
$county = $POST['county'];
$p_code = $POST['p_code'];
$h_tel = $POST['h_tel'];
$m_prefix = $POST['m_prefix'];
$m_tel = $POST['m_tel'];
$email = $POST['email'];
$username = $POST['username'];
$password = $POST['password'];
//insert info to database
function makeRandomCode() {
srand((double)microtime()*1000000);
return rand(1001,9999);
}
$randc = makeRandomCode();
$insertSQL = ("INSERT INTO customers (company_name, first_name, surname, address1, address2, town, county, p_code, h_tel, m_prefix, m_tel, email, username, password, signup_date, randc)
VALUES('$company_name', '$first_name', '$surname', '$address1', '$address2', '$town', '$county', '$p_code', '$h_tel', '$m_prefix', '$m_tel', '$email', '$username', '$password', NOW(), '$randc')");
mysql_select_db($database_smslist, $smslist);
i've checked the names of the fields in the HTML form to make sure they match and they do.