Ok I have this following code in php/html
Code: Select all
<?php
//all the db, connect ,table is defined here
$memberLastName = $_POST['lastName'];
$memberFirstName = $_POST['firstName'];
//create and execute query
$query = "SELECT last_name,first_name FROM $usertable WHERE last_name = '$memberLastName' ";
$result = mysql_query($query) or die ('Error in query: $query. ' . mysql_error());
while($row = mysql_fetch_row($result))
{
echo $_POST['last_name']; // its not showing
echo $_POST['first_name']; // its not showing
$memberLastName = $row['last_name']; // its not showing
$memberFirstName = $row['first_name']; // its not showing
}
?>
//here goes the html code that has lastName and firstName
<FORM NAME="myform" method="POST" action="">
<tr>
<td nowrap="true" class="primary" valign="top">
Last Name: </td>
<td valign="top" class="primary">
<input type="text" name="lastName" <?php echo "value=\"$LastName\"" ?> onChange="modified=true" /> </td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">
First Name: </td>
<td valign="top" class="primary">
<input type="text" name="firstName" <?php echo "value=\"$FirstName\"" ?> onChange="modified=true" /> </td>
</tr>
<tr>
<input type="button" onClick="self.location=''" value="CMB LookUp" class="button">
</form>
Anyways I would appreciate any pointers, I need a fresh pair of eyes on this one.
Thanks in advance.
:) :)