Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query fail

Status
Not open for further replies.

asm1

Technical User
Oct 9, 2003
77
GB
can anyone see why this query does not work
Code:
$dbcon = mysql_connect($DB_HOST, $DB_USER, $DB_PASSWORD)or die ("Could not connect to database students part 1");

//select the database
mysql_select_db($DB_NAME, $dbcon) or die ("Could not select database part 2");

//create the sql statement
$insert = "INSERT INTO studentdetails VALUES (NULL, NULL, NULL, '$newFirstName', '$newMiddleInitial', '$newLastName', '$address', '$newTown', '$newCounty, '$newPostcode', '$newEmail', '$newLocalTelephoneNumber', NULL, '$newJobChoice1', '$newJobChoice2', '$newJobChoice3', $today)";

mysql_db_query($DB_NAME, $Insert, $dbcon) or die ("Could not INSERT student details part 3");
it dies at part 3
thx for your time in advance
 
did that and it returned

Query was empty

does anyone know why?
 
thanks very much, i feel rather stupid now as I have been looking at it for hours. :-D

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top