Jump to content

Eskimo887

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Eskimo887's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi everyone, I am in the process of designing a website using CSS and <div> tags for the layout and have run into a couple problems, any assistance would be appreciated. First off, I wish to put two different images on the left and right sides of the screen, extending to the bottom.  I can position the left one correctly, but am having trouble with the right. [url=http://img241.imageshack.us/img241/3154/websitecopyfp2.jpg]http://img241.imageshack.us/img241/3154/websitecopyfp2.jpg[/url].  This is a mockup I did in Photoshop, the shadows to the left and right of screen are what I'm trying to achieve. The CSS I have so far that I believe doesn't work: For some reason they're not showing up at all now. [code] #LeftShadow { width: 50px; background-image: url(images/left.jpg); background-repeat: repeat-y; background-position: 28px; height: 100%; float: left; } #RightShadow { width: 50px; background-image: url(images/right.jpg); background-repeat: repeat-y; height: 100%; background-position: 100px; float: right; } [/code] And the actual HTML: [code] <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body bgcolor="#eeeef0"> <form id="Main" runat="server"> <div id="LeftShadow"> <div id="RightShadow"> ...Rest of Code... </div> </div> </form> </body> </html> [/code] Secondly, as can be seen from the above picture, I have a 3 column layout with a footer.  All three columns are fixed widths, but I wish for them all the be the same height, so that they are all the height of the column with the longest amount of content.  I have read several articles of Feux tables and such, but they are quite confusing and a simple answer would be good. Again, the CSS for the column section: [code] #LeftCol { position: absolute; top: 360px; left: 75px; background-color: #a8b0b3; width: 157px; height: auto; } #CentreCol { position: absolute; top: 360px; left: 232px; background-color: #ffffff; width: 536px; height: auto; } #RightCol { position: absolute; top: 360px; left: 768px; background-color: #a8b0b3; width: 157px; height: auto; } [/code] And the relevent section of HTML code: [code] <div id="LeftCol"> blah blah blah </div> <div id="CentreCol"> blah blah blah </div> <div id="RightCol">   blah blah blah </div> [/code] Again, any assistance would be appreciated. Thanks in advance. :)
  2. Hmm, tis odd. Perhaps the best way to show you what's going on is for you to see for yourself... [url=http://southerncrossairlines.ausvirtual.com/New%20Site/Complete/join2.php]http://southerncrossairlines.ausvirtual.com/New%20Site/Complete/join2.php[/url] This is my join page, feel free to go there and sign up.  I suggest you sign up twice and activate only one of them to see what's happening. It is logging in the activated one know, and not logging in the unactivated one.  But, if I have tried logging in when unacticated, I get the "activation required" at the top.  If you then log in with the activated one, then try logging out, it gives a "headers already sent error", which you don't get if you don't try logging in with the unactivated one first. I know that seems complicated, but go to the link above and have a look for yourself.
  3. My join form (which I'm guessing you're all farmiliar with now) now sends the user an activation code.  This, when clicked sets the activation column on the table from 0 to 1.  This bit works fine, however, when I get to logging in, obviously you don't want someone logging in you isn't activated, so I've used an IF statement as below: [code] /** * Checks to see if the user has submitted his * pid and password through the login form, * if so, checks authenticity in database and * creates session. */ if(isset($_POST['sublogin'])){ $l = mysql_connect ( "" , "" , "" ) or die("Error connecting: <br><br>".mysql_error()); mysql_select_db( "" ) or die("Error getting db: <br><br>".mysql_error()); $username = trim(addslashes($_POST['pid'])); $password = md5(trim($_POST['password'])); $query = mysql_query("SELECT * FROM roster WHERE pid = '$username' AND password = '$password' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_array($query); // now we check if they are activated if($row['Activated'] > 0) {   /* Check that all fields were typed in */   if(!$_POST['pid'] || !$_POST['password']){       die('You didn\'t fill in a required field.');   }   /* Spruce up pid, check length */   $_POST['pid'] = trim($_POST['pid']);   if(strlen($_POST['pid']) > 30){       die("Sorry, the pid is longer than 30 characters, please shorten it.");   }   /* Checks that pid is in database and password is correct */   $md5pass = md5($_POST['password']);   $result = confirmUser($_POST['pid'], $md5pass);   /* Check error codes */   if($result == 1){       die('That pid doesn\'t exist in our database.');   }   else if($result == 2){       die('Incorrect password, please try again.');   }   /* pid and password correct, register session variables */   $_POST['pid'] = stripslashes($_POST['pid']);   $_SESSION['pid'] = $_POST['pid'];   $_SESSION['password'] = $md5pass;   /**     * This is the cool part: the user has requested that we remember that     * he's logged in, so we set two cookies. One to hold his pid,     * and one to hold his md5 encrypted password. We set them both to     * expire in 100 days. Now, next time he comes to our site, we will     * log him in automatically.     */   //if(isset($_POST['remember'])){       setcookie("cookname", $_SESSION['pid'], time()+60*60*24*100, "/");       setcookie("cookpass", $_SESSION['password'], time()+60*60*24*100, "/");   //}   /* Quick self-redirect to avoid resending data on refresh */   echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";   return; } /* Sets the value of the logged_in variable, which can be used in your code */ $logged_in = checkLogin(); } else { echo "activation required"; } ?> [/code] This is just the part which runs when the user submits the form.  Without the activation part, it runs fine and logs in the user.  However, with the activation part, it will say "activation required" if they are not activted, but doesn't log in if they are, just refreshes the page and stays as a log in form. I think it's probably to do with misplacement of brackets, but I'm not sure where they should go.  The entire login script is below: [code] <? /** * Checks whether or not the given pid is in the * database, if so it checks if the given password is * the same password in the database for that user. * If the user doesn't exist or if the passwords don't * match up, it returns an error code (1 or 2). * On success it returns 0. */ function confirmUser($pid, $password){   global $conn;   /* Add slashes if necessary (for query) */   if(!get_magic_quotes_gpc()) { $pid = addslashes($pid);   }   /* Verify that user is in database */   $q = "select password from roster where pid = '$pid'";   $result = mysql_query($q,$conn);   if(!$result || (mysql_numrows($result) < 1)){       return 1; //Indicates pid failure   }   /* Retrieve password from result, strip slashes */   $dbarray = mysql_fetch_array($result);   $dbarray['password']  = stripslashes($dbarray['password']);   $password = stripslashes($password);   /* Validate that password is correct */   if($password == $dbarray['password']){       return 0; //Success! pid and password confirmed   }   else{       return 2; //Indicates password failure   } } /** * checkLogin - Checks if the user has already previously * logged in, and a session with the user has already been * established. Also checks to see if user has been remembered. * If so, the database is queried to make sure of the user's * authenticity. Returns true if the user has logged in. */ function checkLogin(){   /* Check if user has been remembered */   if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpass'])){       $_SESSION['pid'] = $_COOKIE['cookname'];       $_SESSION['password'] = $_COOKIE['cookpass'];   }   /* pid and password have been set */   if(isset($_SESSION['pid']) && isset($_SESSION['password'])){       /* Confirm that pid and password are valid */       if(confirmUser($_SESSION['pid'], $_SESSION['password']) != 0){         /* Variables are incorrect, user not logged in */         unset($_SESSION['pid']);         unset($_SESSION['password']);         return false;       }       return true;   }   /* User not logged in */   else{       return false;   } } /** * Determines whether or not to display the login * form or to show the user that he is logged in * based on if the session variables are set. */ function displayLogin(){   global $logged_in;   if($logged_in){   //$row2 = mysql_result($result, 0);   ?> <link href="images/mm_entertainment.css" rel="stylesheet" type="text/css" /> <p align="center"><span class="pageName">Logged In!</span></p> <p align="center">  Welcome <b><?php $pid=$_SESSION["pid"]; $result = mysql_query("SELECT first_name FROM roster WHERE pid='$pid'"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit();  } echo(mysql_result($result,0));//echo($_SESSION[pid]); ?></b>, you are logged in. <a href="logout.php">Logout</a>   <?php   }   else{ ?> </p> </p> <link href="images/mm_entertainment.css" rel="stylesheet" type="text/css" /> <form action="" method="post">   <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr>   <td colspan="2" class="pageName"><div align="center">Login</div></td>   </tr> <tr><td class="bodyText">Pilot ID:</td><td><input type="text" name="pid" maxlength="3" size="15"></td></tr> <tr><td>Password:</td><td><input type="password" name="password" maxlength="20" size="15"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="sublogin" value="Login"></td></tr> </table> </form> <?   } } /** * Checks to see if the user has submitted his * pid and password through the login form, * if so, checks authenticity in database and * creates session. */ if(isset($_POST['sublogin'])){ $l = mysql_connect ( "" , "" , "" ) or die("Error connecting: <br><br>".mysql_error()); mysql_select_db( "" ) or die("Error getting db: <br><br>".mysql_error()); $username = trim(addslashes($_POST['pid'])); $password = md5(trim($_POST['password'])); $query = mysql_query("SELECT * FROM roster WHERE pid = '$username' AND password = '$password' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_array($query); // now we check if they are activated if($row['Activated'] > 0) {   /* Check that all fields were typed in */   if(!$_POST['pid'] || !$_POST['password']){       die('You didn\'t fill in a required field.');   }   /* Spruce up pid, check length */   $_POST['pid'] = trim($_POST['pid']);   if(strlen($_POST['pid']) > 30){       die("Sorry, the pid is longer than 30 characters, please shorten it.");   }   /* Checks that pid is in database and password is correct */   $md5pass = md5($_POST['password']);   $result = confirmUser($_POST['pid'], $md5pass);   /* Check error codes */   if($result == 1){       die('That pid doesn\'t exist in our database.');   }   else if($result == 2){       die('Incorrect password, please try again.');   }   /* pid and password correct, register session variables */   $_POST['pid'] = stripslashes($_POST['pid']);   $_SESSION['pid'] = $_POST['pid'];   $_SESSION['password'] = $md5pass;   /**     * This is the cool part: the user has requested that we remember that     * he's logged in, so we set two cookies. One to hold his pid,     * and one to hold his md5 encrypted password. We set them both to     * expire in 100 days. Now, next time he comes to our site, we will     * log him in automatically.     */   //if(isset($_POST['remember'])){       setcookie("cookname", $_SESSION['pid'], time()+60*60*24*100, "/");       setcookie("cookpass", $_SESSION['password'], time()+60*60*24*100, "/");   //}   /* Quick self-redirect to avoid resending data on refresh */   echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";   return; } /* Sets the value of the logged_in variable, which can be used in your code */ $logged_in = checkLogin(); } else { echo "activation required"; } ?> [/code]
  4. A form on my website uses several drop down boxes. One to select an id number from a list retrived by a query. The others to get a start and stop time.  Using two for each, one for hours, one for minutes. I already have some validation code which works fine, however, I can't seem to be able to use > or < mathematical signs with the times (ie, the start time must be < than the stop time). Also, I have [code]value="<? echo $name; ?>"[/code] in each of the fields to re-insert the data as it gets erased if the form isn't correct.  How do I do the same for the drop downs? I hope this makes sense. [code] <? // only validate form when form is submitted if(isset($Submit)){       $error_msg='';       if(trim($starttime)==(trim($stopttime))) { //drop down           $error_msg.="starttime cannot equal stop time.<br>";       }       if(trim($starttime)>(trim($stopttime))) {  //drop down           $error_msg.="starttime cannot be greater than stop time.<br>";       }       if(trim($startfuel)<(trim($stopfuel))) { //text field           $error_msg.="Departure fuel cannot be less than arrival fuel<br>";       }       if(trim($id)=="sca") { //query powered drop down (this one works, but doesn't re-select the option           $error_msg.="Please select the id number.<br>";       } [/code] [url=http://southerncrossairlines.ausvirtual.com/New%20Site/Complete/validation/Untitled-1.php]http://southerncrossairlines.ausvirtual.com/New%20Site/Complete/validation/Untitled-1.php[/url]
  5. It's working now, I got the answer from another forum, it was just encasing the queries with {} is seems.
  6. I have changed the column name to "date" and I'm still getting the same error.  I also used join_date with the same effect.
  7. I have a join form on my website which adds the current date to the database so I know when people have joined. For this, my INSERT query looks like: [code] $sql = "INSERT INTO roster SET " . "first_name='$first', " . "last_name='$last', " . "email='$email', " . "password='$password', " . "join=CURDATE()";[/code] But, when I submit the form, I get the error: [quote]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'join=CURDATE()' at line 1[/quote] What is wrong with my syntax, as I have another INSERT query that uses exactly the same thing.
  8. Yes, I forgot the session_start(); at the top of the page....it works now.  :-[
  9. PHP may be case sensitive, but my typing isn't.  I do have the $_SESSION as caps.  :P
  10. On my website, users can log in and their id is stored in a session.  I want to insert this id, when they fill in a form, as a row in the database. Eg. member_id    opinion       1              7 Where the member_id is [i]not[/i] typed in by the user, but is inserted using the session variable. I have tried a couple different methods: 1. Putting the session as a local variable - $id = $_session['id']; Then in the insert query - INSERT INTO members SET " . "member_id='$id'"; 2. Having the $session['id']; straight in the insert queyr - INSERT INTO members SET " . "id='$_session['id']"; But neither of these methods work. My id column is set as an integer, and so it only shows a 0 on every row.  I have also tried text and VARCHAR with the same negative result. What can I do to make this thing work?
  11. Cheers mate, BTW, the third question was how to do time calculations, or will adding $time=date("h:i:s"); do that automatically?
  12. Bump to get it to the top as there was been a lot of other posts.
  13. I have a log in script on my web site, using a modified version of the tutorial on this site. I have copied to same script to multiple pages, as I want the log in text boxes or the message 'you are logged in' to be on every page, I can log in on one page perfectly, however, when I goto the second page, I need to log in again, and when I go back to the first page I need to log in again. I am using normal hyperlinks for both. My second question, I am using phpMyAdmin to administer my database, in one table I have a time field. The default value seems to be HH:MM:SS, but as I want to use the field in a formula on one of my pages (to work out the time taken between two time fields, I need to be able to only have HH:MM (eg, 13:00 or just 1300). Also, what is the best way to do calculations with times as it is currently working it out as if it were just a number. Log in: [a href=\"http://southerncrossairlines.ausvirtual.com/New%20Site/index.php\" target=\"_blank\"]http://southerncrossairlines.ausvirtual.co...0Site/index.php[/a] Username - 33 Password - test code for index.php [code]<?php // database connect script. require 'db_connect.php'; //if($logged_in == 1) {     //die('You are already logged in, '.$_SESSION['pid'].'.'); //} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php if (isset($_POST['submit'])) { // if form has been submitted     /* check they filled in what they were supposed to and authenticate */     if(!$_POST['pid'] | !$_POST['password']) {         die('You did not fill in a required field.');     }     // authenticate.     if (!get_magic_quotes_gpc()) {         $_POST['pid'] = addslashes($_POST['pid']);     }     $check = $db_object->query("SELECT pid, password FROM roster WHERE pid = '".$_POST['pid']."'");     if (DB::isError($check) || $check->numRows() == 0) {         die('That username does not exist in our database.');     }     $info = $check->fetchRow();     // check passwords match     $_POST['password'] = stripslashes($_POST['password']);     $info['password'] = stripslashes($info['password']);     //$_POST['password'] = md5($_POST['password']);     if ($_POST['password'] != $info['password']) {         die('Incorrect password, please try again.');              }     // if we get here username and password are correct,     //register session variables and set last login time.     $date = date("d.m.Y");     $update_login = $db_object->query("UPDATE roster SET last_online='$date' WHERE pid = '".$_POST['pid']."'");     $_POST['pid'] = stripslashes($_POST['pid']);     $_SESSION['pid'] = $_POST['pid'];     $_SESSION['password'] = $_POST['password'];     $db_object->disconnect();   // Connect to the database server     $dbcnx = @mysql_connect("mysql12.servage.net","sca","harmony");         if (!$dbcnx) {             echo( "<P>Unable to connect to the " . "database server at this time.</P>" );             exit();  }   // Select the jokes database         if (! @mysql_select_db("sca") ) {             echo( "<P>Unable to locate the " . "database at this time.</P>" );             exit();  }   // Request the text of all the jokes     $result = mysql_query("SELECT first_name, pid FROM roster WHERE pid = '".$_POST['pid']."'");         if (!$result) {             echo("<P>Error performing query: " . mysql_error() . "</P>");             exit();  }                    // Display the text of each joke in a paragraph    $row = mysql_fetch_array($result)     ?> <center> <h3 align="center">Logged in</h3> <p align="center">Welcome back <?php echo($row["first_name"]);?>, you are logged in.</p> <form id="form1" name="form1" method="post" action="logout.php">   <label>   <center><input name="logout" type="submit" id="logout" value="Log Out" /></center>   </label> </form> <p class="sidebarHeader">   <?php } else {    // if form hasn't been submitted ?><center><h3>Login</h3></p> </center> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">   <table align="center" border="1" cellspacing="0" cellpadding="3"> <tr><td>Username:</td><td> <input name="pid" type="text" size="10" maxlength="5"> </td></tr> <tr><td>Password:</td><td> <input name="password" type="password" size="10" maxlength="20"> </td></tr> <tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Login"> </td></tr> </table> </form> <?php } ?> <a href="about.php">about</a> </body> </html> [/code] db_connect.php: [code]<?php //require the PEAR::DB classes. require_once 'DB.php'; $db_engine = '*****'; $db_user = '*****'; $db_pass = '******'; $db_host = '*******'; $db_name = '*******'; $datasource = $db_engine.'://'.               $db_user.':'.               $db_pass.'@'.                $db_host.'/'.                 $db_name; $db_object = DB::connect($datasource, TRUE); /* assign database object in $db_object, if the connection fails $db_object will contain the error message. */ // If $db_object contains an error: // error and exit. if(DB::isError($db_object)) {     die($db_object->getMessage()); } $db_object->setFetchMode(DB_FETCHMODE_ASSOC); // we write this later on, ignore for now. include('check_login.php'); ?> [/code] check_login.php [code]<?php /* check login script, included in db_connect.php. */ //session_start(); if (!isset($_SESSION['pid']) || !isset($_SESSION['password'])) {     $_SESSION["logged_in"] = 0;     return; } else {     // remember, $_SESSION['password'] will be encrypted.     if(!get_magic_quotes_gpc()) {         $_SESSION['pid'] = addslashes($_SESSION['pid']);     }     // addslashes to session username before using in a query.     $pass = $db_object->query("SELECT password FROM roster WHERE pid = '".$_SESSION['pid']."'");     if(DB::isError($pass) || $pass->numRows() != 1) {         $_SESSION["logged_in"] = 0;         unset($_SESSION['pid']);         unset($_SESSION['password']);         // kill incorrect session variables.     }     $db_pass = $pass->fetchRow();     // now we have encrypted pass from DB in     //$db_pass['password'], stripslashes() just incase:     $db_pass['password'] = stripslashes($db_pass['password']);     $_SESSION['password'] = stripslashes($_SESSION['password']);     //compare:     if($_SESSION['password'] == $db_pass['password']) {         // valid password for username         $logged_in = 1; // they have correct info                     // in session variables.     } else {         $_SESSION["logged_in"] = 0;         unset($_SESSION['pid']);         unset($_SESSION['password']);         // kill incorrect session variables.     } } // clean up unset($db_pass['password']); $_SESSION['pid'] = stripslashes($_SESSION['pid']); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> </body> </html> [/code] Page which uses time: [a href=\"http://southerncrossairlines.ausvirtual.com/New%20Site/log.php?pirepview=1&pirep_id=2\" target=\"_blank\"]http://southerncrossairlines.ausvirtual.co...ew=1&pirep_id=2[/a] Code: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <p>   <?php   // Connect to the database server     $dbcnx = @mysql_connect("***********","*******","***");         if (!$dbcnx) {             echo( "<P>Unable to connect to the " . "database server at this time.</P>" );             exit();  }   // Select the routes database         if (! @mysql_select_db("*******") ) {             echo( "<P>Unable to locate the " . "database at this time.</P>" );             exit();  }   // Run query to select details of last 50 pireps, pilot, airports and aircraft       $pirepvar = $_REQUEST['pirep_id'];     $pirep = "SELECT pirep.id, pirep.pid, pirep.flightid, pirep.date, routes.departure, routes.arrival, routes.flight_number,         routes.aircraft, roster.first_name, roster.last_name, roster.pid                 FROM pirep, routes, roster                     WHERE pirep.flightid = routes.flight_number AND                             pirep.pid = roster.pid";     $pirepresult = mysql_query($pirep);     if (!$pirepresult) {             echo("<P>Error performing query: " . mysql_error() . "</P>");             exit();  }              // For individual pirep     $indpirep = "SELECT pirep.id, pirep.pid, pirep.flightid, pirep.deptime, pirep.arrtime, pirep.depfuel, pirep.arrfuel, pirep.pax, pirep.cargo, pirep.comments, pirep.date, routes.departure, routes.arrival, routes.flight_number, routes.aircraft, roster.first_name, roster.last_name, roster.pid, (pirep.arrtime-pirep.deptime) AS totaltime, (pirep.depfuel-pirep.arrfuel) AS totalfuel                 FROM pirep, routes, roster                     WHERE pirep.flightid = routes.flight_number AND                             pirep.pid = roster.pid AND                                 pirep.id = '$pirepvar'                             GROUP BY pirep.date DESC";     $indpirepresult = mysql_query($indpirep);     if (!$indpirepresult) {             echo("<P>Error performing query: " . mysql_error() . "</P>");             exit();  } // If one of the links has been clicked, display this instead if (isset($_GET['pirepview'])): while ( $row = mysql_fetch_array($indpirepresult) ) { ?> <table border="1">   <tr>     <td>PIREP <br /><?php echo($row["id"]); ?></td>     <td colspan="2">Pilot<br /><?php echo($row["first_name"]); ?> <?php echo($row["last_name"]); ?></td>   </tr>   <tr>     <td>Date<br /><?php echo($row["date"]); ?></td>     <td>Flight No.<br /><?php echo($row["flightid"]); ?> </td>     <td>Aircraft<br /><?php echo($row["aircraft"]); ?></td>   </tr>   <tr>     <td>Departure Airport<br /><?php echo($row["departure"]); ?> </td>     <td>Departure Time <br /><?php echo($row["deptime"]); ?></td>     <td>Departure Fuel<br /><?php echo($row["depfuel"]); ?> </td>   </tr>   <tr>     <td>Arrival Airport<br /><?php echo($row["arrival"]); ?> </td>     <td>Arrival Time<br /><?php echo($row["arrtime"]); ?> </td>     <td>Arrival Fuel<br /><?php echo($row["arrfuel"]); ?> </td>   </tr>   <tr>     <td rowspan="2"> </td>     <td>Total Time<br /><?php echo($row["totaltime"]); ?> </td>     <td>Total Fuel<br /><?php echo($row["totalfuel"]); ?> </td>   </tr>   <tr>     <td>Passengers<br /><?php echo($row["pax"]); ?></td>     <td>Cargo<br /><?php echo($row["cargo"]); ?></td>   </tr>   <tr>     <td colspan="3">Comments<br /><?php echo($row["comments"]); ?></td>   </tr> </table> <p> <?php } else: ?> </p> <p> </p> <table border="0">   <tr>     <td colspan="6"><div align="center">Last 50 PIREPs </div></td>   </tr>   <tr>     <td>Date</td>     <td>Flight No. </td>     <td>Flown by </td>     <td>Aircraft</td>     <td>Departure</td>     <td>Arrival</td>   </tr>   <?php while ( $row = mysql_fetch_array($pirepresult) ) { ?>   <tr>     <td><?php echo '<a href="' . $_SERVER['PHP_SELF'] . '?pirepview=1&pirep_id=' . $row["id"] . '">' . ($row["date"]) . '</a>'; ?></td>     <td><?php echo($row["flightid"]); ?></td>     <td><?php echo($row["first_name"]); ?> <?php echo($row["last_name"]); ?></td>     <td><?php echo($row["aircraft"]); ?></td>     <td><?php echo($row["departure"]); ?></td>     <td><?php echo($row["arrival"]); ?></td>   </tr>   <?php } endif; ?> </table> <p> </p> </body> </html> [/code] I think that's everything of importance. Any ideas would be appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.