jdock1 Posted April 9, 2009 Share Posted April 9, 2009 As I mentioned in my previous post, I am new to PHP Its not that im too lazy to read the PHP manual, its that there is SO much to it and wouldnt be able to find what I need Basically what I need is the "if" echo to be generated at the top of the page, rather than the bottom, where it is displaying now. Here is the code: <html> <head><title>Age Verification</title> <style type="text/css"> body { background-image: url('images/bg.png'); background-repeat: repeat } </style> </head> <body> <center><p><h2 style="color:#68C840 ">You must be atleast 116 years old to enter this site. Please verify your age below.</h2></p><br><br><br> <form action="index.php" method="get"> <p style="font-family:verdana;font-size:80%;color:#68C840">Name:</p><input type="text" style="background-color:#B8B8B8" name="name"> <br> <p style="font-family:verdana;font-size:80%;color:#68C840">Age:</p><input type="text" style="background-color:#B8B8B8" name="age" /> <br><br><br> <input type="submit" value="Submit" /> </form></center> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <center><p style="font-family:verdana;font-size:80%;color:#68C840"> DISCLAIMER: All models featured on this site are 100 years of age or older. We require all surfers of this site to be 116 years of age or older to access this site. </font></p></center> <?php $age = $_GET["age"]; $name = $_GET["name"]; if ($age > 168) { echo "<center><p style='color:#780000'>Congratulations, $name, you are old enough to enter this site. Now <h1 style='color:#780000'>GO FUCK YOURSELF</h1></p></center>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/153269-solved-how-would-i-get-this-echo-on-the-top-of-the-page/ Share on other sites More sharing options...
ram4nd Posted April 9, 2009 Share Posted April 9, 2009 I see you are new to html aswell. <?php $age = $_GET["age"]; $name = $_GET["name"]; if ($age > 168) { echo "<center><p style='color:#780000'>Congratulations, $name, you are old enough to enter this site. Now <h1 style='color:#780000'>GO FUCK YOURSELF</h1></p></center>"; } ?><html> <head><title>Age Verification</title> <style type="text/css"> body { background-image: url('images/bg.png'); background-repeat: repeat } </style> </head> <body> <center><p><h2 style="color:#68C840 ">You must be atleast 116 years old to enter this site. Please verify your age below.</h2></p><br><br><br> <form action="index.php" method="get"> <p style="font-family:verdana;font-size:80%;color:#68C840">Name:</p><input type="text" style="background-color:#B8B8B8" name="name"> <br> <p style="font-family:verdana;font-size:80%;color:#68C840">Age:</p><input type="text" style="background-color:#B8B8B8" name="age" /> <br><br><br> <input type="submit" value="Submit" /> </form></center> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <center><p style="font-family:verdana;font-size:80%;color:#68C840"> DISCLAIMER: All models featured on this site are 100 years of age or older. We require all surfers of this site to be 116 years of age or older to access this site. </font></p></center> Quote Link to comment https://forums.phpfreaks.com/topic/153269-solved-how-would-i-get-this-echo-on-the-top-of-the-page/#findComment-805202 Share on other sites More sharing options...
jdock1 Posted April 9, 2009 Author Share Posted April 9, 2009 I see you are new to html aswell. <?php $age = $_GET["age"]; $name = $_GET["name"]; if ($age > 168) { echo "<center><p style='color:#780000'>Congratulations, $name, you are old enough to enter this site. Now <h1 style='color:#780000'>GO FUCK YOURSELF</h1></p></center>"; } ?><html> <head><title>Age Verification</title> <style type="text/css"> body { background-image: url('images/bg.png'); background-repeat: repeat } </style> </head> <body> <center><p><h2 style="color:#68C840 ">You must be atleast 116 years old to enter this site. Please verify your age below.</h2></p><br><br><br> <form action="index.php" method="get"> <p style="font-family:verdana;font-size:80%;color:#68C840">Name:</p><input type="text" style="background-color:#B8B8B8" name="name"> <br> <p style="font-family:verdana;font-size:80%;color:#68C840">Age:</p><input type="text" style="background-color:#B8B8B8" name="age" /> <br><br><br> <input type="submit" value="Submit" /> </form></center> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <center><p style="font-family:verdana;font-size:80%;color:#68C840"> DISCLAIMER: All models featured on this site are 100 years of age or older. We require all surfers of this site to be 116 years of age or older to access this site. </font></p></center> LOL, I just had to add the PHP code to the top? And why do you say Im new to HTML? Lol... because I use deprecated code? I really dont care if its sloppy, as long as it works Quote Link to comment https://forums.phpfreaks.com/topic/153269-solved-how-would-i-get-this-echo-on-the-top-of-the-page/#findComment-805240 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.