NEED HELP!

Author Message
Helder

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 4/4/2008
  • Status: offline
NEED HELP! Friday, April 04, 2008 2:56 AM (permalink)
0
 <%
 'Dimension the variables for the database and Recordset
   Dim rs, conn, sql
 
 'MS OBDC connection
 'An Object that tells the server to create a connection to a database. 
   Set conn = Server.CreateObject("ADODB.Connection")
 
 'This opens the connection using the ODBC connection to the database flapper
   conn.Open "int213"
 
 'assign SQL statement to a variable that will search for all data in the passangers Table, created in Access
   sql = "SELECT * FROM passengers"
   
   'Establish the RECORDSET object which will hold a copy of the retrieved data in memory
        Set rs = Server.CreateObject("ADODB.RecordSet")
 
   'Open the recordset using the Server connection
        rs.Open sql, conn
 
   'Initiate a loop which will output the contents of the Recordset into an HTML table.
   'The loop will continue until the End Of File (last record) is reached in the Recordset
   
   
   %>
   
 
 <html>
 <head>
 <title>Administration</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 </head>
 
 <body bgcolor="#FFFFFF">
 <h1 align="center"><b><font color="#0000CC">Flapper Airlines</font></b> </h1>
 <h2 align="center">Administration</h2>
 <form method="post" action="">
  <p>Please select the Report Required</p>
  <p> 
   <select name="select">
     <option value="Flight">Passenger List by Flight</option>
     <option value="Revenue">Total Revenue</option>
     <option value="Accounts">Customer Accounts</option>
   </select>
  </p>
  <p>
   <input type="submit" name="Submit" value="Submit">
  </p>
 </form>
 <a href="file:///D|/login.asp">Return to Login page</a> 
 <HTML>
 <BODY>
 <H1>Passenger List</H1>
 <TABLE BORDER=1>
  <TR>
   <TD><B>Passenger Account</B></TD>
   <TD><B>Passenger Password</B></TD>
   <TD><B>First Name</B></TD>
   <TD><B>Last Name</B></TD>
   <TD><B>Passenger Address</B></TD>
   <TD><B>Passenger City</B></TD>
   <TD><B>Passenger Postal Code</B></TD>
   <TD><B>Passenger Phone Number</B></TD>
   <TD><B>Passenger Passport</B></TD>
  
  </TR>
 <a href="file:///D|/login.asp"></a>
 <%
   
      Do while Not rs.EOF
       'Write the output, one line at a time. Note the HTML used inside the script
       'and the 'rs' variable used with the names in the data table.
       Response.write "<TR><TD>" & rs("pass_code") & "</TD>"
       Response.write "<TD>" & rs("pass_password") & "</TD>"
       Response.write "<TD>" & rs("pass_fname") & "</TD>"
       Response.write "<TD>" & rs("pass_lname") & "</TD>"
       Response.write "<TD>" & rs("pass_address") & "</TD>"
       Response.write "<TD>" & rs("pass_city") & "</TD>"
       Response.write "<TD>" & rs("pass_postal") & "</TD>"
       Response.write "<TD>" & rs("pass_phone") & "</TD>"
       Response.write "<TD>" & rs("pass_passport") & "</TD></TR>"
       'Move to the next record in the Recordset
       rs.MoveNext
   Loop
 
 
   'Close the connection to Server and Recordset because you don't need the information anymore
 'and to free up memory
       rs.close
       set rs = nothing
       conn.close
       set conn = nothing
 
 %>
 <a href="file:///D|/login.asp"></a>
 </body>
 </html>


on the page the visitor has to choose one of the options and i want to do an if statement so that when they choose one of the options to go to a seperate page and display the information. by the way it uses a database
<message edited by Helder on Friday, April 04, 2008 3:01 AM>
 
#1
    DiGiTAL.SkReAM

    • Total Posts : 1259
    • Scores: 7
    • Reward points : 0
    • Joined: 9/7/2005
    • Location: Clearwater, FL, USA
    • Status: offline
    RE: NEED HELP! Saturday, April 05, 2008 1:24 AM (permalink)
    0
    Why didn't you post in the correct forum?  This forum is clearly marked for finished scripts/code ONLY.
    "Would you like to touch my monkey?" - Dieter (Mike Meyers)

    "It is better to die like a tiger, than to live like a pussy."
    -Master Wong, from Balls of Fury
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9