Will998999
New member
im new to HTML and PHP and have two php files and am trying to create a form that allows the user to input data that is then displayed on another page, but all i am left with on the second page is an empty page, HELP!!! here is the script
first page:
<html>
<head>
<title>Main site</title>
</head>
<style>
.mainbody{
color: white
}
</style>
<body class=mainbody background= "background.jpg">
<center>
<h1>Human Test! Just to make sure you are not a bot!</h1>
</center>
<form name="coolquiz" action="quizresults.php" method="post">
<br>
Name: <input type:"text" name:"Firstname">
<br>
Click the number 3:
<br>
1:<input type="radio" name="threeclick" value="1">
<br>
2:<input type="radio" name="threeclick" value="2">
<br>
3:<input type="radio" name="threeclick" value="3">
<br>
4:<input type="radio" name="threeclick" value="4">
<br>
<input type="submit" name="submitbutton" value="click when finished!">
</form>
</body>
</html>
Page2:
<html>
<head>
<title></title>
</head>
<style>
</style>
<body>
<?php
echo $_POST["firstname"];
?>
</body>
</html>
all i am left with is a blank page, any help!
tried everything suggested, still nothing!!! any other suggestions
i have tried copying and pasting other forms from tutorials and none of these work either!!! so it may not be my script but something else? help
also does one file have to be .html and one .php or what because i dont think it is my script? thanks for any help
first page:
<html>
<head>
<title>Main site</title>
</head>
<style>
.mainbody{
color: white
}
</style>
<body class=mainbody background= "background.jpg">
<center>
<h1>Human Test! Just to make sure you are not a bot!</h1>
</center>
<form name="coolquiz" action="quizresults.php" method="post">
<br>
Name: <input type:"text" name:"Firstname">
<br>
Click the number 3:
<br>
1:<input type="radio" name="threeclick" value="1">
<br>
2:<input type="radio" name="threeclick" value="2">
<br>
3:<input type="radio" name="threeclick" value="3">
<br>
4:<input type="radio" name="threeclick" value="4">
<br>
<input type="submit" name="submitbutton" value="click when finished!">
</form>
</body>
</html>
Page2:
<html>
<head>
<title></title>
</head>
<style>
</style>
<body>
<?php
echo $_POST["firstname"];
?>
</body>
</html>
all i am left with is a blank page, any help!
tried everything suggested, still nothing!!! any other suggestions
i have tried copying and pasting other forms from tutorials and none of these work either!!! so it may not be my script but something else? help
also does one file have to be .html and one .php or what because i dont think it is my script? thanks for any help