View Single Post
Old 12-15-2012, 08:54 PM   PM User | #18
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,504
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Quote:
Originally Posted by AndrewGSW View Post
Added: to pass a simple array of ids (integers) as a string I would prefer implode() and explode() which have less overhead than serialize().
Actually I'm going to support this over my serialize suggestion as it would be easier and simpler to implode an array into a string for the form and then explode it into an array for processing.

The only slight risk is that someone could modify it before transmission whereas with a serialized array string it's not as easy to understand from the laymans POV.

Also Deb, remember in your SQL to use "where user = '<users id>'" along with your where / id clause otherwise a malicious user could supply their own message IDs and wipe out another users inbox.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Users who have thanked tangoforce for this post:
doubledee (12-16-2012)