It's pain in the *** with magic quote on on the share server, and I am giving up on upload another php.ini to overwrite the share host php.ini, because then other problem occurr, (PDO in configure but not loaded and ect) I tried .htaccess which give a 500 error.
so i have found this solution is pretty good and works well How to turn off magic quotes on shared hosting?
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) )
{
$_POST = array_map( 'stripslashes', $_POST );
$_GET = array_map( 'stripslashes', $_GET );
$_COOKIE = array_map( 'stripslashes', $_COOKIE );
}
Until i start to post array to the server
<select name="gropu[]">
<option value="1">2</option>
<option value="2">1</option>
<option value="3">3</option>
</select>
then i have the following errro
Warning: stripslashes() expects parameter 1 to be string, array given in index.php on line 18
Please help me on this, it really annoying me while developing something ok on the localhost and once upload to the server it just all wrong...