INSERT INTO

hey all … I have a query I can’t get to take.

<?php
	require('sqlconnect.php'); // Connect to the db.
	include('var.php');




			// Make the query.
			$query = "INSERT INTO calendar (classname, shortname, date, time, length, num_sessions, region, description, instructor, inslevel, crslevel, crsformat, crscredits, costs, prereq, conname, conemail, conphone, website) VALUES ('$classname', '$shortname', '$date', '$time', '$length', '$num_sessions', '$region', '$description', '$instructor', '$inslevel', '$crslevel', '$crsformat', '$crscredits', '$costs', '$prereq', '$conname', '$conemail', '$conphone', '$website')";
			$result = @mysql_query ($query); // Run the query.
			if ($result) { // If it ran OK.
			

//  ############ POST IF SUCCESSFUL !!!!    ################### //

				include($header);
				include($body);
				include($ok);
		} else {
				include($header);
				include($body);
				include($fail);
}
?>

Query formatting wrong ?? Also, is there a better way to INSERT so many fields ?

Thanx in advance. :evil:

update … I got it to work … there wa nothing wrong in the syntax it was merely path related. Doh !! :oops:

Sponsor our Newsletter | Privacy Policy | Terms of Service