I am trying to build a website and I need to pass variables from html to php. I tried different tutorials but they all don’t work. The last one I was using is from PHP: Variablen aus externen Quellen - Manual (sorry it’s german )
When I copy the code it still is not working and I do not know why. I just get a blank page as soon I press the submit button.
I am an bsolute beginner and I do not understand prepared forms which are a little bit more complicates so I really need something easy to understand the process.
HTML code:
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<form action="welcome.php" method="post">
Name: <input type="text" name="username" /><br />
E-Mail: <input type="text" name="email" /><br />
<input type="submit" name="submit" value="Und ab!" />
</form>
PHP code
<?php echo $_POST['username']; echo $_REQUEST['username']; ?>