Hello everyone.
I've got a problem with a webform that uses PHP. I'm sure it's very obvious but can't find the problem.
What I want to do is basically enter a numerical value into a field on a form, which then sends the value to a mysql database, requesting a record linked to that value. A window opens with the record requested.
The problem I am getting is that the value is not being taken properly when I hit the 'submit' button, but will take the previous value that was submitted a previous query.
For example, I want to retrieve a record that has an 'id' of 1. I enter '1' into the field (the id of the field is 'identry'), I get an error. The error basically signifies staes that I have not entered a value into the 'id' field, for some reason. Then I access the search field again, enter a value of '2', and hit the 'submit'. I then get a result that it has just accessed record with 'id' of '1' (the previous query!!!!)
Any ideas??
This is my code for the form.....
<form id="form1" name="form1" method="post" >
<table width="400" border="0">
<tr>
<td width = "150" ><div align="right">HPOV reference </div></td>
<td width = "150"><label>
<input name= "identry" type="text" id="identry" />
</label></td>
<td width = "100"><label>
<div align="left">
<input name="Submit" type="submit" onclick="MM_openBrWindow('HPOVwindow.php?id=<?php echo $_POST['identry']; ?>','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1000,height=1000')" />
</div>
</label></td>
</tr>
</table>
</div>
</form>
Apologies if this is in the wrong place.
Thank you for reading.
Chris