Ok, that was a typo, sorry about that, you will find below the details of the join form as it stands now and then below that the function as defined in the functions form:
Join form:
if(empty($messages)) {
// registration ok, get user id and update db with new info:
newuser($strUsername = isset($_POST['username']) ? $_POST['username'] : "",
$strPassword = isset($_POST['password']) ? $_POST['password'] : "",
$strfirst_name = isset($_POST['first_name']) ? $_POST['first_name'] : "",
$strlast_name = isset($_POST['last_name']) ? $_POST['last_name'] : "",
$straddress_line1 = isset($_POST['address_line1']) ? $_POST['address_line1'] : "",
$straddress_line2 = isset($_POST['address_line2']) ? $_POST['address_line2'] : "",
$strtown = isset($_POST['town']) ? $_POST['town'] : "",
$strcounty = isset($_POST['county']) ? $_POST['county'] : "",
$strpostcode = isset($_POST['postcode']) ? $_POST['postcode'] : "",
$strdaytime_phone = isset($_POST['daytime_phone']) ? $_POST['daytime_phone'] : "",
$strmobile_phone = isset($_POST['mobile_phone']) ? $_POST['mobile_phone'] : "",
$stremail_address = isset($_POST['email_address']) ? $_POST['email_address'] : "",
$strtest1 = isset($_POST['test1']) ? $_POST['test1'] : "",
$strtraining = isset($_POST['test2']) ? $_POST['test2'] : "",
$strinsurancedetails = isset($_POST['insurancedetails']) ? $_POST['insurancedetails'] : "");
Functions include:
function newUser ($username, $password, $first_name, $last_name, $address_line1, $address_line2, $town, $county, $postcode, $daytime_phone, $mobile_phone, $email_address, $test1, $test2) {
/*
Creating a New User Record in the DB:
In this function we create a new user record in the db.
We first build a query and save it into the $query variable.
The query statement says:
line 75
'Insert the value of $login and $password into the 'login'
and 'password' columns in the 'users' table' (line 77)
*/
global $link;
$query="INSERT INTO suppliers (username, password, first_name, last_name, address_line1, address_line2, town, county, postcode, daytime_phone, mobile_phone, email_address, test1, test2)
VALUES ('$username', '$password', '$first_name', '$last_name', '$address_line1', '$address_line2', '$town', '$county', '$postcode', '$daytime_phone', '$mobile_phone', '$email_address', '$test1', '$test2')";
$result=mysql_query($query, $link) or die("Died inserting login info into db. Error returned if any: ".mysql_error());
return true;
} // end func newUser($username, $pass)
Hope this helps...
g