mysqli_query($con, "SELECT * FROM files WHERE main_subject = " + echo $_GET['msubject']);
The above gives me a parse error. Could you give me suggestions on how I could change it to make it work?
mysqli_query($con, "SELECT * FROM files WHERE main_subject = " + echo $_GET['msubject']);
The above gives me a parse error. Could you give me suggestions on how I could change it to make it work?
You have to use .
instead of +
for the concatenation.
Replace your script for this:
mysqli_query($con, "SELECT * FROM files WHERE main_subject = '" . $_GET['msubject'] . "'");