I am trying to insert the below code snippet into the database but it is not entering and I don’t know what I did wrong.
Please, how can I output whatever I selected to the browser using <?PHP var_dump ?> or `
You could put it after you build the query, so you can see if there’s a syntax error. You could copy the query as it’s built in $query into phpmyadmin and see what you get.
If you put exit() after the var_dump() or print_r() you can stop execution and prevent it from redirecting and wiping out your error message.
Did you intend to put a space after the size variable in your query? If it’s a numeric column, I’d expect that would get upset. But, you should use Prepared Statements instead of concatenating variables into your query like that, and then you wouldn’t need to worry about quotes at all.