Hi,
I am trying to make a job board.
I have made two search boxes:
1/ Job Title
2/ Location
I have made a mockup form for the recruiters to input their job data into my database.
How do I link up two of the fields from the table so the job title when searched is matched up with the location?
The table consists of
msg_id | name | location | msg
Name is the table field for 'Job Title' by the way
The code is below:
Thanks!
James
I am trying to make a job board.
I have made two search boxes:
1/ Job Title
2/ Location
I have made a mockup form for the recruiters to input their job data into my database.
How do I link up two of the fields from the table so the job title when searched is matched up with the location?
The table consists of
msg_id | name | location | msg
Name is the table field for 'Job Title' by the way
The code is below:
Thanks!
James
Code:
<html> <Head> <title>Contact form</title> <style type="text/css"> table{ border:1; border-collapse:collapse; font: normal 12px 'Lucida Grande',Verdana,sans-serif; } td{ color:#663333;font-family:verdana; border-bottom: 1px solid #666; padding-left:10px; background-color:#F0F8FF; } #sub{ text-align:center;} </style> </Head> <body> James' New Site <br> <h2> FeedBack/Contact Form</h2> <form action="contact_insert.php" method="POST" id="insert"> <table> <tr> <td >Name*</td> <td ><input type="text" size=40 name="name"></td> </tr> <tr> <td >location</td> <td ><input type="text" size=40 name="location"></td> </tr> <tr> <td >Comments/Suggestions*</td> <td ><textarea name="msg" cols=40 rows=7></textarea> </td> </tr> <tr> <td colspan=2 id="sub"><input type="submit" name="submit" value="submit" ></td> </tr> </Table> </form> <br> <br> <form action="seaside.php" method="post"> <input type="text" name="search"> <input type="text" name="search2"> <input type="submit"> </form> <hr width="100%"></hr> </body> </html> <?php if(strlen(trim($_POST['search'])) > 0) { //all of your php code for the search $search = "%" . $_POST["search"] . "%"; mysql_connect ("", "", ""); mysql_select_db (""); if (!empty($_POST["search_string"])) { // then perform your queries and stuff here. } $query = "SELECT name,msg FROM contact WHERE name LIKE '$search'"; $result = mysql_query ($query); if ($result) { while ($row = mysql_fetch_array ($result)) { echo "<br>$row[0]</br>"; echo $row[1]; } } } ?>
Comment