Okay , so i wrote some html-php code , and when i try to run it in browser , WAMP goes to http://localhost/<?php and says :
Forbidden
You don’t have permission to access /< on this server.
I dont know what to do . Is it somehing with privileges , or the code …
The html file i placed is a a test . My first one , actually . The code is a joke . Well , it has internet jokes …
But that is besides the point . I cant run it and i dont know what to do . Up until i wrote the php in it it worked fine . Please advise .
[php]
<?php $nameErr = $genderErr = $dickErr = $countryErr = "" ; $name = $gender = $dick = $country = "" ;function test_input($data) {
$data = trim($data) ;
$data = stripslashes($data) ;
$data = htmlspecialchars ($data) ;
?>
Hey u suck dick ?
html { color: white; background-color: #5e8617; text-align: center; font-family: comic sans; }
body { width: 1250px; margin: 0 auto 0 auto; text-align: left; padding: 5px; background-color: #5e8617; color: white; }
header, footer { width: 1250px; display: table; background-color: #586E30; text-align: center; font-family: comic sans;}
nav {height: 800px; width: 200px; float: left; display: table; background-color: #586E30; }
article { width: 1040px; display: table; background-color: #7E9E45; }
footer { text-align: center; background-color: #586E30; font-size: 300%}
.c {color: red; font-family: comic sans;}
.tits {display: table; background-color: #586E30; text-align: center; font-family: comic sans; width: 1040px; height: 50px;}
Harambe mah lawv
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?
- Hey u suck dick ?NEW !!!
</ul> </nav> <article> <h1>Hey u suck dick ?</h1> <div class="tits"><h2>Give information, Do it for Harambe</h2></div> <form method="post" action=<?php echoaction=<?php echo htmlspecialchars ($_SERVER["PHP_SELF"])?>> <p><b> Name ;</b> <input type="text" name="name" size="35" value=""> <span class="error">*<?php echo $nameErr ; ?> </span> <p> <b> Gender ; </b>Gaaaaay<input type="radio" name="gender" value="Attack Helicopter"><span class="error">*<?php echo $genderErr ; ?> </span> Ceral First Denier<input type="radio" name="gender" value="Ceral First Denier"> Attack Helicopter Ceral First Denier<input type="radio" name="gender" value="Attack Helicopter Ceral First Denier"> <br> <p><b>Hey U Suck Dick ? ; </b>Yas!<input type="radio" name="dick" size="35" value="Yes"><span class="error">*<?php echo $dickErr ; ?> </span> No, Am Str8, M8."<input type="radio" name="dick" size="35" value="No"> <br> <p><b> Country ;</b><select name="country"><span class="error">*<?php echo $countryErr ; ?> </span> <option value="None selected">Please select below</option> <option value="Idontgive">I don't give a shit LOL</option> <option value="Nope">Nope</option> <input name="xXxthatsfuckingayxXx" type="submit" value="submit" </select><p></form> <iframe width="560" height="315" src="https://www.youtube.com/embed/OJw3MmL-Omk" frameborder="0" allowfullscreen></iframe> </article> <?php
if ($_SERVER[“REQUEST_METHOD”] == “POST”) {
if (empty($_POST[“name”])) {
$nameErr = “Name is required!” ;
} else {
$name = test_input($_POST[“name”]) ; }
}if ($_SERVER [“REQUEST_METHOD”] == “POST”) {
if (empty($_POST[“gender”])) {
$genderErr = “Gender is required!” ;
} else {
$gender = test_input($_POST[“gender”]) ;
}
}if ($_SERVER [“REQUEST_METHOD”] == “POST” ) {
if (empty($_POST[“dick”])) {
$dickErr = “Gayness is required!”
} else {
$dick = test_input($_POST[“dick”]) ;
}
}if ($_SERVER [“REQUEST_METHOD”] == “POST”) {
if (empty($_POST[“country”]) {
$countryErr = “Country of origin is required!”
} else {
$country test_input($_POST[“country”]) ;
}
}
?>
Welcome <?php echo $_POST["name"] ;?>
Your gender is <?php echo $_POST ["gender"] ;?>
You is gay , right ? <?php echo $_POST ["dick"] ; ?>
You are so goddamn country <?php echo $_POST ["country"] ; ?>
[/php]8=====D </p> </footer> </body>