PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
So i'm trying to query my sql table based on the variable that i've past from another page. ie: the user selects an option from a menu, then is sent to a template page with a variable '$page = $_GET' and based on the variable I need to get the info relating to the variable from my database.
So if the variable was '4', I need to get all the values of columns from row 4. I jsut have no idea where to start.
THanks for the help, but i'm getting an error: Query Error: You have an error in your SQL syntax near 'index, name, description, genre FROM franchise_listing WHERE index = 0' at line 1
The $page var should be equal (=) to 'index' column, and it should be displaying that info. So I have:
because the value will be numeric but you should check the index as security measure if it is numeric before quering the table
This would be bad practice if you don't check the $_GET['index'] content, because someone could inject another sql query or just make the query not working