Quick Syntax Question

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!

Moderator: General Moderators

Post Reply
neesley
Forum Commoner
Posts: 26
Joined: Tue Aug 31, 2010 3:22 am

Quick Syntax Question

Post by neesley »

What's the issue with this?

Code: Select all

$emp = mysql_query("SELECT personID FROM employees WHERE last_name = '$_POST[update]'");
 
$upd = "UPDATE schedule SET $_POST[type] = $emp WHERE ID ='$_POST[ID]'";
Thanks!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Quick Syntax Question

Post by requinix »

Don't forget the obvious SQL injection problem.

mysql_real_escape_string
Post Reply