reub77
10-08-2002, 11:21 PM
This is the segment of the code:
<?PHP
if($Submit){
//formulate a jobID
include("jobID.php");
$conn = db_connect();
//declare query
$query = ('INSERT INTO currProjects (id,companyName,contact,phoneNum,email,url,street,
city,provState,country,postalCode,jobSummary,contr
actStatus,status) VALUES ("'.$jobID.'","'.$company.'","'.$cont.'","'.$phone.'","'.$Email.'","'.$URL.'","'.$Street.'","'.$City.'","'.$prov.'","'.$Country.'","'.$postal.'","'.$jobSum.'","none","lead"); INSERT INTO contracts (id) VALUES ("'.$jobID.'"); INSERT INTO invoices (id) VALUES ("'.$jobID.'")';
//execute query
$result = mysql_query($query);
}
?>
I know there is an easier way to do this but I just don't know it. Please teach me.
Thanks
<?PHP
if($Submit){
//formulate a jobID
include("jobID.php");
$conn = db_connect();
//declare query
$query = ('INSERT INTO currProjects (id,companyName,contact,phoneNum,email,url,street,
city,provState,country,postalCode,jobSummary,contr
actStatus,status) VALUES ("'.$jobID.'","'.$company.'","'.$cont.'","'.$phone.'","'.$Email.'","'.$URL.'","'.$Street.'","'.$City.'","'.$prov.'","'.$Country.'","'.$postal.'","'.$jobSum.'","none","lead"); INSERT INTO contracts (id) VALUES ("'.$jobID.'"); INSERT INTO invoices (id) VALUES ("'.$jobID.'")';
//execute query
$result = mysql_query($query);
}
?>
I know there is an easier way to do this but I just don't know it. Please teach me.
Thanks