Hi all
I am new to php and am putting together a database app using Dreamweaver MX. I have a form which submits a search query to a results page and appends 2 form fields to the URL. everything works if both fields are filled in, but I want to give a user the option of using the <select> option within the form to jump to another page other than the search page passing the record ID to that page. I have included current code below, but in pigeon speak I want to do this: <form (if both fields filled in, goto searchresults page passing customer parameter, else if customer field is blank, goto page determined by <option value>) method=get...
Here is current code:
<form action="SearchResults.php?Customer=<?php echo $row_RScustomSearch['Customer']; ?>&selform=&xCustomerID=<?php echo $HTTP_GET_VARS['CustomerID']; ?>" method="get" name="Search" id="Search">
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFCC00">
<tr>
<td width="70"><p><strong>Search</strong></p></td>
<td width="70"> <p>Company</p></td>
<td width="154"> <input name="Customer" type="text" id="Customer4">
</td>
<td width="88"><p> Form View</p></td>
<td width="131"> <select name="selform" id="selform">
<option value="customers.php">Customer Details</option>
<option value="installs.php">Installation Details</option>
<option value="maintenance.php">Maintenance Details</option>
<option value="leaseDetails.php">Lease Details</option>
<option value="cabling.php">Cabling</option>
<option value="CallRegister.php">Call Register</option>
<option value="callsOutstanding.php">Calls Outsanding</option>
<option value="Bookoff.php">Book off an Engineer</option>
<option value="newquote.php">New Quote</option>
<option value="newjob.php">New Job</option>
</select></td>
<td width="68"><font color="#FFFFFF">
<input type="submit" name="Submit" value="GO">
</font></td>
</tr>
</table>
</form>