Hi Guys,
I need your help please, please take a look at some of my code below:
<form id="form1" name="form1" method="post" action="viewaffiliates.php?affid=<? echo $AffID; ?>">
<table width="60%" border="0">
<tr>
<td width="28%" class="accountfield">Select Affiliate:</td>
<td width="72%"><select name="SelectAffiliate" id="SelectAffiliate">
<?php
$i=0;
while ($i < $num) {
$AffID=mysql_result($result,$i,"AffID");
$FirstName=mysql_result($result,$i,"FirstName");
$LastName=mysql_result($result,$i,"LastName");
$Company=mysql_result($result,$i,"Company");
?>
<option value="<? echo $AffID; ?>"><? echo $Company; ?></option>
<?
$i++;
}
?>
</select>
<input type="submit" name="Submit" id="Submit" value="Select" /></td>
</tr>
As you can see on the first line above I’m calling a variable called $AffID before its even been given a value. Now i cant add that line of code after the PHP or else it would just create a load of new Forms depending on how many values are in my table.
Can anyone help me please so the value of the selected Option is placed in the Action url please.
Thank you in advance.
Thanks!