473,804 Members | 3,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

display the result of search query

14 New Member
hi everybody... i ran across the site and found TONS of information about what i want to do.... but i don't know what to take for my need.

here is what i want to do... a search engine for my website through the database.

you can see what i have done for now at this url

http://www.scale24-25.com/kitDB-site.php

this is the code

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // include server parameters
  3.   require('includes/configure-web.php');
  4.  
  5. ?>
  6.  
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  11. <title>scale24-25.com</title>
  12. </head>
  13.  
  14. <body>
  15. <?php
  16. // Make a MySQL Connection
  17. mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die(mysql_error());
  18. mysql_select_db(DB_DATABASE) or die(mysql_error());
  19.  
  20.  
  21. //////////////////////////////////////////////////////////////////////////////
  22.  ?>
  23.  
  24.  
  25.  
  26. <table width="100%" border="0">
  27.   <tr>
  28.     <td><label>
  29.  
  30.         <?php        //  debut drop down  ///
  31. $sql = mysql_query("SELECT DISTINCT scale FROM kit ");
  32. $options = '';
  33.  
  34. echo '<select scale="scale"><option>Scale</option>';
  35.  
  36. while($row = mysql_fetch_array($sql)) {
  37. $thing = $row['scale'];
  38. echo '<option>'.$thing.'</option>';
  39. }
  40. echo '</select>';
  41. // fin dropdown ///?>
  42.  
  43.     </label></td>
  44.     <td>
  45. <?php        //  debut drop down  ///
  46. $sql = mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit");
  47. $options = '';
  48.  
  49. echo '<select manufacturer_kit="manufacturer_kit"><option>Kit manufacturer</option>';
  50.  
  51. while($row = mysql_fetch_array($sql)) {
  52. $thing = $row['manufacturer_kit'];
  53. echo '<option>'.$thing.'</option>';
  54. }
  55. echo '</select>';
  56. // fin dropdown ///?>
  57.     </td>
  58.     <td>
  59.         <?php        //  debut drop down  ///
  60. $sql = mysql_query("SELECT DISTINCT manufacturer_reel FROM kit ORDER BY manufacturer_reel");
  61. $options = '';
  62.  
  63. echo '<select manufacturer_reel="manufacturer_reel"><option>Reel manufacturer</option>';
  64.  
  65. while($row = mysql_fetch_array($sql)) {
  66. $thing = $row['manufacturer_reel'];
  67. echo '<option>'.$thing.'</option>';
  68. }
  69. echo '</select>';
  70. // fin dropdown ///?>
  71.     </td>
  72.   </tr>
  73.   <tr>
  74.     <td>&nbsp;</td>
  75.     <td>&nbsp;</td>
  76.     <td>&nbsp;</td>
  77.   </tr>
  78.   <tr>
  79.     <td></td>
  80.     <td>&nbsp;</td>
  81.     <td>
  82.            <?php        //  debut drop down  ///
  83. $sql = mysql_query("SELECT DISTINCT engine_detail FROM kit ORDER BY engine_detail");
  84. $options = '';
  85.  
  86. echo '<select engine_detail="engine_detail"><option><br />Engine detail</option>';
  87.  
  88. while($row = mysql_fetch_array($sql)) {
  89. $thing = $row['engine_detail'];
  90. echo '<option>'.$thing.'</option>';
  91. }
  92. echo '</select>';
  93. // fin dropdown ///?>
  94.     </td>
  95.   </tr>
  96.   <tr>
  97.     <td>&nbsp;</td>
  98.         <td><form name="input" action="kit_result.php" method="post">
  99. Keywords: 
  100. <input type="text" name="manufacturer_kit" value="" size="40">
  101. <br>
  102. <input type="submit" value="Submit">
  103.  
  104. </form> </td>
  105.     <td>&nbsp;</td>
  106.   </tr>
  107.   <tr>
  108.     <td>&nbsp;</td>
  109.     <td>&nbsp;</td>
  110.     <td>&nbsp;</td>
  111.   </tr>
  112.   <tr>
  113.     <td>&nbsp;</td>
  114.     <td></td>
  115.     <td>&nbsp;</td>
  116.   </tr>
  117. </table>
  118.  
  119. <p>you can choose to fill one OR more field. more field is fill more accurate the result will be.</p>
  120. <p>
  121.   <label></label>
  122. </p>
  123. <p>&nbsp;</p>
  124. <p>&nbsp;</p>
  125. <p>&nbsp;</p>
  126. <p>&nbsp;</p>
  127. </body>
  128. </html>
  129.  

like you can see in my submit button i put a result.php file

it's this file i want to make but i'm stuck... really don't know how to make.

in fact you can make only 1 selection and press submit ex: you select the 1/24 scale and press submit it will return ALL kit in 1/24. If you select tamiya and honda it will return every kit honda made by tamiya etc...

also i want to see the kit number, the picture, year of production and of course the picture associate to this kit.

see below my field title of my database

kit_id = the ID of the kit 0, 1 , 2 ... auto increment
kit_number
description
manufacturer_ki t
manufacturer_re el
engine_detail
year_prod_kit
year_prod_reel
type
scale
image_id

so any help will be granted.

thank's in advance

sebastien
Aug 24 '09
21 3173
TheServant
1,168 Recognized Expert Top Contributor
@Dormilich
lol, pays to read the post. Didn't realize it was CI - Ignore my previous post!
Sep 18 '09 #21
Dormilich
8,658 Recognized Expert Moderator Expert
well, it wasn’t even CI, just some plain PDO.
Sep 18 '09 #22

Sign in to post your reply or Sign up for a free account.

Similar topics

10
2807
by: minchu | last post by:
Hello, I have used CSS in HTML page (font-verdana size-8pt), looks fine in windows but in linux the fonts are corrupt and its too small. Kindly help me and tell what is the solution to correct this. www.teledna.com Regards, Minchu
2
2151
by: Alec | last post by:
First attempt at doing an exercise on paginating result sets When I run the code, I receive the error "Fatal error: Call to undefined function: mysql_fetch_objects() in /homepages/17/d23395818/htdocs/en/test.php on line 48" Line 48 is while($row = mysql_fetch_objects($result)) Any ideas?? Have I missed an obvious mistake. (full code below) Many thanks
2
7055
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply. Each dynamically created row will return 3 values fee1_choice, fee1_unit and fee1_money. Note The above informaton is...
0
1959
by: peridian | last post by:
Hi, I wanted a web page where I could post code to, and have it appear in coloured formatting based on the context of the code. Most of the techniques I have seen for this involve complex use of string manipulation where they seek through the string back and forth doing replacements to substitute in the needed HTML code. I am convinced that this can be done with a few regular expressions. Unfortunately my knowledge of regular...
2
1520
by: assgar | last post by:
Hi Multiple rows of dynamically created data is retrived from the database and displayed properly. When I get 50 rows displayed scrolling is necessary. The problem is when I scroll to see the items at the bottom of the list the rows get blurred (jumbled). To be specific at the top and bottom rows of the list are displayed properly but in the middle the rows get blurred. Can you you see something wrong with my code? How can I make...
3
2885
by: WiseG1rly | last post by:
Hey everyone! I am completley new and I will start off by saying that I am not a programmer - figuring out this search took so long! I am debugging now and would appreciate any help :) Anyways, I am creating a website where I have a database of pet listings in california. Each record lists the Type of Listing (eg. dog grooming or vet) the the Area it is in (so state, county etc.), a Name, Description, and Address. I created a search...
1
1762
by: jasone | last post by:
Hi all, ive got a search function running on a database, the action performed by the form is shown below, within the 'else' statement i would like to show roughly 5 random rows from the sql table (alternative products) if you like. please find below the script im currently running for the search, the else statment just shows 'no results found' message at the moment. many thanks in advance for any who can help: <table width="40%"...
5
1344
by: howzy | last post by:
Hello I am new to the database world and Ive learned how to do a few things storing text is easy. i found that out but trying to get an image to show up on a page is difficult and i cant seem to find the correct way to call it up in php so it will display..What i am trying to do is build a search engine for a furniture companys rug collection...so that the rug type style size and an image next to that will show up... this is my php code...
5
1426
by: agarwalsrushti | last post by:
Hi, Im just stuck up with a small query. In my database ive a table called specialization which is dependent on qualification. In specialization i ve 3 fields: QualificationId, SpecializationId,SpecializtionArea. in specialization table there are SpecializationArea with same name but with diferent SpecializationId and QualificationId. Now when i enter search page and select to search based on specialization then it doesnt displays the results...
1
2423
by: angelicdevil | last post by:
i have listbox 1 which displays status , based on selection of status listbox 2 displays usernames. and based on username selected the textbox displays the email id. its working fine till displaying user names in listbox 2 based on selected of status in listbox. but its not displaying the emailid based on selection of usernames and when i click on search for users button its refreshs the page and shows the intial page also want the text box...
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.