Okay, I have been trying this for three days and I am not getting anywhere. I have recently installed the latest version of PHP and none of my old code is working. I was told I could turn register_globals on and it should work.
This piece of code is supposed to pull values from a form and insert a new record into the database.
I am getting errors that say undefined variable for all the variables I am trying to insert.
Is there anything else that I need to do besides turning register_globals ON. This code works in the previous version so I am not understanding why they would take that functionality away.
Thanks in advance
<? php
//Adding New Course Inforamtion
If ($AddCourse)
{
$which_db="ecgc";
if(!$link = mysql_connect("database", "sa", "password"))
die("No Connect to DB");
if(!mysql_select_db($which_db,$link))
die("No Select DB");
$query = "INSERT into tblCourses (Course_Name, Address, City, State, ZipCode, County, Phone, Member, URL, CertRestrict) VALUES (\"$CourseName\", \"$Address\", \"$City\", \"$State\", \"$Zip\", \"$County\", \"$Phone\", \"$ECGCMember\", \"$Filename\", \"$Certificate\")";
$result = mysql_query($query,$link);
}
?>