Jump to content

[SOLVED] How would I get this echo on the top of the page?


jdock1

Recommended Posts

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>";


}

?>

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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