will_1990 Posted December 11, 2008 Share Posted December 11, 2008 Right for example would this be plasable: if(mysql_num_rows($result) > 0){ while($row = mysql_fetch_array($result)) { <html> <head> (Loads of head stuff including links to js and css) <body> (loads of stuff that uses all the css + js) (then dynamic info as follows || do i need another <? round this?) echo $row['flight_num']; echo $row['flight_route']; echo $row['arrival_time']; (more static html stuff here) </body> </html> } }else{ (exactly the same here) echo 'Sorry, couldn\'t find any flights'; (and here) } in principle is this right. I dont want to post all the html and stuff because there is so much thanks alot! Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/ Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 Hello, again. Correct you can do this <?php if(mysql_num_rows($result) > 0){ while($row = mysql_fetch_array($result)) { ?> <html> <head> (Loads of head stuff including links to js and css) <body> (loads of stuff that uses all the css + js) (then dynamic info as follows || do i need another <? round this?) <?php echo $row['flight_num']; echo $row['flight_route']; echo $row['arrival_time']; ?> (more static html stuff here) </body> </html> <?php } }else{ (exactly the same here) echo 'Sorry, couldn\'t find any flights'; (and here) } ?> Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712170 Share on other sites More sharing options...
.josh Posted December 11, 2008 Share Posted December 11, 2008 I imagine putting the html, head and body tags inside that loop are going to cause problems on some level... Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712174 Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 I imagine putting the html, head and body tags inside that loop are going to cause problems on some level... I mentioned that in the last thread solved for him, but I think that is what he wants else <html> <head> <body> <?php if(mysql_num_rows($result) > 0){ while($row = mysql_fetch_array($result)) { echo $row['flight_num']; echo $row['flight_route']; echo $row['arrival_time']; }else{ echo 'Sorry, couldn\'t find any flights'; } } ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712175 Share on other sites More sharing options...
.josh Posted December 11, 2008 Share Posted December 11, 2008 Oh okay yeah that's right, because there are certain times when you're going to want to echo out those tags over and over again, like when you...I mean, like when...hmm..nope, I got nothin'. Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712179 Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 Oh okay yeah that's right, because there are certain times when you're going to want to echo out those tags over and over again, like when you...I mean, like when...hmm..nope, I got nothin'. lmao Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712180 Share on other sites More sharing options...
will_1990 Posted December 11, 2008 Author Share Posted December 11, 2008 Oh okay yeah that's right, because there are certain times when you're going to want to echo out those tags over and over again, like when you...I mean, like when...hmm..nope, I got nothin'. lmao LOL ok that worked a treat i got all my layout sorted. Now as i was saying earlier i want to put the dynamic php stuff in a pretty table.. lol this is what i tried as a test to see what im doing wrong. i remeber you mentioning not to put head and html tags in the while clause but i cant see another way with the other html out side of this. Let me show you what i tried as a test... it will make what im saying clear.....hopefully.. <?php echo "<html>", "<head>", "<TITLE> test </title>", "</head>" "<body>"; //echo "<table>" echo $row['flight_num']; echo $row['flight_route']; echo $row['arrival_time']; echo "</body>" echo "</html>" ?> Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712181 Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 EDIT: You don't have to put echo echo echo, just put one echo and everything in between the quotes Hey buddy Heres what you can do <html> <head> <body> <?php if(mysql_num_rows($result) > 0){ echo'<table width="100%" border="0" cellspacing="0" cellpadding="0">'; while($row = mysql_fetch_array($result)) { echo '<tr> <td>'.$row['flight_num'].'</td> </tr> <tr> <td>'.$row['flight_route'].'</td> </tr> <tr> <td>'.$row['arrival_time'];.'</td> </tr>'; } echo '</table>'; }else{ echo 'Sorry, couldn\'t find any flights'; } ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712185 Share on other sites More sharing options...
will_1990 Posted December 11, 2008 Author Share Posted December 11, 2008 EDIT: You don't have to put echo echo echo, just put one echo and everything in between the quotes Hey buddy Heres what you can do <html> <head> <body> <?php if(mysql_num_rows($result) > 0){ echo'<table width="100%" border="0" cellspacing="0" cellpadding="0">'; while($row = mysql_fetch_array($result)) { echo '<tr> <td>'.$row['flight_num'].'</td> </tr> <tr> <td>'.$row['flight_route'].'</td> </tr> <tr> <td>'.$row['arrival_time'];.'</td> </tr>'; } echo '</table>'; }else{ echo 'Sorry, couldn\'t find any flights'; } ?> </body> </html> man, without wanted to sound too gay.... I think im in love with you Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712187 Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 EDIT: You don't have to put echo echo echo, just put one echo and everything in between the quotes Hey buddy Heres what you can do <html> <head> <body> <?php if(mysql_num_rows($result) > 0){ echo'<table width="100%" border="0" cellspacing="0" cellpadding="0">'; while($row = mysql_fetch_array($result)) { echo '<tr> <td>'.$row['flight_num'].'</td> </tr> <tr> <td>'.$row['flight_route'].'</td> </tr> <tr> <td>'.$row['arrival_time'];.'</td> </tr>'; } echo '</table>'; }else{ echo 'Sorry, couldn\'t find any flights'; } ?> </body> </html> man, without wanted to sound too gay.... I think im in love with you dont worry man just put (no homo) after that and your fine, and I love you too (no homo) edit: you can change around the table and stuff bro, and mark this as solved thread if your done Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712191 Share on other sites More sharing options...
will_1990 Posted December 11, 2008 Author Share Posted December 11, 2008 EDIT: You don't have to put echo echo echo, just put one echo and everything in between the quotes Hey buddy Heres what you can do <html> <head> <body> <?php if(mysql_num_rows($result) > 0){ echo'<table width="100%" border="0" cellspacing="0" cellpadding="0">'; while($row = mysql_fetch_array($result)) { echo '<tr> <td>'.$row['flight_num'].'</td> </tr> <tr> <td>'.$row['flight_route'].'</td> </tr> <tr> <td>'.$row['arrival_time'];.'</td> </tr>'; } echo '</table>'; }else{ echo 'Sorry, couldn\'t find any flights'; } ?> </body> </html> man, without wanted to sound too gay.... I think im in love with you dont worry man just put (no homo) after that and your fine, and I love you too (no homo) edit: you can change around the table and stuff bro, and mark this as solved thread if your done Hey dude soz just lost the internet again.. grr... i tried that and now your going to hate me (in sorry) i slightly differed from the code you quoted above as you will see. The majority of the html can be ignored its jsut the layout stuff i was telling you about but now when implimented the table it went a bit iffy, i think this is because i did it differently. here is the code (sorry about the amount dude) while($row = mysql_fetch_array($result)) { ?> <!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" /> <link rel="stylesheet" href="dropdown2.css" type="text/css" /> <script type="text/javascript" src="dropdown.js"> </script> <script type="text/javascript" src="calendar.js"> </script> <script type="text/javascript" src="enablefield.js"> </script> <script type="text/javascript"> function greyText(one_way, return_date) { if (document.form1[one_way].checked) { document.form1[return_date].disabled=true; document.form1[return_flight].disabled=true; } else { document.form1[return_date].disabled=false; document.form1[return_flight].disabled=false; } } <title>Webair Contact Us</title> <link rel="StyleSheet" href="./mainstyle.css"type="text/css" media="screen"> </script> </head> <body> <div id="wrapper"> <table> <tr> <td> <img src="Webair--logo.gif" height= "65" width="240" align="top" /> </td> <td background="Banner--background.gif" height="60" align="right" width="817" > <a class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"> <b> Staff login </b> </a> | <a class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > <b> Home </b> </a> | <a class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > <b> Booked Flights   </b> </a> </td> </tr> </table> <dl class="dropdown" > <dt id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)" > Home </dt> <dd id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" class="underline" > Home </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" > Contact us </dt> <dd id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact" class="underline" > Contact us </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)" > Flights </dt> <dd id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html" class="underline" > Refund Policy </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)" > Travel Information </dt> <dd id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html" class="underline" > Flight Timetable </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html" class="underline" > Baggage Information </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html" class="underline" > Airport information </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html" class="underline" > Travel documentation requirements </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)" > About Webair </dt> <dd id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html" class="underline" > About Webair </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html" class="underline" > Contact us </a> </li> </ul> </dd> </dl> <div style="clear:both" /> </div> <div id="content" > <div class="inner" > <table width="50%" border="1" align="center"> <?php echo '<tr><td>'.$row['flight_num'].'</td> </tr> <tr> <td>'.$row['flight_route'].'</td> </tr> <tr> <td>'.$row['arrival_time'];.'</td> </tr>'; ?> </table> </div> </div> <div id="footer"> <div id="inner"> <div id="footer2"> <p><hr class="line"></hr> <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"><b>Staff login</b></a> | <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"><b>Home</b></a> | <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html"><b>Contact us</b></a> | <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html"><b>About Webair</b></a> <hr class="line2"></hr> </p> </div> </div> </div> </body> </html> <?php } }else{ echo 'Sorry, couldn\'t find any flights'; } mysql_free_result($result); ?> not sure why it didnt like it probs because its in the while statement or who knows, if you can see a better way of organising it, pray do tell. many thanks Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712198 Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 Your looping the whole layout lol, and what happened to your vars and stuff we discussed and fixed? Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712210 Share on other sites More sharing options...
will_1990 Posted December 11, 2008 Author Share Posted December 11, 2008 Your looping the whole layout lol, and what happened to your vars and stuff we discussed and fixed? I know, i want to loop the layout i think so its generated dynamically any way, i havnt removed any of vars there still there( at the top, didnt include them), its just difficult for me to check and rad stuff at he moment because im using notepadd instead of notepad ++ (not on my pc so i dont have dw ) The actual reason i included the layout in the while loop was because when the while loop was genereated (when i had the layout outside the loop) it did not load the layout so it was just plain text onto the page. so i thought i had to include it. this worked great until i started trying to impliment the table around the PHP aswell as the layout. damn its like 3 in the morning in england, where are you at, US? Is there anything you think i should do with the layout before re attempting the table (eg remove it from the loop lol) thanks bud. Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712216 Share on other sites More sharing options...
phpSensei Posted December 11, 2008 Share Posted December 11, 2008 Your looping the whole layout lol, and what happened to your vars and stuff we discussed and fixed? I know, i want to loop the layout i think so its generated dynamically any way, i havnt removed any of vars there still there( at the top, didnt include them), its just difficult for me to check and rad stuff at he moment because im using notepadd instead of notepad ++ (not on my pc so i dont have dw ) The actual reason i included the layout in the while loop was because when the while loop was genereated (when i had the layout outside the loop) it did not load the layout so it was just plain text onto the page. so i thought i had to include it. this worked great until i started trying to impliment the table around the PHP aswell as the layout. damn its like 3 in the morning in england, where are you at, US? Is there anything you think i should do with the layout before re attempting the table (eg remove it from the loop lol) thanks bud Ya but your going to get your website 3 times in one page, I have no idea how this works for you. If you get 2 flights you will get 2 websites on one page because its going to loop 2 times. You have put all the code in the middle where you want to show the data. its 10:05pm here, im probably heading for sleep in an hour, or now maybe lol. Ill get back to ya, im so tired man ahah. don't be fraustrated though, takes time... rome asnt built in a day Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712217 Share on other sites More sharing options...
will_1990 Posted December 11, 2008 Author Share Posted December 11, 2008 Your looping the whole layout lol, and what happened to your vars and stuff we discussed and fixed? I know, i want to loop the layout i think so its generated dynamically any way, i havnt removed any of vars there still there( at the top, didnt include them), its just difficult for me to check and rad stuff at he moment because im using notepadd instead of notepad ++ (not on my pc so i dont have dw ) The actual reason i included the layout in the while loop was because when the while loop was genereated (when i had the layout outside the loop) it did not load the layout so it was just plain text onto the page. so i thought i had to include it. this worked great until i started trying to impliment the table around the PHP aswell as the layout. damn its like 3 in the morning in england, where are you at, US? Is there anything you think i should do with the layout before re attempting the table (eg remove it from the loop lol) thanks bud Ya but your going to get your website 3 times in one page, I have no idea how this works for you. If you get 2 flights you will get 2 websites on one page because its going to loop 2 times. You have put all the code in the middle where you want to show the data. its 10:05pm here, im probably heading for sleep in an hour, or now maybe lol. Ill get back to ya, im so tired man ahah. don't be fraustrated though, takes time... rome asnt built in a day You're right, rome was not built in a day!! I need to do a bit of research on layouts outside of loops... fun for all! if your heading off then i will probably catch up with you tomorow i cannot thank you enough for all the help and guidance you have given me Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712218 Share on other sites More sharing options...
will_1990 Posted December 11, 2008 Author Share Posted December 11, 2008 Your looping the whole layout lol, and what happened to your vars and stuff we discussed and fixed? I know, i want to loop the layout i think so its generated dynamically any way, i havnt removed any of vars there still there( at the top, didnt include them), its just difficult for me to check and rad stuff at he moment because im using notepadd instead of notepad ++ (not on my pc so i dont have dw ) The actual reason i included the layout in the while loop was because when the while loop was genereated (when i had the layout outside the loop) it did not load the layout so it was just plain text onto the page. so i thought i had to include it. this worked great until i started trying to impliment the table around the PHP aswell as the layout. damn its like 3 in the morning in england, where are you at, US? Is there anything you think i should do with the layout before re attempting the table (eg remove it from the loop lol) thanks bud Ya but your going to get your website 3 times in one page, I have no idea how this works for you. If you get 2 flights you will get 2 websites on one page because its going to loop 2 times. You have put all the code in the middle where you want to show the data. its 10:05pm here, im probably heading for sleep in an hour, or now maybe lol. Ill get back to ya, im so tired man ahah. don't be fraustrated though, takes time... rome asnt built in a day You're right, rome was not built in a day!! I need to do a bit of research on layouts outside of loops... fun for all! if your heading off then i will probably catch up with you tomorow i cannot thank you enough for all the help and guidance you have given me I have now moved the layout and extra stuff outside the loop but i have tried to put my php into a table but it seems impossible. Has anyone got any ideas, this is where im at at the moment: <?php //database inforamtion $host = "stocks"; // Host name $username = "wbennett"; // Mysql username $password = "mysql5"; // Mysql password $db_name = "wbennett"; // Database name $tbl_name1 = "flight_webair"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Variables $flight_route_out = $_POST['flight_route_out']; $flight_route_return = $_POST['flight_route_return']; $date_out = $_POST['departure_date']; $date_return = $_POST['return_date']; $passenger_num = $_POST['num_of_pass']; $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first. //To protect MySQL injection $flight_route_out = stripslashes($flight_route_out); $flight_route_return = stripslashes($flight_route_return); $flight_route_out = mysql_real_escape_string($flight_route_out); $flight_route_return = mysql_real_escape_string($flight_route_return); //Queries $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'"; //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'"; //Execute query 1 $result = mysql_query($sql1) or die(mysql_error()); if(mysql_num_rows($result) > 0){ ?> <!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" /> <link rel="stylesheet" href="dropdown2.css" type="text/css" /> <script type="text/javascript" src="dropdown.js"> </script> <script type="text/javascript" src="calendar.js"> </script> <script type="text/javascript" src="enablefield.js"> </script> <script type="text/javascript"> function greyText(one_way, return_date) { if (document.form1[one_way].checked) { document.form1[return_date].disabled=true; document.form1[return_flight].disabled=true; } else { document.form1[return_date].disabled=false; document.form1[return_flight].disabled=false; } } <title>Webair Contact Us</title> <link rel="StyleSheet" href="./mainstyle.css"type="text/css" media="screen"> </script> </head> <body> <div id="wrapper"> <table> <tr> <td> <img src="Webair--logo.gif" height= "65" width="240" align="top" /> </td> <td background="Banner--background.gif" height="60" align="right" width="817" > <a class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"> <b> Staff login </b> </a> | <a class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > <b> Home </b> </a> | <a class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > <b> Booked Flights   </b> </a> </td> </tr> </table> <dl class="dropdown" > <dt id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)" > Home </dt> <dd id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" class="underline" > Home </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" > Contact us </dt> <dd id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact" class="underline" > Contact us </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)" > Flights </dt> <dd id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html" class="underline" > Refund Policy </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)" > Travel Information </dt> <dd id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html" class="underline" > Flight Timetable </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html" class="underline" > Baggage Information </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html" class="underline" > Airport information </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html" class="underline" > Travel documentation requirements </a> </li> </ul> </dd> </dl> <dl class="dropdown" > <dt id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)" > About Webair </dt> <dd id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)" > <ul> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html" class="underline" > About Webair </a> </li> <li> <a href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html" class="underline" > Contact us </a> </li> </ul> </dd> </dl> <div style="clear:both" /> </div> <div id="content" > <div class="inner" > <?php while($row = mysql_fetch_array($result)) { echo $row['flight_num']; echo $row['flight_route']; echo $row['arrival_time']; ?> </table> </div> </div> <div id="footer"> <div id="inner"> <div id="footer2"> <p><hr class="line"></hr> <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"><b>Staff login</b></a> | <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"><b>Home</b></a> | <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html"><b>Contact us</b></a> | <a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html"><b>About Webair</b></a> <hr class="line2"></hr> </p> </div> </div> </div> </body> </html> <?php } }else{ echo 'Sorry, couldn\'t find any flights'; } mysql_free_result($result); ?> many thanks Quote Link to comment https://forums.phpfreaks.com/topic/136449-inserting-static-html-into-a-dynamic-php-script/#findComment-712249 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.