FlyingIsFun1217 Posted May 28, 2008 Share Posted May 28, 2008 Hey... again I'm attempting to gather the information from a dynamic select form. Here is what I currently have: delete.php: <?php echo '<center>'; echo '<h1><u>Delete a Photo</u></h1>'; echo '<form action="deletePicture.php" method="post">'; echo '<select name="photosInDirectory" id="photosInDirectory">'; foreach(glob('*.jpg') as $picForDropDown) { echo '<option value="'.$picForDropDown.'">'.$picForDropDown.'</option>'; } echo '</select>'; echo '<input type="submit" value="Delete">'; echo '</form>'; echo '</center>'; ?> and deletePicture.php: <?php $picureToDelete = $_POST['photosInDirectory']; echo $pictureToDelete; ?> Seems not to work though. Basically, I'd like to get the full value of the option they selected (either the value or the display name, doesn't matter right now). Thanks for the help again! FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/107702-solved-getting-select-form-info/ Share on other sites More sharing options...
FlyingIsFun1217 Posted May 28, 2008 Author Share Posted May 28, 2008 Somebody has to know... it just seems like it would be so simple :/ FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/107702-solved-getting-select-form-info/#findComment-552175 Share on other sites More sharing options...
.josh Posted May 28, 2008 Share Posted May 28, 2008 $pictureToDelete = $_POST['photosInDirectory']; Quote Link to comment https://forums.phpfreaks.com/topic/107702-solved-getting-select-form-info/#findComment-552178 Share on other sites More sharing options...
FlyingIsFun1217 Posted May 28, 2008 Author Share Posted May 28, 2008 I just noticed that RIGHT before I looked here wishing that nobody had yet replied. Thanks for your help though, I do appreciate it! FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/107702-solved-getting-select-form-info/#findComment-552181 Share on other sites More sharing options...
.josh Posted May 28, 2008 Share Posted May 28, 2008 if it makes you feel any better, I first read your thread about 2 minutes after you posted it (like an hour ago), tested and messed around with it for about 15 minutes and gave up, thinking wtf why isn't this working, it should be working?? And came back in when you bumped it and saw it right off the bat, lol. Quote Link to comment https://forums.phpfreaks.com/topic/107702-solved-getting-select-form-info/#findComment-552184 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.