starhawk85
Members-
Posts
44 -
Joined
-
Last visited
Never
Everything posted by starhawk85
-
so then something like this ? $title = mysql_query("SELECT * FROM title ORDER BY title ASC")
-
it is just that an example. to clerify further. Very clear. When i search i am able to view my results. When viewing my results they read g 2 z e a 9 m c I would like it if my results would show in the following manner... a c e g m z 2 9 or 2 9 a c e g m z PHP code provided above.
-
You know, ManiacDan is probably the best person to have replied next. I suggest you read all the links in his signature. They are all good. And as he stated, "alpha numeric" is not clear at all, neither is your argument that what I suggested is "pre defined". Seriously. Read those links. Im not here to argue with you nore make any issues. as each time i have signed on for help i have received a "i don't understand but here is a link" from you. I wish not to continue this quarrel any longer good day to you ma'am
-
Well it's your lucky day: There is no such thing as "alphanumeric order." You'll have to clarify. Natural order? ASCII order? Give examples. You could also order your query Very clear. When i search i am able to view my results. When viewing my results they read g z e a m c I would like it if my results would show in the following manner... a c e g m z PHP code provided above.
-
mo that would be pre defined. I clearly stated that i wanted to have search results displayed in alpha numeric order. If you don't understand please ask for clarification, otherwise don't respond.
-
okay so i have my search results and i wanted to know how i can get them to display in alpha numeric order. here is the reults code. <?php if (isset($qry_results)) { ?> <div id="results"> <!-- results listing --> <?php foreach ($qry_results as $_key => $_row){ $last_domain = $domain_name; extract($_row); if ($show_query_scores == 0) { $weight = ''; } else { $weight = "[$weight%]"; } ?> <?php if ($domain_name==$last_domain && $merge_site_results == 1 && $domain == "") {?> <div class="idented"> <?php }?> <b><?php print $num?>.</b> <?php print $weight?> <a href="<?php print $url?>" class="title"> <?php print ($title?$title:$sph_messages['Untitled'])?></a><br/> <div class="description"><?php print $fulltxt?></div> <?php if ($domain_name==$last_domain && $merge_site_results == 1 && $domain == "") {?> [ <a href="<?php print 'search.php?query='.quote_replace(addmarks($query)).'&search=1&results='.$results_per_page.'&domain='.$domain_name?>">More results from <?php print $domain_name?></a> ] </div class="idented"> <?php }?> <br/> <?php }?> </div> <?php }?> Thanks in advance!
-
drop down search only or mulit selection search?
starhawk85 replied to starhawk85's topic in MySQL Help
found simpler SOLUTION: added + to onchange="document.getElementById('query').value=this.value;" onchange="document.getElementById('query').value+=this.value;" Problem fixed Thank you all for your efforts! -
SOLUTION added + to onchange="document.getElementById('query').value=this.value;" onchange="document.getElementById('query').value+=this.value;" Problem fixed
-
Here is what I'm working with. what is working is the BOLD RED in the code is what is taking my drop down selection and placing it in the search text field. Here is my code <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <p> <select name="state" onchange="document.getElementById('query').value=this.value;"> <option value="Nation Wide"> Nation Wide </option> <option value="Nation Wide ex AK/HI"> Nation Wide ex AK & HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop" onchange="document.getElementById('query').value=this.value;"> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </p> </form> </div> <td> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> I need help with understanding how to..... 1. Apply both drop downs to the search without erasing first one. 2. Separate by ( ) A SPACE Any ideas and or help would be great. Thanks in advance
-
Here is what I'm working with. what is working is the BOLD RED in the code is what is taking my drop down selection and placing it in the search text field. Here is my code <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <p> <select name="state" onchange="document.getElementById('query').value=this.value;"> <option value="Nation Wide"> Nation Wide </option> <option value="Nation Wide ex AK/HI"> Nation Wide ex AK & HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop" onchange="document.getElementById('query').value=this.value;"> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </p> </form> </div> <td> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> I need help with understanding how to..... 1. Apply both drop downs to the search without erasing first one. 2. Separate by ( ) A SPACE Any ideas and or help would be great. Thanks in advance
-
drop down search only or mulit selection search?
starhawk85 replied to starhawk85's topic in MySQL Help
Honestly have no idea what that means but it gives me a start to begin learning more. Thanks for the help. -
drop down search only or mulit selection search?
starhawk85 replied to starhawk85's topic in MySQL Help
any suggestions? -
drop down search only or mulit selection search?
starhawk85 replied to starhawk85's topic in MySQL Help
My code here is the user interface, the bold red is what is taking the selection from the drop down to insert into the search field. it is working so far.. I just need to get both drop downs to go into the search text box and have a space between them... <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <p> <select name="state" onchange="document.getElementById('query').value=this.value;"> <option value="Choose State"> Choose State </option> <option value="Dir"> Nationwide </option> <option value="Nationwide Ex AK and HI"> Nationwide Ex AK and HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop" onchange="document.getElementById('query').value=this.value;"> <option value="Choose Property Type"> Choose Property Type </option> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </p> </form> </div> <td> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> -
drop down search only or mulit selection search?
starhawk85 replied to starhawk85's topic in MySQL Help
Here is what I'm working with. Here is my code <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <p> <select name="state" onchange="document.getElementById('query').value=this.value;"> <option value="Nation Wide"> Nation Wide </option> <option value="Nation Wide ex AK/HI"> Nation Wide ex AK & HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop" onchange="document.getElementById('query').value=this.value;"> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </p> </form> </div> <td> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> i am still unable to apply both drop downs to the search and seperate by ( ) A SPACE Any ideas and or help would be great. Thanks again. -
Okay another run, I sould really try to solve for x first before post. I fixed the extra text box and extra submit button problem Here is my code <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <p> <select name="state" onchange="document.getElementById('query').value=this.value;"> <option value="Nation Wide"> Nation Wide </option> <option value="Nation Wide ex AK/HI"> Nation Wide ex AK & HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop" onchange="document.getElementById('query').value=this.value;"> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </p> </form> </div> <td> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> View attachment to see view. i am still unable to apply both drop downs to the search and seperate by (, ) ,SPACE how would i go about this?
-
Okay so i have the following code and have placed the code you provided to me in appropriate spots, and it works. I now have the following. I have changed BOLD RED <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <input type="text" name="search"> <select name="state" onchange="document.getElementById('query').value=this.value;"> <option value="Nation Wide"> Nation Wide </option> <option value="Nation Wide ex AK/HI"> Nation Wide ex AK & HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop" onchange="document.getElementById('query').value=this.value;"> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </form> </div> <td> <input type="submit" value="<?php print $sph_messages['Search']?>"> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> Now i get two search text boxes and two submit search buttons. (View Attachment) How do i get rid of the new text box. Allow both drop downs to be placed in search. Add ,SPACE (, ) to separate the inputs from drop downs. I believe this would finalize my questions...
-
What part of the code are you looking at? Whare would i apply this?
-
Hello, I am currently using a pre-built search for my PHP, MySQL web site, I am using Sphider. I have altered the search to display drop down boxes that allow you to select the state and prop type, my question is how can i get the drop down boxes to automaticly fill in the search text box or use the drop downs for search only. here is the php for search. <?php /******************************************* * Sphider Version 1.3.x * This program is licensed under the GNU GPL. * By Ando Saabas ando(a t)cs.ioc.ee ********************************************/ //error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); error_reporting(E_ALL); $include_dir = "./include"; include ("$include_dir/commonfuncs.php"); //extract(getHttpVars()); if (isset($_GET['query'])) $query = $_GET['query']; if (isset($_GET['search'])) $search = $_GET['search']; if (isset($_GET['domain'])) $domain = $_GET['domain']; if (isset($_GET['type'])) $type = $_GET['type']; if (isset($_GET['catid'])) $catid = $_GET['catid']; if (isset($_GET['category'])) $category = $_GET['category']; if (isset($_GET['results'])) $results = $_GET['results']; if (isset($_GET['start'])) $start = $_GET['start']; if (isset($_GET['adv'])) $adv = $_GET['adv']; $include_dir = "./include"; $template_dir = "./templates"; $settings_dir = "./settings"; $language_dir = "./languages"; require_once("$settings_dir/database.php"); require_once("$language_dir/en-language.php"); require_once("$include_dir/searchfuncs.php"); require_once("$include_dir/categoryfuncs.php"); include "$settings_dir/conf.php"; include "$template_dir/$template/header.html"; include "$language_dir/$language-language.php"; if ($type != "or" && $type != "and" && $type != "phrase") { $type = "and"; } if (preg_match("/[^a-z0-9-.]+/", $domain)) { $domain=""; } if ($results != "") { $results_per_page = $results; } if (get_magic_quotes_gpc()==1) { $query = stripslashes($query); } if (!is_numeric($catid)) { $catid = ""; } if (!is_numeric($category)) { $category = ""; } if ($catid && is_numeric($catid)) { $tpl_['category'] = sql_fetch_all('SELECT category FROM '.$mysql_table_prefix.'categories WHERE category_id='.(int)$_REQUEST['catid']); } $count_level0 = sql_fetch_all('SELECT count(*) FROM '.$mysql_table_prefix.'categories WHERE parent_num=0'); $has_categories = 0; if ($count_level0) { $has_categories = $count_level0[0][0]; } require_once("$template_dir/$template/search_form.html"); function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } function poweredby () { global $sph_messages; //If you want to remove this, please donate to the project at http://www.sphider.eu/donate.php print $sph_messages['Powered by'];?> <a href="http://www.sphider.eu/"><img src="sphider-logo.png" border="0" style="vertical-align: middle" alt="Sphider"></a> <?php } function saveToLog ($query, $elapsed, $results) { global $mysql_table_prefix; if ($results =="") { $results = 0; } $query = "insert into ".$mysql_table_prefix."query_log (query, time, elapsed, results) values ('$query', now(), '$elapsed', '$results')"; mysql_query($query); echo mysql_error(); } switch ($search) { case 1: if (!isset($results)) { $results = ""; } $search_results = get_search_results($query, $start, $category, $type, $results, $domain); require("$template_dir/$template/search_results.html"); break; default: if ($show_categories) { if ($_REQUEST['catid'] && is_numeric($catid)) { $cat_info = get_category_info($catid); } else { $cat_info = get_categories_view(); } require("$template_dir/$template/categories.html"); } break; } include "$template_dir/$template/footer.html"; ?> here is the HTML form <center> <table cellpadding="5" cellspacing="1" class="searchBox"> <tr> <td align="center"> <form action="search.php" method="get"> <table><tr><td> <div align="left"> <input type="text" name="query" id="query" size="40" value="<?php print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500"> <form action="" method ="post"> <input type="text" name="search"> <select name="state"> <option value="Nation Wide"> Nation Wide </option> <option value="Nation Wide ex AK/HI"> Nation Wide ex AK & HI </option> <option value="Alabama"> Alabama </option> <option value="Alaska"> Alaska </option> <option value="Arizona"> Arizona </option> <option value="Arkansas"> Arkansas </option> <option value="California"> California </option> <option value="Colorado"> Colorado </option> <option value="Connecticut"> Connecticut </option> <option value="Deleware"> Deleware </option> <option value="Florida"> Florida </option> <option value="Georgia"> Georgia </option> <option value="Hawaii"> Hawaii </option> <option value="Idaho"> Idaho </option> <option value="Illinois"> Illinois </option> <option value="Indiana"> Indiana </option> <option value="Iowa"> Iowa </option> <option value="Kansas"> Kansas </option> <option value="Kentucky"> Kentucky </option> <option value="Louisiana"> Louisiana </option> <option value="Maine"> Maine </option> <option value="Maryland"> Maryland </option> <option value="Massachusetts"> Massachusetts </option> <option value="Michigan"> Michigan </option> <option value="Minnesota"> Minnesota </option> <option value="Mississippi"> Mississippi </option> <option value="Missouri"> Missouri </option> <option value="Montana"> Montana </option> <option value="Nebraska"> Nebraska </option> <option value="Nevada"> Nevada </option> <option value="New Hampshire"> New Hampshire </option> <option value="New Jersey"> New Jersey </option> <option value="New Mexico"> New Mexico </option> <option value="New York"> New York </option> <option value="North Carolina"> North Carolina </option> <option value="North Dakota"> North Dakota </option> <option value="Ohio"> Ohio </option> <option value="Oklahoma"> Oklahoma </option> <option value="Oregon"> Oregon </option> <option value="Pennsylvania"> Pennsylvania </option> <option value="Rhode Island"> Rhode Island </option> <option value="South Carolina"> South Carolina </option> <option value="South Dakota"> South Dakota </option> <option value="Tennessee"> Tennessee </option> <option value="Texas"> Texas </option> <option value="Utah"> Utah </option> <option value="Vermont"> Vermont </option> <option value="Virginia"> Virginia </option> <option value="Washington"> Washington </option> <option value="West Virginia"> West Virginia </option> <option value="Wisconsin"> Wisconsin </option> <option value="Wyoming"> Wyoming </option> </select> <select name="prop"> <option value="Downtown or Streetfront"> Downtown or Streetfront </option> <option value="Freestanding Pad"> Freestanding Pad </option> <option value="Lifestyle Center"> Lifestyle Center </option> <option value="Mall or Food Court"> Mall or Food Court </option> <option value="Nontraditional Units"> Nontraditional Units </option> <option value="Power Center"> Power Center </option> <option value="Shopping Center"> Shopping Center </option> <option value="Entertainment Center"> Entertainment Center </option> <option value="Manufacturer Outlet Center"> Manafacturer Outlet Center </option> <option value="Regional Mall"> Regional Mall </option> </select> <input type="submit" name="submit" value="search"> </form> </div> <td> <input type="submit" value="<?php print $sph_messages['Search']?>"> </td></tr></table> <?php if ($adv==1 || $advanced_search==1) { ?> <table width = "100%"> <tr> <td width="40%"><input type="radio" name="type" value="and" <?php print $type=='and'?'checked':''?>><?php print $sph_messages['andSearch']?></td> <td><input type="radio" name="type" value="or" <?php print $_REQUEST['type']=='or'?'checked':''?>><?php print $sph_messages['orSearch']?></td></tr> <tr> <td><input type="radio" name="type" value="phrase" <?php print $_REQUEST['type']=='phrase'?'checked':''?>><?php print $sph_messages['phraseSearch']?></td> <td><?php print $sph_messages['show']?> <select name='results'> <option <?php if ($results_per_page==10) echo "selected";?>>10</option> <option <?php if ($results_per_page==20) echo "selected";?>>20</option> <option <?php if ($results_per_page==50) echo "selected";?>>50</option> <option <?php if ($results_per_page==100) echo "selected";?>>100</option> </select> <?php print $sph_messages['resultsPerPage']?> </td> </tr> </table> <?php }?> <?php if ($catid<>0){?> <center><b><?php print $sph_messages['Search']?></b>: <input type="radio" name="category" value="<?php print $catid?>"><?php print $sph_messages['Only in category']?> "<?php print $tpl_['category'][0]['category']?>'" <input type="radio" name="category" value="-1" checked><?php print $sph_messages['All sites']?></center> <?php }?> <input type="hidden" name="search" value="1"> </form> <?php if ($has_categories && $search==1 && $show_categories){?> <a href="search.php"><?php print $sph_messages['Categories']?></a> <?php }?> </td> </tr> </table> </center> I just assume my error is here in the HTML... Any help would be more than appreciated.
-
NEW HERE, New to Mysql, I know little PHP okay so i have been searching like crazy, Really need help or an solution. I really want to take a general search like the following __________________________ ________ | TYPE HER TO SEARCH | | SEARCH | Example http://www.google.com __________________________ ________ to search in these means _________ ________ ________ | STATE | V | | CITY | V | | SEARCH | Example http://www.carquotes.com/used_cars/ _________ ________ ________ How do I go about starting on this? also what is this type of search called?