User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,714 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,228 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

php drop down menu to search multiple sql tables

Join Date: Jul 2005
Posts: 11
Reputation: lawfour is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
lawfour lawfour is offline Offline
Newbie Poster

Re: php drop down menu to search multiple sql tables

  #5  
Jul 27th, 2005
Ok, I hope I got the code right so far, if it is, now I need to connect to database.

I created the process.php file with this info:

<?php

echo $_POST['my_textbox'];
echo $_POST['my_dropdown'];

//The name of these post variables is the same as the name
//of the elements that were in the form

?>


This is the search (live) htt://www.lawfour/esr/search.php

I added the JS right under the form post info.

<form name="thisForm" method="POST" action="process.php">


<SCRIPT LANGUAGE="javascript">

function validate() {

fm = document.thisForm

//use validation here to make sure the user entered
//the information correctly

fm.submit()

}

</SCRIPT>

<table width="30%" border="0" cellspacing="0" cellpadding="0">
<tr>


<td width="7%" class="verdana_login">Search:</td>
<td width="8%">
&nbsp;<input type="text" name="my_textbox" size="10">&nbsp;
</td>
<td width="12%">
<select name="my_dropdown">
<option>Airgas Tickets</option>
<option>Products</option>
<option >Pending Repairs</option>
<option selected>Common Equip.</option>
<option >Lab Equip.</option>
<option >Vendors</option>
<option >RTP's</option>

</select>
</td>

<td width="13%" align="center">&nbsp;<INPUT type=image name="btm_submit" src="http://www.lawfour.com/esr/images/go.gif" border="0" width="35" height="22" onclick="validate()"></td>



</table>
Reply With Quote  
All times are GMT -4. The time now is 12:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC