Q695 Posted October 24, 2008 Share Posted October 24, 2008 Why isn't the following outputting several states when several states are being passed to it? if ($_POST['action']=1) { foreach ($_POST['state_id'] as $var => $value) { echo "$value<br />"; } } ??? Link to comment https://forums.phpfreaks.com/topic/129906-dumping-passed-data-between-pages/ Share on other sites More sharing options...
kenrbnsn Posted October 24, 2008 Share Posted October 24, 2008 The single "=" is for assignment, use the double "==" for comparison: <?php if ($_POST['action']==1) ?> Ken Link to comment https://forums.phpfreaks.com/topic/129906-dumping-passed-data-between-pages/#findComment-673463 Share on other sites More sharing options...
ranjuvs Posted October 24, 2008 Share Posted October 24, 2008 what type of field is state_id also please try this <?php foreach ($_POST as $var => $value) { echo "$value<br />"; } ?> Link to comment https://forums.phpfreaks.com/topic/129906-dumping-passed-data-between-pages/#findComment-673464 Share on other sites More sharing options...
Q695 Posted November 13, 2008 Author Share Posted November 13, 2008 state id was text, but i did solve it. Link to comment https://forums.phpfreaks.com/topic/129906-dumping-passed-data-between-pages/#findComment-689111 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.