Hi and thanks in advance. I'm a complete novice to this will be kids stuff to you guys and girls.
I'm trying to do a calculation on what a user fills out on one php page (index.php) and then print out the calculated value on another (page message.php). The problem is I'm getting the following error on the message.php page after submitting the form.
[INDENT]Parse error: syntax error, unexpected '=' in /www/zxq.net/c/a/r/mywebpage/htdocs/message.php[/INDENT]
This is the form code in my index.php page....
<form action="message.php" name="loancalc" method="post">
<br />
<br />
<br />
<table style="border-collapse:collapse; padding:10px" width="100%" border="0">
<tr style="padding:15px">
<td colspan="2" align="center" valign="middle"><h3 style="padding-left:5px; padding-top:30px; color:#333333; size:14px">Loan Calculation Form</h3>
<p>Calculate your monthly loan payments</p>
<br /><hr width="50%" />
</td>
</tr>
<tr height="50px">
<td width="50%" height="55" align="right" valign="middle">Required Loan Amount:</td>
<td valign="middle"><input id="loan-amount" value="Loan amount" type="text" name="loan-amount" size="6"></td>
</tr>
<tr height="50px">
<td width="50%" height="55" align="right" valign="middle">Over how long:</td>
<td valign="middle"><input id="loan-period" type="text" value="Loan period" name="loan-period" size="6"></td>
</tr>
<tr height="55">
<td height="42" colspan="2" align="center" valign="middle"><input id="submitbutton" name="submitbutton" type="submit" value="Calculate Payment"></td>
</tr>
</table>
</form></td>
And this is the code in the page it goes to....
<?php
$loan-amount = $_POST['loan-amount'] ;
$loan-period = $_POST[['loan-period'] ;
echo "<ul><li>".$loan-amount."</li><li>".$loan-peroid."</li></ul>";
?>
Any ideas what I'm doing wrong?