Trying to leran php at the moment, after a several bits of code i wrote not working i have copied a few bits of exemplar code in, and they still do not work.
Basically all text is displayed from a php print command, however variable values are not. Here is an example of what i mean....
All files are within xampp/htdocs/folder and apache is running.
page.html
- Code: Select all
<form action="page.php" method="post">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
page.php
- Code: Select all
<p>
Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old.
<p>
and this displays;
Welcome .
You are years old.
This is sample code from w3schools.com