Jump to content

vasoftwaresolutions

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Posts posted by vasoftwaresolutions

  1. I have this system where it inserts a copy of an entry from another table i have but iwith the user's name in it....

     

    but its just putting there info not the whole thing in it... i have set up an acount for testing which you can view here http://bluewavesvirtual.com/index1.php user is BWA1015 password is 1234567890... you need to then click on "place a bid" the click "place "... it will bring you to here http://bluewavesvirtual.com/pilot-bidview.php?id=1 then you click place bid and it is suppost to insert it into the database but it does that but only the session varibles... here is the scripts for each page

    **the database info is different than the real ones

     

    ANY HELP Is Grately Apprechated (i cant spell)

     

    Pilot View Bid.php

    <?php $pagename = "File Current Bid"; ?>
    <?php
    $host="localhost"; // Host name 
    $username="pacifij1_blue"; // Mysql username 
    $password="8336994895"; // Mysql password 
    $db_name="pacifij1_blue"; // Database name 
    $tbl_name="pilot"; // Table name 
    
    
    
    
    session_start();
    
    
    if(!session_is_registered('callsign') AND !session_is_registered('pwd') AND !session_is_registered('first_name') AND !session_is_registered('last_name')){ 
    
    header( 'Location: http://bluewavesvirtual.com/');
    
    exit();
    
    }
    
    $hostname = "localhost";   
    $database = "pacifij1_blue"; 
    $username = "pacifij1_blue"; 
    $password = "8336994895"; 
    $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); 
    
    $callsign = $_SESSION['callsign']; 
    
    
    
    mysql_select_db($database, $vrbo);
    $query_pilots = "SELECT * FROM pilot where callsign = '$callsign'";
    $pilots = mysql_query($query_pilots, $vrbo) or die(mysql_error());
    $row_pilots = mysql_fetch_assoc($pilots);
    $totalRows_pilots = mysql_num_rows($pilots);
    
    $id = $_GET['id']; 
    
    mysql_select_db($database, $vrbo);
    $query_bids = "SELECT * FROM flights WHERE id = '$id'";
    $bids = mysql_query($query_bids, $vrbo) or die(mysql_error());
    $row_bids = mysql_fetch_assoc($bids);
    $totalRows_bids = mysql_num_rows($bids);
    
    
    ?>
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Blue Waves Virtual Airlines :: <?php echo $pagename; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    .style2 {color: #808080}
    -->
    </style>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    </head>
    
    <body>
    <div align="center">
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/toplayer.jpg" width="800" height="20"></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="banners/banners.jpg" width="800" height="150"></td>
        </tr>
      </table>
    <?php include("includes/pilotmainmenu.php"); ?>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
        
          <td width="144"><p align="center"> </p>
            <p align="center"> </p>
            <p align="center">First Name: <?php echo $row_pilots['first_name']; ?></p>
            <p align="center">Last Name: <?php echo $row_pilots['last_name']; ?></p>
            <p align="center">City: <?php echo $row_pilots['city']; ?></p>
            <p align="center">State: <?php echo $row_pilots['state']; ?></p>
            <p align="center">Country: <?php echo $row_pilots['country']; ?></p>
            <p align="center">About: <?php echo $row_pilots['about']; ?></p>
            <p align="center">Hours:
              <?php
    		  
    		  $last_name = $row_pilots['last_name']; 
    
    		  
    
    		mysql_select_db($database, $vrbo);
    $tt = 0;
    $midnight = strtotime(date('Y-m-d') . ' 00:00:00');
    
    
    
    mysql_select_db($database, $vrbo);
    $query_h = "SELECT ete FROM pireps WHERE last_name = '$last_name' and approved = '1'";
    $h = mysql_query($query_h, $vrbo) or die(mysql_error());
    
    
    while($r = mysql_fetch_assoc($h))
    $tt += strtotime($r['duration']) - $midnight;
    $hours = floor($tt/3600);
    $x = $tt - floor($tt/3600)*3600;
    $mins = floor($x/60);
    $secs = $x - floor($x/60) * 60;
    echo  $hours . ':' . $mins;
    ?>
            </p>
            <p align="center"><a href="pilot-edit_profile.php" class="linkblue">EDIT</a></p>
            <p> </p>
            <p>          </p>
          <p> </p></td>
          <td width="556"><p align="center">
              <p align="center">
                <?php include("includes/pilotmenu.php"); ?>
            <p><form id="bid" action="pilot-bid-place.php" ></p>
              <p>Aircraft: <span id="sprytextfield2">
              <label>
              <input type="text" readonly name="aircraft" id="aircraft" value="<?php echo $row_bids['aircraft']; ?>">
              </label>
              <span class="textfieldRequiredMsg">A value is required.</span></span></p>
              <p>Flight Number:          <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="flight_number" id="flight_number" value="<?php echo $row_bids['flight_number']; ?>">
                </label>
                <span class="textfieldRequiredMsg">A value is required.</span></span></p>
              <p>From Airport: <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="from_airport" id="from_airport" value="<?php echo $row_bids['from_airport']; ?>">
                </label>
                <span class="textfieldRequiredMsg">A value is required.</span></p>
              <p>To Airport: <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="to_airport" id="to_airport" value="<?php echo $row_bids['to_airport']; ?>">
                </label>
                <span class="textfieldRequiredMsg">A value is required.</span></p>
              <p>From Airport ICAO: <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="from_icao" id="from_icao" value="<?php echo $row_bids['from_icao']; ?>">
                </label>
                <span class="textfieldRequiredMsg">A value is required.</span></p>
              <p>To Airport ICAO: <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="to_icao" id="to_icao" value="<?php echo $row_bids['to_icao']; ?>">
                </label>
                <span class="textfieldRequiredMsg">A value is required.</span></p>
              <p>ETE: <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="ete" id="ete" value="<?php echo $row_bids['ete']; ?>">
                </label>
              <span class="textfieldRequiredMsg">A value is required.</span></p>
              <p>Route: <span id="sprytextfield1">
                <label>
                <input type="text" readonly name="route" id="route" value="<?php echo $row_bids['route']; ?>">
                </label>
              <span class="textfieldRequiredMsg">A value is required.</span></p>
              <p>
                <label>
                <input type="submit" class="button" name="submit" id="submit" value="File Bid!">
                </label>
              </p>
            </form>
    <p align="center"> </p>
            <p><br>
          </p></td>
          <td width="100">Hello <?php echo $row_pilots['first_name']; ?>,  Welcome</p>
          <p><a href="logout.php" class="linkblue">Logout</a>
            <p></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><font color="#808080">©2008 Blue Waves Virtual 
              Airlines. Logos And Slogans And All Other Property 
              Are Part Of Blue Waves Virtual Airlines And May Never Be Redestributed. 
          All Rights Reserved.</font></div></td>
        </tr>
        <tr>
          <td><img src="images/bottomlayer.jpg" width="800" height="50"></td>
        </tr>
      </table>
      <p> </p>
      <p>  </p>
    </div>
    <script type="text/javascript">
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    //-->
    </script>
    </body>
    </html>
    

     

    pilot-bid-place.php

    <?php $pagename = "File Current Bid"; ?>
    <?php
    $host="localhost"; // Host name 
    $username="pacifij1_blue"; // Mysql username 
    $password="8336994895"; // Mysql password 
    $db_name="pacifij1_blue"; // Database name 
    $tbl_name="pilot"; // Table name 
    
    
    
    
    session_start();
    
    
    if(!session_is_registered('callsign') AND !session_is_registered('pwd') AND !session_is_registered('first_name') AND !session_is_registered('last_name')){ 
    
    header( 'Location: http://bluewavesvirtual.com/');
    
    exit();
    
    }
    
    $hostname = "localhost";   
    $database = "pacifij1_blue"; 
    $username = "pacifij1_blue"; 
    $password = "8336994895"; 
    $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); 
    
    $callsign = $_SESSION['callsign']; 
    $last_name = $_SESSION['last_name']; 
    
    
    
    
    $hostname = "localhost";   
    $database = "pacifij1_blue"; 
    $username = "pacifij1_blue"; 
    $password = "8336994895"; 
    $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); 
    
    $aircraft = $_POST['aircraft'];
    $flight_number = $_POST['flight_number'];
    $from_airport = $_POST['from_airport'];
    $to_airport = $_POST['to_airport'];
    $from_icao = $_POST['from_icao'];
    $to_icao = $_POST['to_icao'];
    $ete = $_POST['ete'];
    $route = $_POST['route'];
    
    mysql_select_db($database, $vrbo);
    $query_in = "INSERT INTO pireps (callsign, last_name, aircraft, flight_number, from_airport, to_airport, from_icao, to_icao, ete, route) VALUES ('$callsign', '$last_name', '$aircraft', '$flight_number', '$from_airport', '$to_airport', '$from_icao', '$to_icao', '$ete', '$route')";
    $in = mysql_query($query_in, $vrbo) or die(mysql_error());
    
    
    ?> 
    
    
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Blue Waves Virtual Airlines :: <?php echo $pagename; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    .style2 {color: #808080}
    -->
    </style>
    </head>
    
    <body>
    <div align="center">
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/toplayer.jpg" width="800" height="20"></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="banners/banners.jpg" width="800" height="150"></td>
        </tr>
      </table>
    <?php include("includes/pilotmainmenu.php"); ?>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
        
          <td width="144"><p align="center"> </p>
            <p align="center"> </p>
            <p align="center">First Name: <?php echo $row_pilots['first_name']; ?></p>
            <p align="center">Last Name: <?php echo $row_pilots['last_name']; ?></p>
            <p align="center">City: <?php echo $row_pilots['city']; ?></p>
            <p align="center">State: <?php echo $row_pilots['state']; ?></p>
            <p align="center">Country: <?php echo $row_pilots['country']; ?></p>
            <p align="center">About: <?php echo $row_pilots['about']; ?></p>
            <p align="center">Hours:
              <?php
    		  
    		  $last_name = $row_pilots['last_name']; 
    
    		  
    
    		mysql_select_db($database, $vrbo);
    $tt = 0;
    $midnight = strtotime(date('Y-m-d') . ' 00:00:00');
    
    
    
    mysql_select_db($database, $vrbo);
    $query_h = "SELECT ete FROM pireps WHERE last_name = '$last_name' and approved = '1'";
    $h = mysql_query($query_h, $vrbo) or die(mysql_error());
    
    
    while($r = mysql_fetch_assoc($h))
    $tt += strtotime($r['duration']) - $midnight;
    $hours = floor($tt/3600);
    $x = $tt - floor($tt/3600)*3600;
    $mins = floor($x/60);
    $secs = $x - floor($x/60) * 60;
    echo  $hours . ':' . $mins;
    ?>
            </p>
            <p align="center"><a href="pilot-edit_profile.php" class="linkblue">EDIT</a></p>
            <p> </p>
            <p>          </p>
          <p> </p></td>
          <td width="556"><p> </p>
            <p align="center"><img src="images/careerimg.jpg" alt="Carrer Image" width="288" height="193"></p>
            <p align="center">Hello And Welcome To Your Pilot Overview</p>
            <p align="center">
              <?php include("includes/pilotmenu.php"); ?>
              <p>
            <p align="center"> </p>
            <p><br>
          </p></td>
          <td width="100">Hello <?php echo $row_pilots['first_name']; ?>,  Welcome</p>
          <p><a href="logout.php" class="linkblue">Logout</a>
            <p></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><font color="#808080">©2008 Blue Waves Virtual 
              Airlines. Logos And Slogans And All Other Property 
              Are Part Of Blue Waves Virtual Airlines And May Never Be Redestributed. 
          All Rights Reserved.</font></div></td>
        </tr>
        <tr>
          <td><img src="images/bottomlayer.jpg" width="800" height="50"></td>
        </tr>
      </table>
      <p> </p>
      <p>  </p>
    </div>
    </body>
    </html>
    

  2. i am having trouble eching my users account info... here is the code... you can see that i try to echo there first name then the New Pilots.. any help is gratly appreshated...

     

    <?php $pagename = "Pilot Overview"; ?>
    <?php
    $host="localhost"; // Host name 
    $username="pacifij1_vass"; // Mysql username 
    $password="8336994895"; // Mysql password 
    $db_name="pacifij1_vass"; // Database name 
    $tbl_name="virtualairlines"; // Table name 
    
    
    
    
    session_start();
    
    
    if(!session_is_registered('username') AND !session_is_registered('pwd') AND !session_is_registered('first_name') AND !session_is_registered('last_name')){ 
    
    header( 'Location: http://vasoftwaresolutions.com/');
    
    exit();
    
    }
    $username = $_POST['username'];
    $first_name = $_POST['first_name']; 
    ?>
    
    
    <!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=utf-8" />
    <title><?php echo $pagename; ?></title>
    <style type="text/css">
    <!--
    body {
    background-color: #003366;
    }
    -->
    </style>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .style1 {color: #C0C0C0}
    -->
    </style>
    </head>
    
    <body>
    <div align="center">
      <table width="800" border="3" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
        <tr>
          <td><table width="800" border="1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
            <tr>
              <td><div align="center"><a href="index.php" class="linkblue">Home</a></div></td>
              <td><div align="center"><a href="new-pilots.php" class="linkblue">New Pilots</a></div></td>
              <td><div align="center"><a href="new-pireps.php" class="linkblue">New PIREP's</a></div></td>
              <td><div align="center"><a href="routes.php" class="linkblue">Routes</a></div></td>
              <td><div align="center"><a href="fleet.php" class="linkblue">Fleet</a></div></td>
              <td><div align="center"><a href="statistics.php" class="linkblue">Statistics</a></div></td>
              <td><div align="center"><a href="scripts.php" class="linkblue">Scripts</a></div></td>
              <td><div align="center"><a href="airline-profile.php" class="linkblue">Airline Profile</a></div></td>
              <td><div align="center"><a href="logout.php" class="linkblue">Logout</a></div></td>
            </tr>
          </table>
            <table width="800" border="3" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
              <tr>
                <td><p class="style1">Hello <?php echo $first_name; ?>,</p>
                  <p class="style1">Welcome To Your Admin Centre For VASS!! Have Fun</p>
                  <p>
                    <?php
    
    
    $hostname = "localhost";   
    $database = "pacifij1_vass"; 
    $username = "pacifij1_vass"; 
    $password = "8336994895"; 
    $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); 
    
    $username = $_POST[username]; 
    
    mysql_select_db($database, $vrbo);
    $query_Session_Info = ("SELECT * FROM pilots WHERE username = '$username' and approved = '0'");
    $Session_Info = mysql_query($query_Session_Info, $vrbo) or die(mysql_error());
    $row_Session_Info = mysql_fetch_assoc($Session_Info);
    $totalRows_Session_Info = mysql_num_rows($Session_Info);
    
    
    
    ?>
                    </p>
                  <p><font color="cccccc" size="7">New Pilots</font>
                <table width="270" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td width="128" class="style6 style1">Callsign</td>
        <td width="128" class="style6 style1">Country</td>
        </tr>
      <?php do { ?><tr>
        <td class="style6 style1"><?php echo $row_Session_Info['first_name']; ?> <?php echo $row_Session_Info['last_name']; ?></td>
        <td class="style6"><a href="newpilots.php" class="linkblue">Add Pilot</a></td>
        </tr>
      <?php } while ($row_Session_Info = mysql_fetch_assoc($Session_Info)); ?>
    </table>
                </p>
                <p> </p></td>
              </tr>
            </table>        </td>
        </tr>
      </table>
      <p class="style1">© Copyright 2008 Nick Tyson And John Glendenning. © Copyright 2008 VASS. All Rights Reserved.</p>
    </div>
    </body>
    </html>

  3. hello again guys,

     

    I am trying to echo the users info so they can see where they stand... it is suppost to display there first name, last name, etc. here is the login info to test it out.... http://bluewavesvirtual.com/index1.php user=BWA1001 password=833699

     

    any help is apprecheated

    also here is my code

    <?php $pagename = "Pilot Overview"; ?>
    <?php
    $host="localhost"; // Host name 
    $username="pacifij1_blue"; // Mysql username 
    $password="8336994895"; // Mysql password 
    $db_name="pacifij1_blue"; // Database name 
    $tbl_name="pilot"; // Table name 
    
    
    
    session_start();
    
    
    if(!session_is_registered('callsign') AND !session_is_registered('pwd') AND !session_is_registered('first_name') AND !session_is_registered('last_name')){ 
    
    header( 'Location: http://bluewavesvirtual.com/');
    
    exit();
    
    }
    
    
    ?>
    <?php
    
    $hostname = "localhost";   
    $database = "pacifij1_blue"; 
    $username = "pacifij1_blue"; 
    $password = "8336994895"; 
    $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); 
    
    mysql_select_db($database, $vrbo);
    $query_Session_Info = ("SELECT * FROM pilot WHERE callsign = '$callsign' and last_name = '$last_name'");
    $Session_Info = mysql_query($query_Session_Info, $vrbo) or die(mysql_error());
    $row_Session_Info = mysql_fetch_assoc($Session_Info);
    $totalRows_Session_Info = mysql_num_rows($Session_Info);
    
    
    
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Blue Waves Virtual Airlines :: <?php echo $pagename; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    .style2 {color: #808080}
    -->
    </style>
    </head>
    
    <body>
    <div align="center">
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/toplayer.jpg" width="800" height="20"></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="banners/banners.jpg" width="800" height="150"></td>
        </tr>
      </table>
    <?php include("includes/mainmenu.php"); ?>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="144"><p> </p>
            <p><?php include("includes/pilotmenu.php"); ?></p>
          <p> </p></td>
          <td width="556"><p><img src="images/careerimg.jpg" alt="Carrer Image" width="288" height="193"></p>
            <p>Hello And Welcome To Your Pilot Overview</p>
            <p>First Name: <?php echo $row_Session_Info['first_name']; ?></p>
            <p>Last Name: <?php echo $row_Session_Info['last_name']; ?></p>
          <p>City: <?php echo $row_Session_Info['city']; ?></p>
          <p>State: <?php echo $row_Session_Info['state']; ?></p>
          <p>Country: <?php echo $row_Session_Info['country']; ?></p>
          <p>About: <?php echo $row_Session_Info['about']; ?></p>
          <p>Hours: <?php
    		  
    		  $last_name = $row_pilots['last_name']; 
    
    		  
    
    		mysql_select_db($database, $vrbo);
    $tt = 0;
    $midnight = strtotime(date('Y-m-d') . ' 00:00:00');
    
    
    
    mysql_select_db($database, $vrbo);
    $query_h = "SELECT duration FROM pireps WHERE last_name = '$last_name' and approved = '1'";
    $h = mysql_query($query_h, $vrbo) or die(mysql_error());
    
    
    while($r = mysql_fetch_assoc($h))
    $tt += strtotime($r['duration']) - $midnight;
    $hours = floor($tt/3600);
    $x = $tt - floor($tt/3600)*3600;
    $mins = floor($x/60);
    $secs = $x - floor($x/60) * 60;
    echo  $hours . ':' . $mins;
    ?><br>
              </p></td>
          <td width="100">Hello <?php echo $callsign; ?>,  Welcome</p>
          <p><a href="logout.php" class="linkblue">Logout</a></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><font color="#808080">©2008 Blue Waves Virtual 
              Airlines. Logos And Slogans And All Other Property 
              Are Part Of Blue Waves Virtual Airlines And May Never Be Redestributed. 
          All Rights Reserved.</font></div></td>
        </tr>
        <tr>
          <td><img src="images/bottomlayer.jpg" width="800" height="50"></td>
        </tr>
      </table>
      <p> </p>
      <p>  </p>
    </div>
    </body>
    </html>
    

  4. OH YAY .. a new error

     

     

    ok if you go back to that page www.blueskyair.org/index1.php and login with user BWA1001 password 833699.. try to login

     

    it doesnt show your session info which is the first name last name etc..

     

    here is the code for the pilot-overview.php

    <?php $pagename = "Pilot Overview"; ?>
    <?php
    $host="localhost"; // Host name 
    $username="pacifij1_blue"; // Mysql username 
    $password="pass"; // Mysql password 
    $db_name="pacifij1_bluewaves"; // Database name 
    $tbl_name="pilot"; // Table name 
    
    
    
    session_start();
    
    
    if(!session_is_registered('callsign') AND !session_is_registered('pwd') AND !session_is_registered('first_name') AND !session_is_registered('last_name')){ 
    
    header( 'Location: http://bluewavesvirtual.com/');
    
    exit();
    
    }
    
    
    ?>
    <?php
    
    $hostname = "localhost";   
    $database = "pacifij1_blue"; 
    $username = "pacifij1_blue"; 
    $password = "8336994895"; 
    $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); 
    
    mysql_select_db($database, $vrbo);
    $query_Session_Info = ("SELECT * FROM pilot WHERE callsign = '$callsign'");
    $Session_Info = mysql_query($query_Session_Info, $vrbo) or die(mysql_error());
    $row_Session_Info = mysql_fetch_assoc($Session_Info);
    $totalRows_Session_Info = mysql_num_rows($Session_Info);
    
    
    
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Blue Waves Virtual Airlines :: <?php echo $pagename; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    .style2 {color: #808080}
    -->
    </style>
    </head>
    
    <body>
    <div align="center">
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/toplayer.jpg" width="800" height="20"></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="banners/banners.jpg" width="800" height="150"></td>
        </tr>
      </table>
    <?php include("includes/mainmenu.php"); ?>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="144"><p> </p>
            <p><?php include("includes/pilotmenu.php"); ?></p>
          <p> </p></td>
          <td width="556"><p><img src="images/careerimg.jpg" alt="Carrer Image" width="288" height="193"></p>
            <p>Hello And Welcome To Your Pilot Overview</p>
            <p>First Name: <?php echo $row_Session_Info['first_name']; ?></p>
            <p>Last Name: <?php echo $row_Session_Info['last_name']; ?></p>
          <p>City: <?php echo $row_Session_Info['city']; ?></p>
          <p>State: <?php echo $row_Session_Info['state']; ?></p>
          <p>Country: <?php echo $row_Session_Info['country']; ?></p>
          <p>About: <?php echo $row_Session_Info['about']; ?></p>
          <p>Hours: <?php
    		  
    		  $last_name = $row_pilots['last_name']; 
    
    		  
    
    		mysql_select_db($database, $vrbo);
    $tt = 0;
    $midnight = strtotime(date('Y-m-d') . ' 00:00:00');
    
    
    
    mysql_select_db($database, $vrbo);
    $query_h = "SELECT duration FROM pireps WHERE last_name = '$last_name' and approved = '1'";
    $h = mysql_query($query_h, $vrbo) or die(mysql_error());
    
    
    while($r = mysql_fetch_assoc($h))
    $tt += strtotime($r['duration']) - $midnight;
    $hours = floor($tt/3600);
    $x = $tt - floor($tt/3600)*3600;
    $mins = floor($x/60);
    $secs = $x - floor($x/60) * 60;
    echo  $hours . ':' . $mins;
    ?><br>
              </p></td>
          <td width="100">Hello <?php echo $callsign; ?>,  Welcome</p>
          <p><a href="logout.php" class="linkblue">Logout</a></td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><font color="#808080">©2008 Blue Waves Virtual 
              Airlines. Logos And Slogans And All Other Property 
              Are Part Of Blue Waves Virtual Airlines And May Never Be Redestributed. 
          All Rights Reserved.</font></div></td>
        </tr>
        <tr>
          <td><img src="images/bottomlayer.jpg" width="800" height="50"></td>
        </tr>
      </table>
      <p> </p>
      <p>  </p>
    </div>
    </body>
    </html>

  5. ok php sinsi i did what you said and it did this

    Username Tried: BWA1001Password Tried: 833699

    Username DB: 833699Password DB: BWA1001

     

    Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /home/pacifij1/public_html/bluewavesvirtual/checklogin.php:27) in /home/pacifij1/public_html/bluewavesvirtual/checklogin.php on line 36

     

    Warning: Cannot modify header information - headers already sent by (output started at /home/pacifij1/public_html/bluewavesvirtual/checklogin.php:27) in /home/pacifij1/public_html/bluewavesvirtual/checklogin.php on line 40

    Login Worked

    Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0

  6. ok

    <?php
    $host="localhost"; // Host name 
    $username="pacifij1_blue"; // Mysql username 
    $password="8336994895"; // Mysql password 
    $db_name="pacifij1_blue"; // Database name 
    
    
    // Connect to server and select databse.
    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
    mysql_select_db("$db_name")or die("cannot select DB");
    
    // username and password sent from signup form 
    $callsign = $_POST['callsign']; 
    $pwd = $_POST['pwd']; 
    $first_name = $_POST['first_name']; 
    $last_name = $_POST['last_name']; 
    
    
    $sql="SELECT * FROM pilot WHERE callsign='$callsign' and pwd='$pwd'";
    $result=mysql_query($sql) or die(mysql_error());
    
    // Mysql_num_row is counting table row
    $count=mysql_num_rows($result);
    // If result matched $myusername and $mypassword, table row must be 1 row
    
    if($count<0){
    // Register $myusername, $mypassword and redirect to file "login_success.php"
    session_register("callsign");
    session_register("pwd"); 
    session_register("first_name"); 
    session_register("last_name"); 
    header("location:login_success.php");
    }
    else {
    mysql_error();
    ?>
    
    <!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=utf-8" />
    <title>Loading</title>
    </head>
    
    <body>
    </body>
    </html>
    <?php mysql_close(); ?>

  7. mysql_close();

    Weird, I didn't think it would require this.

     

    that didnt do anything.... but this is the error "Parse error: syntax error, unexpected $end in /home/pacifij1/public_html/bluewavesvirtual/checklogin.php on line 48"

  8. Change:

    $count=mysql_num_rows($result);
    

    To:

    $count=mysql_numrows($result);
    

    its giving me this now

    "Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/pacifij1/public_html/bluewavesvirtual/checklogin.php on line 23"

×
×
  • 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.