View Single Post
Old 12-07-2012, 07:35 PM   PM User | #22
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Simply use elseif's to keep going with the if/else chain you have here. So you'd have an else if (isset($_POST['delete'])) block. Simply follow the same logic you have for the editing. You'll probably want to keep adding with the logic to the edit as well, otherwise the form only deals with one field modification.
You should look at prepared statements as well to protect the input from corrupting the SQL Structure. Looks like the SQLSrv package does not roll its own version of mysql_real_escape_string.
Fou-Lu is offline   Reply With Quote