m4x3vo Posted June 11, 2009 Share Posted June 11, 2009 $cookie = $_COOKIE["uid"]; for ($counter = 0; $counter <= 139; $counter++) { if ($options[$counter] != null) { $options2 = $_GET['options[$counter]']; mysql_query("UPDATE user_ach SET rank='$options2' WHERE ach_id='$counter' AND user_id='$cookie'") or die(mysql_error()); } } Thats my code. Im attempting to grab from a url the values of 139 textboxes. Some textboxes may not be filled out, the url looks something like this. .php?options[1]=343&options[2]=&options[3]=&options[4]=254&options[5]= It goes up to options[139]. My script is not working, anyone have any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/161868-solved-get-textbox-values-from-url/ Share on other sites More sharing options...
m4x3vo Posted June 11, 2009 Author Share Posted June 11, 2009 any help? Quote Link to comment https://forums.phpfreaks.com/topic/161868-solved-get-textbox-values-from-url/#findComment-854107 Share on other sites More sharing options...
m4x3vo Posted June 12, 2009 Author Share Posted June 12, 2009 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/161868-solved-get-textbox-values-from-url/#findComment-854177 Share on other sites More sharing options...
haku Posted June 12, 2009 Share Posted June 12, 2009 Not that patient are you. Try this: $options = $_GET['options']; for ($counter = 0; $counter <= 139; $counter++) { $option = $options[$counter]; $sql = "UPDATE whatever SET whatever=something WHERE whatever = '" . $option . '"'; // and so on } Quote Link to comment https://forums.phpfreaks.com/topic/161868-solved-get-textbox-values-from-url/#findComment-854193 Share on other sites More sharing options...
m4x3vo Posted June 12, 2009 Author Share Posted June 12, 2009 No luck yet, any help. Quote Link to comment https://forums.phpfreaks.com/topic/161868-solved-get-textbox-values-from-url/#findComment-854679 Share on other sites More sharing options...
m4x3vo Posted June 13, 2009 Author Share Posted June 13, 2009 got it wrkin ty Quote Link to comment https://forums.phpfreaks.com/topic/161868-solved-get-textbox-values-from-url/#findComment-854857 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.