I am designing a site for a network security class that is intended to be vulnerable to SQL injection. My query is with php and looks like this
$sql = "SELECT * FROM blogposts WHERE name= '" . $_POST["blogname"] . "'";
It is querying a post from the table blogposts. I am using mysql_fetch_array to print it so it should still print out results regardless of the column name.
However, in my database I have another table called users that has usernames and passwords. That I would like the query to return.
Could someone point me in the right direction? And if I can't print the other table, what could I do instead?