flynryan692 Posted July 22, 2009 Share Posted July 22, 2009 I'm a bit of a n00b and the script I'm using is not 100% mine. It looks for stuff, like a booking script. When I pick a city the url changes from ?page=flights to ?from=Atlanta&#to "to" being the destination city. Well my site has a get statement on the index as you can see so ?page=flights is in the content folder as flights.php. I know in order for this to work it should say flights.php?from=Atlanta&#to in order to work, how would I change the get function in the script to work? Below is the get function in the script (i think thats it).. <? if ($from == ''){ Quote Link to comment Share on other sites More sharing options...
jayjay960 Posted July 22, 2009 Share Posted July 22, 2009 We'll need the whole script, that line tells us nothing. You would want it to go to ?page=flights&from=Atlanta#to. If you select the city using a dropdown box, it most likely uses a form with the method GET, in which case all you would need to do is add a hidden input element to that form like so: <input type="hidden" name="page" value="flights" /> Quote Link to comment Share on other sites More sharing options...
flynryan692 Posted July 22, 2009 Author Share Posted July 22, 2009 Thanks for the reply, here is the entire script for that part. <? if ($from == ''){ echo '<option value="">Please Select a City or Airport</option>'; } ?> <?php do { ?> <? if ($from == ''){ echo '<option value="?from='.$row_dep['dep_icao'].'&#to">'.$row_dep['dep_city'].'</option>'; } else { echo '<option value="?from='.$row_dep['dep_icao'].'&#to">'.$row_dep['dep_city'].'</option>'; } ?> 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.