I seem to always have issues getting variables into my MySQL querys.
Is there a good tutorial or could someone show me the proper way of getting variables into the statement?
The main issue I am having is with the different types of quotes (' or ").
Here is my query:
$sql = "INSERT INTO classes (
class_name,
user_id,
professor_name,
class_start,
class_end,
school_period)
VALUES('" . $className
. "','" . $userID
. "','" . $classProfessor
. "','" . $classStart
. "','" . $classEnd
. "','" . $classPeriod . ");)"
. '"';