Everything is working now, thanks to your help. Just one question though.
This bit of code:
Code: Select all
$query = "INSERT INTO patients (patient_num, gender, status, firstname, initial, lastname, dob, ss, address1, address2, city, state, zip, phone, employer, employer_addy, health_ins, pharm_cov, hourly_wage, weekly_hours, annual_salary, other_income, date) VALUES ( '$patient_num', '$gender', '$status', '$firstname', '$initial', '$lastname', '$dob', '$ss', '$address1', '$address2', '$city', '$state', '$zip', '$phone', '$employer', '$employer_addy', '$health_ins', '$pharm_cov', '$hourly_wage', '$weekly_hours', '$annual_salary', '$other_income', NOW())";
$result = mysql_query ($query) or die(mysql_error());
echo '<pre>';
echo "This is the result : <br>" ;
print_r ( $result);
echo '</pre>';
echo '<pre>';
echo "This is the query : <br>" ;
print_r ( $query);
echo '</pre>';
}
if (isset($firstname)) {
print "$firstname ";
}
if (isset($initial)) {
print "$initial ";
}
if (isset($lastname)) {
print "$lastname <br>";
}
if (isset($dob)) {
print "$dob ";
}
if (isset($social)) {
print "$social ";
}
if ($address2 < null) {
print "Address: $address2 ";
}
Returns the following:
===============================================
...
[hourly_wage] => 4 carrots
[weekly_hours] => 40
[annual_salary] => 25000
[other_income] => 123
[submit] => Continue
)
Connected successfully
DB Selected
This is the result :
1
This is the query : INSERT INTO patients (patient_num.....
Bugs I Like Carrots Bunny
1922-12-3
============================================
The part that says "This result:
1
Is that coming from the "or die(mysql_error());" part of $result
Just curious as to what it means.
Thanks