Hi Im trying to do some database sql stuff and basically i've got a html form label and the user selects an item and from a database im trying to select a time that is only corresponding to the chosen item (I hope that makes sense) . The two lines below are how im doing it but i get access violation: 1064 because of the "where Course_Title = $selected");". Any recommendations on why?
$$selected = $_REQUEST['chosenCourse']; (I know there's 2 dollar signs there the thing lets me have 2 or none?)
$stmt = $GLOBALS["pdo"]->prepare("SELECT Times from courses where Course_Title = $selected");