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 />"; } } ??? Quote Link to comment 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 Quote Link to comment 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 />"; } ?> Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.