my code-
$order[$j][1]=$q16;
<input typ开发者_如何学Ce="hidden" name="hdnOrder" value="<?php echo htmlentities(serialize($order)); ?>">
on my next page-
$order = array_map('mysql_real_escape_string', unserialize($_REQUEST['hdnOrder']));
it gives me the following error-
Warning: array_map() [function.array-map]: Argument #2 should be an array
I want order value in array form because of-
foreach($order as $row)
Your problem is the htmlentities()
you are doing on the data.
Use htmlspecialchars(serialize($order), ENT_QUOTES)
instead and do a htmlspecialchars_decode()
afterwards.
$order = array_map('mysql_real_escape_string',
unserialize(htmlspecialchars_decode($_REQUEST['hdnOrder'], ENT_QUOTES)));
You should use urldecode/urlencode instead of htmlentities.
精彩评论