Jump to content

Search result for add more fields script


muzaffar

Recommended Posts

1. How do i made recordset for add more fields script so that users can update later also
2. This code is related to Parent adding family details(add more fields script is used) and much more like simple matrimony site.
Example,My name is jone and i have three children ie jone1 (Age:25,Gender:male,status:divorced),jone2
(Age:18,Gender:female,status:unmarried),jone3 (Age:30,Gender:male,status:separated).If user search country:japan,Age:25,Gender:male,status:divorced then use get the result for only jone1 row(add more fields
script) and jone2 + jone3 does not be show in result.Keeping headname,native,country,state of parent default execute.

I put all the detail in server .Please refer to this link and if you have any solution tell me or you can give me hint also. http://caringhandsrehab.in/addmore/index.php

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head
<body>
<form method="post" action="" name="form1" id="form1" >
<select name="search_gender" id="search_gender" required >
<option value="" selected="selected">Looking for</option>
<option value="male">male</option>
<option value="female">female</option>
</select>
<select name="search_from" id="search_from" required>
<option value="" selected >Age from</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
</select>
<select name="search_to" id="search_to" required>
<option value="" selected>Age to</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
</select>
<select name="search_status" id="search_status" required>
<option value="" selected="selected">Marital Status</option>
<option value="unmarried">Unmarried</option>
<option value="widow">Widow/Widower</option>
</select>
<select onchange="print_offstate('offstate',this.selectedIndex);" id="offcountry" name ="offcountry" required> </select>
<select name ="offstate" id ="offstate" required></select>
<script language="javascript">print_offcountry("offcountry");</script>

<input type="submit" name="doSearch" id="doSearch2" value="Search" />
</form>
<table width="960" border="1" cellspacing="0" cellpadding="4">
<tr>
<td width="50" bgcolor="#CCCCCC"><strong>ID</strong></td>
<td width="150" bgcolor="#CCCCCC"><strong>Head name</strong></td>
<td width="100" bgcolor="#CCCCCC"><strong>Native place</strong></td>
<td width="150" bgcolor="#CCCCCC"><strong>Name</strong></td>
<td width="60" bgcolor="#CCCCCC"><strong>Gender</strong></td>
<td width="75" bgcolor="#CCCCCC"><strong>Birthdate</strong></td>
<td width="30" bgcolor="#CCCCCC"><strong>Age</strong></td>
<td width="95" bgcolor="#CCCCCC"><strong>Relation</strong></td>
<td width="125" bgcolor="#CCCCCC"><strong>Education</strong></td>
<td width="75" bgcolor="#CCCCCC"><strong>Status</strong></td>
<td width="50" bgcolor="#CCCCCC"><strong>Detail</strong></td>
</tr>
<?php
$doSearch = $_GET['doSearch'];
if($_REQUEST["search_gender"] <>'' && $_REQUEST["search_from"] <>'' && $_REQUEST["search_to"] <>'' && $_REQUEST["search_status"] <>'' && $_REQUEST["offcountry"] <>'' && $_REQUEST["offstate"] <>'') {
$sql = "select * from users u LEFT JOIN web w on (w.id = u.id) WHERE MATCH(id,full_name,native,country,state) AGAINST('%$doSearch%' IN BOOLEAN MODE) "; }
$sql_result = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql);
if (mysql_num_rows($sql_result)>0) {
while ($row = mysql_fetch_assoc($sql_result)) {
?>
<tr>
<td><?php echo $row["id"]; ?></td>
<td><?php echo $row["full_name"]; ?></td>
<td><?php echo $row["native"]; ?></td>
<td><?php echo $row["dynname"]; ?></td>
<td><?php echo $row["dyngender"]; ?></td>
<td><?php echo $row["dyndob"]; ?></td>
<td><?php echo $row["dynage"]; ?></td>
<td><?php echo $row["dynrelation"]; ?></td>
<td><?php echo $row["dyneducation"]; ?></td>
<td><?php echo $row["dynstatus"]; ?></td>
<td><?php echo '?id='. $row['id']; ?> </td>
</tr>
<?php
}
} else {
?>
<tr><td colspan="5">No results found.</td>
<?php
}
?>
</table>
</body>
</html>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.