Jump to content

Bording Pass


edmundk

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...