EchoFool Posted February 15, 2008 Share Posted February 15, 2008 I need help with a serial array feature. At the moment i have: $items=serialize($_POST['array']); //takes the data from a post operation... But i want to add a mysql_real_escape_string safety to it but how would it be written? do i have to put the serial in brackets after the mysql function ? $items=mysql_real_escape_string(serialize($_POST['array'])); < would that work ? Link to comment https://forums.phpfreaks.com/topic/91270-serialize-array/ Share on other sites More sharing options...
amites Posted February 15, 2008 Share Posted February 15, 2008 have you tried it? I recently was shown a fun one put $_REQUEST = array_map( 'mysql_real_escape_string', $_REQUEST ); at the beginning of your code, will run every $_REQUEST variable through the mysql_real_escape string function and leave them all intact Link to comment https://forums.phpfreaks.com/topic/91270-serialize-array/#findComment-467808 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.