The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Help me echo an individual $row? Reply To: Help me echo an individual $row?


I believe I used single quotes and omitted a closing parenthesis in my outline earlier. Try something like this, with the caveat that you’ll obviously need to test it yourself, and adjust variable names as needed.

$sth2 = $conn->prepare("SELECT id, username, email, admin_level FROM users WHERE id IN(" . implode(",", $_POST['change_id']) . ") );

Remember – if you get an error like the one you posted above, see it as a learning experience in correcting syntax errors. It’s usually an issue of missing semi-colon or a parenthesis missing, etc. Learning to identify and correct these sort of issues will make you a better programmer.