E Eder L Guest Mar 20, 2009 #1 I'm creating a site, but I'm new at this and I need to create a FORM or something else were users can go ahead and enter their name, phone and email and them to be displayed on the same page below...
I'm creating a site, but I'm new at this and I need to create a FORM or something else were users can go ahead and enter their name, phone and email and them to be displayed on the same page below...
D DzSoundNirvana Guest Mar 20, 2009 #2 using HTML will not give you any results. HTML is a static language! you will need some other form or storing the information for later use. but here is some PHP <? //index.php session_start(); if($_SERVER['REQUEST_METHOD'] == "POST"){ foreach($_POST as $key => $value){ $_SESSION[$key] = $value; echo $value . "<br>"; } } else{ echo "<form method=\"POST\" action=\"$_SERVER['PHP_SELF']\"><input type=\"text\" name=\"name\"><input type=\"text\" name=\"phone\"><input type=\"text\" name=\"email\"><input type=\"submit\" value=\"submit\"></form>"; } ?>
using HTML will not give you any results. HTML is a static language! you will need some other form or storing the information for later use. but here is some PHP <? //index.php session_start(); if($_SERVER['REQUEST_METHOD'] == "POST"){ foreach($_POST as $key => $value){ $_SESSION[$key] = $value; echo $value . "<br>"; } } else{ echo "<form method=\"POST\" action=\"$_SERVER['PHP_SELF']\"><input type=\"text\" name=\"name\"><input type=\"text\" name=\"phone\"><input type=\"text\" name=\"email\"><input type=\"submit\" value=\"submit\"></form>"; } ?>