Hi,
I have a form(form1.php)contains textbox, combobox and submit button.
<script javascript....>
function loadPage(this){
location.href(i redirect the page using the option.value);
}
</script>
<?php
<td align="right"><B>Client Name:</B></td>
<td><?php print $contact_company; ?><INPUT TYPE="hidden" NAME="clientname" VALUE="<?php print $contact_company; ?>" SIZE="25" CLASS="text"></td>
<INPUT TYPE="hidden" NAME="pro_list" VALUE="<?php print $list_id; ?>"
<TD ALIGN="RIGHT"><B>Representative:</B></TD>
<?PHP
if($access_level=="1"){
print "<input type=hidden name=\"rep_id\" value=\"$rep_id\">";
print "<td>$first_name $last_name</td>";
} else{
print "<td><select name=\"rep_id\" size=\"1\" class=\"text\">\n";
$repsql = mysql_query("SELECT rep_id, first_name, last_name, AreaName FROM sales_reps, areas WHERE AreaID=userarea AND access_level='1' ORDER BY last_name");
print "<option value=\"\" SELECTED> </option>\n";
while ($reprow = mysql_fetch_array($repsql)) {
extract($reprow);
print "<option value=\"$rep_id\">$last_name, $first_name - $AreaName</option>\n";
}
print "</select></td>\n";
}
?>
<select name="rfproposal" size="1" class="text" tabindex="11" onchange="loadPage(this)" >
print "<option value=\"\" SELECTED>No</option>";
print "<option value=\"rfpform1.php?update=$list_id&rep_id=$rep_id\">Yes</option>\n";
?>
i redirect to rfpform1.php page when the user selects "yes" in combobox.
The page opens.
I would like to retrieve the form1.php values like clientname, repname and area in rfpform1.php.
How i can display the previous form value?
I tried using
rfpform1.php?update=120&rep_id=$12
<td width="30%">Account Representative:</td>
<?php
$repsql = mysql_query("SELECT first_name, last_name FROM sales_reps WHERE rep_id = $_GET[rep_id]");
$repsqlrow = mysql_fetch_array($repsql);
extract($repsqlrow);
print "<td width=\"30%\">$first_name$last_name</td>";
?>
But i could not able to retrieve.
Is it possible to get the values from the previous page when a page opened using javascript?
Help me please,
Thanks.