dniwebdesign
01-10-2004, 10:05 AM
<?php
////////////////////////////////////////////
// Online Application V1.0
// Author: DNI Web Design
// http://www.dniwebdesign.ca.tt
// dniwebdesign@sasktel.net
//
// SEND APPLICATION
// © 2004 DNI Web Design
////////////////////////////////////////////
session_start();
// If you change the paths please edit this.
include ("inc/config.php");
// Convert Form to PHP Variables, DO NOT EDIT!
$id=mysql_insert_id();
$fullname=$_POST["fullname"];
$address=$_POST["address"];
$telephone=$_POST["telephone"];
$applyingfor=$_POST["applyingfor"];
$dateavailable=$_POST["dateavailable"];
$email=$_POST["email"];
$highestgrade=$_POST["highestgrade"];
$university=$_POST["university"];
$major=$_POST["major"];
$yearstaken=$_POST["yearstaken"];
$medicaldefects=$_POST["medicaldefects"];
$medicalexplaination=$_POST["medicalexplanation"];
$criminaloffence=$_POST["criminaloffence"];
$criminalexplain=$_POST["criminalexplain"];
// Past Employment
$employer1=$_POST["employer1"];
$employedfrom1=$_POST["employedfrom1"];
$employedto1=$_POST["employedto1"];
$address1=$_POST["address1"];
$address1_1=$_POST["address1_1"];
$phone1=$_POST["phone1"];
$duties1=$_POST["duties1"];
$employer2=$_POST["employer2"];
$employedfrom2=$_POST["employedfrom2"];
$employedto2=$_POST["employedto2"];
$address2=$_POST["address2"];
$address2_1=$_POST["address2_1"];
$phone2=$_POST["phone2"];
$duties2=$_POST["duties2"];
$employer3=$_POST["employer3"];
$employedfrom3=$_POST["employedfrom3"];
$employedto3=$_POST["employedto3"];
$address3=$_POST["address3"];
$address3_1=$_POST["address3_1"];
$phone3=$_POST["phone3"];
$duties3=$_POST["duties3"];
// References
$reference1=$_POST["reference1"];
$refoccupation1=$_POST["refoccupation1"];
$refphone1=$_POST["refphone1"];
$reference2=$_POST["reference2"];
$refoccupation2=$_POST["refoccupation2"];
$refphone2=$_POST["refphone2"];
$reference3=$_POST["reference3"];
$refoccupation3=$_POST["refoccupation3"];
$refphone3=$_POST["refphone3"];
// Date
$date=$_POST["date"];
// ADD INFO TO DATABASE, DO NOT EDIT!!!
$result=mysql_query("INSERT into app_application ($id,$fullname,$address,$telephone,$applyingfor,$dateavailable,$email,$highestgrade,$university,$maj or,$yearstaken,$medicaldefects,$medicalexplaination,$criminaloffence,$criminalexplain,$employer1,$em ployedfrom1,$employedto1,$address1,$address1_1,$phone1,$duties1,$employer2,$employedfrom2,$employedt o2,$address2,$address2_1,$phone2,$duties2,$employer3,$employedfrom3,$employedto3,$address3,$address3 _1,$phone3,$duties3,$reference1,$refoccupation1,$refphone1,$reference2,$refoccupation2,$refphone2,$r eference3,$refoccupation3,$refphone3,$date") or print mysql_error();
if ($result)
{
mail("$admin_mail", "There was an online application submitted from ".$fullname." on ".$date.".", "The application can be viewed at ".$appsite." is waiting for approval at ".$site_title."", "From: ".$admin_name."");
echo "<p><font face='Arial' size=6><center>DONE!</center></font>";
}
else
{
echo "<p><font face='Arial' size='2'>There was an error in processing your request. Please contact the site administrator ".$admin_name." at <a href='".$admin_mail."'>".$admin_mail."</a>. Thanks and sorry for the inconvenience.</font>";
}
?>
There is the code....
Here is the error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '0,Dawson Irvine,1501 Cumberland Ave. S.,(306) 665-8115,Webmaste
There was an error in processing your request. Please contact the site administrator Dawson Irvine at webmaster@akennstrucking.ca. Thanks and sorry for the inconvenience.
---
The last paragraph is printed by the program which is fine, just the syntax isn't.
////////////////////////////////////////////
// Online Application V1.0
// Author: DNI Web Design
// http://www.dniwebdesign.ca.tt
// dniwebdesign@sasktel.net
//
// SEND APPLICATION
// © 2004 DNI Web Design
////////////////////////////////////////////
session_start();
// If you change the paths please edit this.
include ("inc/config.php");
// Convert Form to PHP Variables, DO NOT EDIT!
$id=mysql_insert_id();
$fullname=$_POST["fullname"];
$address=$_POST["address"];
$telephone=$_POST["telephone"];
$applyingfor=$_POST["applyingfor"];
$dateavailable=$_POST["dateavailable"];
$email=$_POST["email"];
$highestgrade=$_POST["highestgrade"];
$university=$_POST["university"];
$major=$_POST["major"];
$yearstaken=$_POST["yearstaken"];
$medicaldefects=$_POST["medicaldefects"];
$medicalexplaination=$_POST["medicalexplanation"];
$criminaloffence=$_POST["criminaloffence"];
$criminalexplain=$_POST["criminalexplain"];
// Past Employment
$employer1=$_POST["employer1"];
$employedfrom1=$_POST["employedfrom1"];
$employedto1=$_POST["employedto1"];
$address1=$_POST["address1"];
$address1_1=$_POST["address1_1"];
$phone1=$_POST["phone1"];
$duties1=$_POST["duties1"];
$employer2=$_POST["employer2"];
$employedfrom2=$_POST["employedfrom2"];
$employedto2=$_POST["employedto2"];
$address2=$_POST["address2"];
$address2_1=$_POST["address2_1"];
$phone2=$_POST["phone2"];
$duties2=$_POST["duties2"];
$employer3=$_POST["employer3"];
$employedfrom3=$_POST["employedfrom3"];
$employedto3=$_POST["employedto3"];
$address3=$_POST["address3"];
$address3_1=$_POST["address3_1"];
$phone3=$_POST["phone3"];
$duties3=$_POST["duties3"];
// References
$reference1=$_POST["reference1"];
$refoccupation1=$_POST["refoccupation1"];
$refphone1=$_POST["refphone1"];
$reference2=$_POST["reference2"];
$refoccupation2=$_POST["refoccupation2"];
$refphone2=$_POST["refphone2"];
$reference3=$_POST["reference3"];
$refoccupation3=$_POST["refoccupation3"];
$refphone3=$_POST["refphone3"];
// Date
$date=$_POST["date"];
// ADD INFO TO DATABASE, DO NOT EDIT!!!
$result=mysql_query("INSERT into app_application ($id,$fullname,$address,$telephone,$applyingfor,$dateavailable,$email,$highestgrade,$university,$maj or,$yearstaken,$medicaldefects,$medicalexplaination,$criminaloffence,$criminalexplain,$employer1,$em ployedfrom1,$employedto1,$address1,$address1_1,$phone1,$duties1,$employer2,$employedfrom2,$employedt o2,$address2,$address2_1,$phone2,$duties2,$employer3,$employedfrom3,$employedto3,$address3,$address3 _1,$phone3,$duties3,$reference1,$refoccupation1,$refphone1,$reference2,$refoccupation2,$refphone2,$r eference3,$refoccupation3,$refphone3,$date") or print mysql_error();
if ($result)
{
mail("$admin_mail", "There was an online application submitted from ".$fullname." on ".$date.".", "The application can be viewed at ".$appsite." is waiting for approval at ".$site_title."", "From: ".$admin_name."");
echo "<p><font face='Arial' size=6><center>DONE!</center></font>";
}
else
{
echo "<p><font face='Arial' size='2'>There was an error in processing your request. Please contact the site administrator ".$admin_name." at <a href='".$admin_mail."'>".$admin_mail."</a>. Thanks and sorry for the inconvenience.</font>";
}
?>
There is the code....
Here is the error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '0,Dawson Irvine,1501 Cumberland Ave. S.,(306) 665-8115,Webmaste
There was an error in processing your request. Please contact the site administrator Dawson Irvine at webmaster@akennstrucking.ca. Thanks and sorry for the inconvenience.
---
The last paragraph is printed by the program which is fine, just the syntax isn't.