FlyingIsFun1217 Posted July 11, 2008 Share Posted July 11, 2008 Hey! I've in the past used a drop-down, and retrieved the value for the item selected, forwarded to another page using that as part of the url. In the past, this has worked just fine, but now, it's not sending the values: <form action="eiAction.php"> <select name="newsToEdit" method="post"> <?php include('connectInfo.php'); include('createConnection.php'); $newsQuery = mysql_query('SELECT number, title, content FROM news ORDER BY number DESC'); while($newsData = mysql_fetch_array($newsQuery, MYSQL_ASSOC)) { $number = $newsData['number']; $title = $newsData['title']; echo '<option value="'.$number.'">'.$title.'</option>'; } include('closeConnection.php'); ?> </select> <br> <input type="submit" value="Get Contents"> </form> $number = $_POST['newsToEdit']; echo '<script type="text/javascript">'; echo 'window.location = "edit.php?post='.$number.'"'; echo '</script>'; Shouldn't this work? When I comment out the javascript redirect and echo back the value for $number, I just get a blank page. Thanks for the help again! FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/114349-solved-this-form-doesnt-submit/ Share on other sites More sharing options...
mbeals Posted July 11, 2008 Share Posted July 11, 2008 Move the method=post to the form tag (its in the select now) Quote Link to comment https://forums.phpfreaks.com/topic/114349-solved-this-form-doesnt-submit/#findComment-588041 Share on other sites More sharing options...
FlyingIsFun1217 Posted July 11, 2008 Author Share Posted July 11, 2008 Move the method=post to the form tag (its in the select now) Gah! Thanks... :-X FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/114349-solved-this-form-doesnt-submit/#findComment-588049 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.