I have a really simple php form to learn php. I have the code from a tutorial. My html is:
<form action="php/learnphp.php" method="post">
<table border="0">
<tr>
<td>Name</td>
<td align="center">
<input type="text" name="username" size="30" />
</td>
</tr>
<tr>
<td>Address</td>
<td align="center">
<input type="text" name="streetaddress" size="30" />
</td>
</tr>
<tr>
<td>City</td>
<td align="center">
<input type="text" name="cityaddress" size="30" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Submit" />
</td>
</tr>
</table>
</form>
my php file is:
<?php
$usersName = $_POST['username'];
$streetAddress = $_POST['streetaddress'];
$cityAddress = $_POST['cityaddress'];
echo '<p>Your Information</p>';
// You can combine variables with text using a .
echo $usersName. ' lives at </br>';
echo $streetAddress. ' in </br>';
echo $cityAddress. '</br></br>'; ?>
If I press the submit button i get an error that says: Cannot POST /php/learnphp.php.
i have the form in the root map and my php in a map called 'php'. I know it's probably really simple but i cant seem to figure it out.