MySQL Forums
Forum List  »  PHP

Re: Submit form Problems
Posted by: Jonathan Stephens
Date: June 09, 2005 11:48PM

$query = "SELECT * FROM ts1news WHERE ts1_title={$_GET['id']}";

$query = "DELETE FROM ts1news WHERE ts1_title={$_POST['id']} LIMIT 1";

If ts1_title is a string, then these need to be

$query = "SELECT * FROM ts1news WHERE ts1_title='{$_GET['id']}'";

$query = "DELETE FROM ts1news WHERE ts1_title='{$_POST['id']}' LIMIT 1";

Remember: STRINGS IN QUERIES MUST BE QUOTED.

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle



Edited 1 time(s). Last edit at 06/09/2005 11:50PM by Jon Stephens.

Options: ReplyQuote


Subject
Written By
Posted
June 08, 2005 07:50AM
Re: Submit form Problems
June 09, 2005 11:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.