edmundk Posted April 19, 2012 Report Share Posted April 19, 2012 Hello Guys, I have just finished making a custom boarding pass for my Virtual Airline, on the bottom where it says Id Check In required etc.. Is there a way to have it change only if it is an international flight? Thanks, Edmundk Quote Link to comment Share on other sites More sharing options...
tutmeister Posted April 21, 2012 Report Share Posted April 21, 2012 There is no way for the system to know what an international flight is, so you'd have to add an indicator to each route in your database, probably by adding a column called `international` and adding Yes or No to each flight. You could also add a form field to the form where you add new routes, so this is created by default when you make new flights. Then you'd run a true/false query on the bidded flight's `international` column, and use an if/else statement to display what you want. Rough idea: <?php $connect = mysql_connect("localhost","username","password") or die("Unable to connect to MySQL Database"); $query = "SELECT * FROM phpvms_schedules WHERE bidid LIKE '$schedule->bidid'"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { if ($row['international'] == Yes) { echo "Check-in required."; } else { echo "Check-in not required."; } } ?> I've tested this and it works with an actual bidid in the SQL statement, but I run out of time today to figure out how to get it working using '$schedule->bidid' Perhaps someone else can contribute that part, as it has me a little stumped. 1 Quote Link to comment Share on other sites More sharing options...
edmundk Posted April 21, 2012 Author Report Share Posted April 21, 2012 Oh okay. I might be able to add that to each schedule. Thanks so much for the Php though! Edmundk Quote Link to comment Share on other sites More sharing options...
tutmeister Posted April 21, 2012 Report Share Posted April 21, 2012 You're welcome. It's a good idea, but someone smarter than myself with PHP needs to help out with the bidid part of the code, for it to be fully functional. 1 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.