Jump to content

scaleautostyle

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Everything posted by scaleautostyle

  1. hi m4vrick... when I start this search page it was like the french side and everything was working nice. the thing I want to update was. when you select the car manufacturer a second dropdown ( car model ) will populate automaticly from the database. but to do that I don't have the choice to put a numeric value to each manufacturer. if you know an other way to do that let me know may be it will slve the problem. yours sebastien
  2. yes it's the same database. but it work on the french side... why it doen't in the english one.?? yours sebastien
  3. clic the small button at the bottom to search. thanks sebastien
  4. it should be OK because on the french side it work fine. the difference between the french side and the english one is ... I don't put the model drop down at this moment. so if you select porsche it will bring you all porsche. clic the scale24-25.com banner to be able to go on the french one. yours sebastien
  5. the things is everything work fine on the four last drop down. EX: if you choose kit manufacturer = tamiya , scale = 1/24 and the year 2004 it will bring you 2 result. if you choose only the year 2000 alone it will bring you 3 result. so these filed work correctly. so let me see something.... S
  6. exact none work. I gave you the step to make sure evryone got the same result. thanks
  7. sure... here is the form file...( the one with the dropdown list ) <html> <head> <title>(Type a title for your page here)</title> <SCRIPT language=JavaScript> function reload(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='search-db-foreach.php?cat=' + val ; } </script> </head> <body > <img src="http://www.scale24-25.com/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,12,330,52,98,53,90,91,670,98,668,53,889,50,886,4" href="http://www.scale-auto-style.com" alt="" /> <area shape="rect" coords="0,132,997,212" href="index.html"> </map> <?php /* If register_global is off in your server then after reloading of the page to get the value of cat from query string we have to take special care. @$cat=$_GET['cat']; // Use this line or below line if register_global is off if(strlen($cat) > 0 and !is_numeric($cat)){ // to check if $cat is numeric data or not. echo "Data Error"; exit; } */ @$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $manufacturer_reel=$_POST['manufacturer_reel']; $query="select * from kit where "; @$manufacturer_reel=$_GET['manufacturer_reel']; // Use this line or below line if register_global is off if(strlen($manufacturer_reel) > 0 and !is_numeric($manufacturer_reel)){ // to check if $cat is numeric data or not. echo "Data Error"; exit; } /* ////////// Including manufacturer_reel field search //// if(strlen($manufacturer_reel) > 0 ){ $query.= " manufacturer_reel='$manufacturer_reel' and "; } //// End of class field search /////////// */ $query=substr($query,0,(strLen($query)-4)); echo $query; echo "<br><br>"; $nt=mysql_query($query); echo mysql_error(); // End if form submitted }else{ echo "<form method=post action='search-keyword.php?go'><input type=hidden name=todo value=search>"; ?> <table width="960" border="0"> <tr> <td width="355"></td> <td width="250"> </td> <td width="355"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td rowspan="9"><div align="center">To help me filling the database download the instruction and master file <a href="base de donnee/master_database.xls"><img src="catalog/images/design_web/master-bouton-en.jpg" alt="bout" width="272" height="54" border="0"></a></div></td> <td align="center"><?php ///////// Getting the data from Mysql table for first list box////////// $q=mysql_query("SELECT DISTINCT manufacturer_reel,manufacturer_reel_id FROM kit order by manufacturer_reel"); ///////////// End of query for first list box////////// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Please Choose an Option</option>"; while($row = mysql_fetch_array($q)) { if($row['manufacturer_reel_id']==@$cat){echo "<option selected value='$row[manufacturer_reel_id]'>$row[manufacturer_reel]</option>"."<BR>";} else{echo "<option value='$row[manufacturer_reel_id]'>$row[manufacturer_reel]</option>";} } echo "</select>"; echo " <br> \n"; echo " <br> \n"; // end of drop down /// ?></td> <td><div align="left">Name Of vehicule manufacturer</div></td> </tr> <tr> <td align="center"> </td> <td> </td> </tr> <tr> <td><div align="center"> <?php /////// for second drop down list we will check if manufacturer_reel is selected else we will display all the car_model///// if(isset($cat) and strlen($cat) > 0){ $q=mysql_query("SELECT DISTINCT car_model FROM kit where manufacturer_reel_id=$cat order by car_model"); }else{$q=mysql_query("SELECT DISTINCT car_model FROM kit order by car_model"); } ////////// end of query for second car_model drop down list box /////////////////////////// ////////// Starting of second drop downlist ////////// echo '<select name="car_model"><option value="car_model">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['car_model']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; //////// end of second drop down ////////// ?> </div> <td> vehicule manufacturer model</td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT scale FROM kit ORDER BY scale"); echo '<select name="scale"><option value="scale">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['scale']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Scale of model</div></td> </tr> <tr> <td> </td> <td><div align="right"></div></td> </tr> <tr> <td align="center"><?php // start of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit"); echo '<select name="manufacturer_kit"><option value="kit manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_kit']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Name Of kit manufacturer</div></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT year_prod_reel FROM kit ORDER BY year_prod_reel"); echo '<select name="year_prod_reel"><option value="vehicules year manufactured">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['year_prod_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left"> <p>Year of production of the vehicule</p> <p> </p> </div></td> </tr> <tr> <td> </td> <td align="center"> </td> <td> </td> </tr> </table> <table width="960" border="0"> <tr> <td><div align="center"> <?php echo " <br><input type=submit value=Search name='name' action='search-keyword.php?go' > </form> "; } ?> </div></td> </tr> </table> <table width="980" border="1"> <tr> <td colspan="3" bgcolor="#EDEDED"><div align="center"><a href="http://www.modelencyclopedia.com/"><img src="catalog/images/banners/davidcuraencyclopedy.gif" alt="banner1" border="0" /></a></div></td> </tr> <tr> <td bgcolor="#EDEDED" width="480"><p align="center">Without his help this site will stay under development</p> </td> <td> </td> <td bgcolor="#EDEDED" width="480"><p align="center">Sans son aide se site serais toujours en dévelopement</p> </td> </tr> </table> </body> </html> and this is the result file... <html> <head> <title>(Type a title for your page here)</title> </head> <body > <p align="center"><img src="http://www.scale24-25.com/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,12,330,52,98,53,90,91,670,98,668,53,889,50,886,4" href="http://www.scale-auto-style.com" alt="" /> <area shape="rect" coords="-1,128,996,208" href="../index.html"> </map></p> <table width="920" border="0"> <tr> <td width="359"><p class="style5">You will find some TBC. TBC is for "To Be Confirmed". If somebody know the missing information ( TBC ) it will be appreciate to send it to me at this mail: <a href="mailto:info@hobby-shop.qc.ca">info@hobby-shop.qc.ca</a> <br /> <br /> thanks in advance for your help</p> </td> <td width="161"><div align="center"><a href="search-db-foreach.php"><img src="catalog/images/design_web/othersearch.jpg" border="0" alt="search" width="150" height="96"></a></div></td> <td width="386"> <div align="right"> <p>This logo <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50'/> mean that you can download a PDF file. To read it you need minimum Acrobat reader and you can download it <a href="http://get.adobe.com/reader/">here</a></p> <p>Some link will return a TBC. Sorry for any inconveniant. as soon as we will receive or do the PDF it will be updated.</p> </div></td> </tr> </table> <br> <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $name=$_POST['cat']; $name1=$_POST['manufacturer_kit']; $name2=$_POST['year_prod_reel']; $name3=$_POST['scale']; $name11=$_POST['car_model']; //-query the database table for the post field $sql="SELECT kit_id, kit_number, kit_name, description_eng, manufacturer_kit, manufacturer_reel, scale, engine_detail, year_prod_kit, year_prod_reel, image_id, image_id1, image_id2 FROM kit "; $sqlOperand="WHERE"; if ($name != "cat") { $sql = $sql . $sqlOperand . " manufacturer_reel LIKE '%" . $name ."%' "; $sqlOperand = " AND "; } if ($name1 != "kit manufacturer") { $sql = $sql . $sqlOperand . " manufacturer_kit LIKE '%" . $name1 ."%' "; $sqlOperand = " AND "; } if ($name2 != "vehicules year manufactured") { $sql = $sql . $sqlOperand . " year_prod_reel LIKE '%" . $name2 ."%' "; $sqlOperand = " AND "; } if ($name3 != "scale") { $sql = $sql . $sqlOperand . " scale LIKE '%" . $name3 ."%' "; $sqlOperand = " AND "; } if ($name11 != "car_model") { $sql = $sql . $sqlOperand . " car_model LIKE '%" . $name11 ."%' "; $sqlOperand = " AND "; } if ($sqlOperand == "WHERE") { echo "<p>Please enter a search query</p>"; } else { // echo '<img src="web-design/sorry.jpg" alt="sorry">'; // echo "Sorry nothing match your selection / Desolle rien ne correspond a votre selection"; // echo "run sql: <BR> $sql <BR> and display results"; } //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1340\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description_eng \n"; echo" <td nowrap align=center width='125'> vehicule year \n"; echo" <td nowrap align=center width='80'> complete engine detail\n"; echo" <td nowrap align=center width='80'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='75'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description_eng=$row['description_eng']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $car_model=$row['car_model']; $cat=$row['cat']; $manufacturer_reel=$row['manufacturer_reel']; $kit_id=$row['kit_id']; $kit_number=$row['kit_number']; $kit_name=$row['kit_name']; $engine_detail=$row['engine_detail']; $year_prod_reel=$row['year_prod_reel']; $image_id=$row['image_id']; $image_id1=$row['image_id1']; $image_id2=$row['image_id2']; //-create table of item during he while loop echo " <table align=center width=\"1340\" border=\"\">\n"; echo" <td nowrap align=center width='95'> $manufacturer_kit \n"; echo" <td nowrap align=center width='55'> $scale \n"; echo" <td nowrap align=center width='90'> $kit_number \n"; echo" <td nowrap align=center width='290'> $kit_name \n"; echo" <td nowrap width='400'> $description_eng \n"; echo" <td nowrap align=center width='125'> $year_prod_reel \n"; echo" <td nowrap align=center width='80'> $engine_detail \n"; if(!empty($image_id)) echo" <td nowrap width='80'> <a href= ".$image_id."> <img src= '".$image_id."' width='75' height='50' border='0'/>";else echo " <td nowrap width='75'> <img src='http://www.scale24-25.com/images/tbc.jpg' width='50' height='50' border='0'/>"; if(!empty($image_id1)) echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>";else echo " <td nowrap width='75'> <img src='http://www.scale24-25.com/images/tbc.jpg' width='50' height='50' border='0'/>"; if(!empty($image_id2)) echo" <td nowrap width='75'> <a href= ".$image_id2."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>";else echo " <td nowrap width='75'> <img src='http://www.scale24-25.com/images/tbc.jpg' width='50' height='50' border='0'/>"; echo " </tr>\n"; echo " </table>\n"; echo " </tr>\n"; echo " </table>\n"; } } else{ echo "<p>Please enter a search query</p>"; } ?> </body> </html> I hope this will help to debug ... yours sebastien
  8. hi guy's... it's going very well one more time thans to all of you for your help. now a new one. felow these step and you will find my problem. but what is the solution?? first go on my site english section here http://scale24-25.com/search-db-foreach.php if you clic on the secon drop down and select 935 and after the search button it will retreive all the 935 model found in the database. it' what I want. BUT more specificly I want you select from the first drop down the porsche. after the 935 and then clic the search button. nothing return. WHY?? I can put the code of both file here or just the code of the 2 drop down with the search file. let me know what's going on. thanks again sebastien
  9. thnkas... with your help I found the way to do it ... here the final code... and it WORK PERFECTLY" thanks again if(!empty($image_id1)) echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>";else echo " <td nowrap width='75'> <img src='http://www.scale24-25.com/images/tbc.jpg' width='50' height='50' border='0'/>";
  10. thank you... this is what I have right now ( it's part of the complete code ) <?php while($row=mysql_fetch_array($result)){ $image_id=$row['image_id1']; $image_id=$row['image_id2']; echo " <table align=center width=\"1340\" border=\"\">\n"; echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src= '".$image_id1."' width='50' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href=".$image_id2."> <img src='".$image_id2."' width='50' height='50' border='0'/>"; } } else{ echo "<p>Please enter a search query</p>"; } ?> this will show me what I have in my database. if nothing is theyre I ave a broken image. instead of the broken image I want a picture name TBC.jpg I hope it's more clear like this. thanks in advance sebastien
  11. like I said I'm not very good in coding. so your help to solve this one is more than appreciate. this is what I want to do.... IF I have an image_id1 in the database please show it. other than that please show me the TBC.jpg picture. in php/sql how this will be write. thanks sebastien
  12. hey hey hey!! after sleeping 14 hours I found the error... sintax $#$@$@ instead of description_eng I put description.... thanks for your help. yours
  13. Hi thorpe!! maybe this will help.. below is the original query. <?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_reel FROM kit ORDER BY manufacturer_reel"); echo '<select name="manufacturer_reel"><option value="reel manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // end of drop down /// ?> it was change to be able to call and populate a second dropdown. see the new code below. ///////// Getting the data from Mysql table for first list box////////// $q=mysql_query("SELECT DISTINCT manufacturer_reel,manufacturer_reel_id FROM kit order by manufacturer_reel"); ///////////// End of query for first list box////////// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Please Choose an Option</option>"; while($row = mysql_fetch_array($q)) { if($row['manufacturer_reel_id']==@$cat){echo "<option selected value='$row[manufacturer_reel_id]'>$row[manufacturer_reel]</option>"."<BR>";} else{echo "<option value='$row[manufacturer_reel_id]'>$row[manufacturer_reel]</option>";} } echo "</select>"; ////////////////// This will end the first drop down list /////////// <?php /////// for second drop down list we will check if manufacturer_reel is selected else we will display all the car_model///// if(isset($cat) and strlen($cat) > 0){ $q=mysql_query("SELECT DISTINCT car_model FROM kit where manufacturer_reel_id=$cat order by car_model"); }else{$q=mysql_query("SELECT DISTINCT car_model FROM kit order by car_model"); } ////////// end of query for second car_model drop down list box /////////////////////////// echo '<select name="car_model"><option value="car_model">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['car_model']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; ?> I'm pretty sure the error came from this change. someone can look at it and let me know. these code came from the form. thanks sebastien
  14. thanks ... so this is the code of the form <?php include_once("db_connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> <SCRIPT language=JavaScript> function reload(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='search-db-foreach.php?cat=' + val ; } </script> </head> <body > <img src="http://www.scale24-25.com/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,12,330,52,98,53,90,91,670,98,668,53,889,50,886,4" href="http://www.scale-auto-style.com" alt="" /> <area shape="rect" coords="0,132,997,212" href="index.html"> </map> <?php /* If register_global is off in your server then after reloading of the page to get the value of cat from query string we have to take special care. @$cat=$_GET['cat']; // Use this line or below line if register_global is off if(strlen($cat) > 0 and !is_numeric($cat)){ // to check if $cat is numeric data or not. echo "Data Error"; exit; } */ @$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $manufacturer_reel=$_POST['manufacturer_reel']; $query="select * from kit where "; @$manufacturer_reel=$_GET['manufacturer_reel']; // Use this line or below line if register_global is off if(strlen($manufacturer_reel) > 0 and !is_numeric($manufacturer_reel)){ // to check if $cat is numeric data or not. echo "Data Error"; exit; } /* ////////// Including manufacturer_reel field search //// if(strlen($manufacturer_reel) > 0 ){ $query.= " manufacturer_reel='$manufacturer_reel' and "; } //// End of class field search /////////// */ $query=substr($query,0,(strLen($query)-4)); echo $query; echo "<br><br>"; $nt=mysql_query($query); echo mysql_error(); // End if form submitted }else{ echo "<form method=post action='search-keyword.php?go'><input type=hidden name=todo value=search>"; ?> <table width="960" border="0"> <tr> <td width="355"></td> <td width="250"> </td> <td width="355"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td rowspan="9"><div align="center">To help me filling the database download the instruction and master file <a href="base de donnee/master_database.xls"><img src="catalog/images/design_web/master-bouton-en.jpg" alt="bout" width="272" height="54" border="0"></a></div></td> <td align="center"><?php ///////// Getting the data from Mysql table for first list box////////// $q=mysql_query("SELECT DISTINCT manufacturer_reel,manufacturer_reel_id FROM kit order by manufacturer_reel"); ///////////// End of query for first list box////////// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Please Choose an Option</option>"; while($row = mysql_fetch_array($q)) { if($row['manufacturer_reel_id']==@$cat){echo "<option selected value='$row[manufacturer_reel_id]'>$row[manufacturer_reel]</option>"."<BR>";} else{echo "<option value='$row[manufacturer_reel_id]'>$row[manufacturer_reel]</option>";} } echo "</select>"; ////////////////// This will end the first drop down list /////////// /* // strat of drop down /// ORIGINAL DROP DOWN $q=mysql_query("SELECT DISTINCT manufacturer_reel FROM kit ORDER BY manufacturer_reel"); echo '<select name="manufacturer_reel"><option value="reel manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// */ echo " <br> \n"; echo " <br> \n"; // end of drop down /// ?></td> <td><div align="left">Name Of vehicule manufacturer</div></td> </tr> <tr> <td align="center"> </td> <td> </td> </tr> <tr> <td><div align="center"> <?php /////// for second drop down list we will check if manufacturer_reel is selected else we will display all the car_model///// if(isset($cat) and strlen($cat) > 0){ $q=mysql_query("SELECT DISTINCT car_model FROM kit where manufacturer_reel_id=$cat order by car_model"); }else{$q=mysql_query("SELECT DISTINCT car_model FROM kit order by car_model"); } ////////// end of query for second car_model drop down list box /////////////////////////// ////////// Starting of second drop downlist ////////// /* echo "<select name='subcat'><option value=''>Please Choose an Option</option>"; while($row = mysql_fetch_array($q)) { echo "<option value='$row[car_model]'>$row[car_model]</option>"; } echo "</select>"; ////////////////// This will end the second drop down list /////////// ?> */ echo '<select name="car_model"><option value="car_model">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['car_model']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; ?> </div> <td> vehicule manufacturer model</td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT scale FROM kit ORDER BY scale"); echo '<select name="scale"><option value="scale">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['scale']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Scale of model</div></td> </tr> <tr> <td> </td> <td><div align="right"></div></td> </tr> <tr> <td align="center"><?php // start of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit"); echo '<select name="manufacturer_kit"><option value="kit manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_kit']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Name Of kit manufacturer</div></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT year_prod_reel FROM kit ORDER BY year_prod_reel"); echo '<select name="year_prod_reel"><option value="vehicules year manufactured">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['year_prod_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left"> <p>Year of production of the vehicule</p> <p> </p> </div></td> </tr> <tr> <td> </td> <td align="center"> </td> <td> </td> </tr> </table> <table width="960" border="0"> <tr> <td><div align="center"> <?php echo " <br><input type=submit value=Search name='name' action='search-keyword.php?go' > </form> "; } ?> </div></td> </tr> </table> <table width="980" border="1"> <tr> <td colspan="3" bgcolor="#EDEDED"><div align="center"><a href="http://www.modelencyclopedia.com/"><img src="catalog/images/banners/davidcuraencyclopedy.gif" alt="banner1" border="0" /></a></div></td> </tr> <tr> <td bgcolor="#EDEDED" width="480"><p align="center">Without his help this site will stay under development</p> </td> <td> </td> <td bgcolor="#EDEDED" width="480"><p align="center">Sans son aide se site serais toujours en dévelopement</p> </td> </tr> </table> </body> </html> this is the code of the file it will return the result. <?php include_once("db_connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <p align="center"><img src="http://www.scale24-25.com/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,12,330,52,98,53,90,91,670,98,668,53,889,50,886,4" href="http://www.scale-auto-style.com" alt="" /> <area shape="rect" coords="0,132,997,212" href="index.html"> </map></p> <table width="920" border="0"> <tr> <td width="359"><p class="style5">You will find some TBC. TBC is for "To Be Confirmed". If somebody know the missing information ( TBC ) it will be appreciate to send it to me at this mail: <a href="mailto:info@hobby-shop.qc.ca">info@hobby-shop.qc.ca</a> <br /> <br /> thanks in advance for your help</p> </td> <td width="161"> </td> <td width="386"> <div align="right"> <p>This logo <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50'/> mean that you can download a PDF file. To read it you need minimum Acrobat reader and you can download it <a href="http://get.adobe.com/reader/">here</a></p> <p>Some link will return a TBC. Sorry for any inconveniant. as soon as we will receive or do the PDF it will be updated.</p> </div></td> </tr> </table> <br> <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $name=$_POST['cat']; $name1=$_POST['manufacturer_kit']; $name2=$_POST['year_prod_reel']; $name3=$_POST['scale']; $name11=$_POST['car_model']; //-query the database table for the post field $sql="SELECT kit_id, kit_number, kit_name, description, manufacturer_kit, manufacturer_reel, scale, engine_detail, year_prod_kit, year_prod_reel, image_id, image_id1, image_id2 FROM kit "; $sqlOperand="WHERE"; if ($name != "cat") { $sql = $sql . $sqlOperand . " manufacturer_reel LIKE '%" . $name ."%' "; $sqlOperand = " AND "; } if ($name1 != "kit manufacturer") { $sql = $sql . $sqlOperand . " manufacturer_kit LIKE '%" . $name1 ."%' "; $sqlOperand = " AND "; } if ($name2 != "vehicules year manufactured") { $sql = $sql . $sqlOperand . " year_prod_reel LIKE '%" . $name2 ."%' "; $sqlOperand = " AND "; } if ($name3 != "scale") { $sql = $sql . $sqlOperand . " scale LIKE '%" . $name3 ."%' "; $sqlOperand = " AND "; } if ($name11 != "car_model") { $sql = $sql . $sqlOperand . " car_model LIKE '%" . $name11 ."%' "; $sqlOperand = " AND "; } if ($sqlOperand == "WHERE") { echo "<p>Please enter a search query</p>"; } else { // echo '<img src="web-design/sorry.jpg" alt="sorry">'; // echo "Sorry nothing match your selection / Desolle rien ne correspond a votre selection"; // echo "run sql: <BR> $sql <BR> and display results"; } //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1340\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description \n"; echo" <td nowrap align=center width='125'> vehicule year \n"; echo" <td nowrap align=center width='80'> complete engine detail\n"; echo" <td nowrap align=center width='80'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='75'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description =$row['description_eng']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $car_model=$row['car_model']; $cat=$row['cat']; $manufacturer_reel=$row['manufacturer_reel']; $kit_id=$row['kit_id']; $kit_number=$row['kit_number']; $kit_name=$row['kit_name']; $engine_detail=$row['engine_detail']; $year_prod_reel=$row['year_prod_reel']; $image_id=$row['image_id']; $image_id1=$row['image_id1']; $image_id2=$row['image_id2']; //-create table of item during he while loop echo " <table align=center width=\"1340\" border=\"\">\n"; echo" <td nowrap align=center width='95'> $manufacturer_kit \n"; echo" <td nowrap align=center width='55'> $scale \n"; echo" <td nowrap align=center width='90'> $kit_number \n"; echo" <td nowrap align=center width='290'> $kit_name \n"; echo" <td nowrap width='400'> $description_eng \n"; echo" <td nowrap align=center width='125'> $year_prod_reel \n"; echo" <td nowrap align=center width='80'> $engine_detail \n"; echo" <td nowrap width='80'> <a href=".$image_id."> <img src='".$image_id."' width='75' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href=".$image_id2."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo " </tr>\n"; echo " </table>\n"; echo " </tr>\n"; echo " </table>\n"; } } else{ echo "<p>Please enter a search query</p>"; } ?> </body> </html> I know it's a big mess I will work on that as soon as possible. thanks in adavance sebastien
  15. thanks but like I said my knowledge are near nothing. and these files were modify by near 5 person so the result I lost the control... now I try to get it but if you can help me to get back on the track it will be VERY appreciate. I can post here the 2 files that comunicate between. if you can tell me what exactly to change.. thanks in advance sebastien
  16. Hi evrybody... I'm stuck in the boose now.... it was working fine before someone do a change... now I try to locate the error but I'm unable to do it. my knowledge in php/mysql is VERY low in other word doens'y know nothing at all. heres the message I receive Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/scale24/public_html/search-keyword.php on line 112 you can go directly on the site http://scale24-25.com/search-db-foreach.php?cat= the error appear when the vehicule manufacturer model dropdown was add. this menu autofill when you select one of the Name Of vehicule manufacturer droplist. if someone can help me it will be VERY APPRECIATE. you can view the before change here http://scale24-25.com/francaissource/search-db-foreachfr.php thanks in advance sebastien
  17. Hi everyone!! I finish to do my second populating drop down list. it's not realy the display I was looking but for now it will be good. but when I click on my serach button I receive this erro. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\scale24-25\search-keyword.php on line 112 this is what line 112 is in the search file. //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ <-------------- line 112 here's the code of my form... <?php include_once("connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>1/24 - 1/25 scale model database</title> <SCRIPT language=JavaScript> function reload(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='search-db-foreach.php?cat=' + val ; } </script> </head> <body > <img src="http://www.scale24-25.com/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,13,330,53,98,54,90,92,670,99,668,54,889,51,886,5" href="http://www.scale-auto-style.com" alt="" /> </map> <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $manufacturer_reel=$_POST['manufacturer_reel']; $query="select * from kit where "; ////////// Including manufacturer_reel field search //// if(strlen($manufacturer_reel) > 0 ){ $query.= " manufacturer_reel='$manufacturer_reel' and "; } //// End of class field search /////////// $query=substr($query,0,(strLen($query)-4)); echo $query; echo "<br><br>"; $nt=mysql_query($query); echo mysql_error(); // End if form submitted }else{ echo "<form method=post action='search-keyword.php?go'><input type=hidden name=todo value=search>"; ?> <table width="960" border="0"> <tr> <td colspan="3"><table width="100%" border="0"> <tr> </tr> <tr> <td><div align="right"></div></td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><div align="right">Echelle du modele</div></td> <td align="center"> <?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT scale FROM kit ORDER BY scale"); echo '<select name="scale"><option value="scale">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['scale']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Scale of model</div></td> </tr> <tr> <td> </td> <td> </td> <td><div align="right"></div></td> </tr> <tr> <td><div align="right">Nom du manufacturier automobile</div></td> <td align="center"><?php // strat of drop down /// /* If register_global is off in your server then after reloading of the page to get the value of cat from query string we have to take special care. @$cat=$_GET['cat']; // Use this line or below line if register_global is off if(strlen($cat) > 0 and !is_numeric($cat)){ // to check if $cat is numeric data or not. echo "Data Error"; exit; } */ @$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off ///////// Getting the data from Mysql table for first list box////////// $quer2=mysql_query("SELECT DISTINCT manufacturer_reel,manufacturer_reel_id FROM kit order by manufacturer_reel"); ///////////// End of query for first list box//////////// /////// for second drop down list we will check if manufacturer_reel is selected else we will display all the car_model///// if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT car_model FROM kit where manufacturer_reel_id=$cat order by car_model"); }else{$quer=mysql_query("SELECT DISTINCT car_model FROM kit order by car_model"); } ////////// end of query for second car_model drop down list box /////////////////////////// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['manufacturer_reel_id']==@$cat){echo "<option selected value='$noticia2[manufacturer_reel_id]'>$noticia2[manufacturer_reel]</option>"."<BR>";} else{echo "<option value='$noticia2[manufacturer_reel_id]'>$noticia2[manufacturer_reel]</option>";} } echo "</select>"; ////////////////// This will end the first drop down list /////////// ////////// Starting of second drop downlist ///////// echo "<select name='subcat'><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { echo "<option value='$noticia[car_model]'>$noticia[car_model]</option>"; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // end of drop down /// ?></td> <td><div align="left">Name Of vehicule manufacturer</div></td> </tr> <tr> <td> </td> <td> </td> <td><div align="right"></div></td> </tr> <tr> <td><div align="right">Nom du manufacturier de modele reduit</div></td> <td align="center"><?php // start of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit"); echo '<select name="manufacturer_kit"><option value="kit manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_kit']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Name Of kit manufacturer</div></td> </tr> <tr> <td><div align="right"></div></td> <td> </td> <td> </td> </tr> <tr> <td><div align="right">Annee de fabrication du Vehicule</div></td> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT year_prod_reel FROM kit ORDER BY year_prod_reel"); echo '<select name="year_prod_reel"><option value="vehicules year manufactured">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['year_prod_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Year of production of the vehicule</div></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td align="center"> </td> <td> </td> </tr> <tr> <td><div align="right"><strong></strong></div></td> <td align="center"> <?php echo " <br><input type=submit value=Search name='name' action='search-keyword.php?go' > </form> "; } ?> <td><div align="left"><strong></strong></div></td> </table> </body> </html> and this the search file <?php include_once("connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <p align="center"><img src="http://www.scale24-25.com/catalog/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,13,330,53,98,54,90,92,670,99,668,54,889,51,886,5" href="http://www.scale-auto-style.com" alt="" /> </map></p> <table width="920" border="0"> <tr> <td width="359"><p class="style5">You will find some TBC. TBC is for "To Be Confirmed". If somebody know the missing information ( TBC ) it will be appreciate to send it to me at this mail: <a href="mailto:info@hobby-shop.qc.ca">info@hobby-shop.qc.ca</a> <br /> <br /> thanks in advance for your help</p> </td> <td width="161"><div align="center"><a href="search-db-foreach.php"><img src="catalog/images/design_web/othersearch.jpg" border="0" alt="search" width="150" height="96"></a></div></td> <td width="386"> <div align="right"> <p>This logo <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50'/> mean that you can download a PDF file. To read it you need minimum Acrobat reader and you can download it <a href="http://get.adobe.com/reader/">here</a></p> <p>Some link will return a TBC. Sorry for any inconveniant. as soon as we will receive or do the PDF it will be updated.</p> </div></td> </tr> </table> <br> <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $name=$_POST['cat']; $name1=$_POST['manufacturer_kit']; $name2=$_POST['year_prod_reel']; $name3=$_POST['scale']; $name11=$_POST['subcat']; //-query the database table for the post field $sql="SELECT kit_id, kit_number, kit_name, description_eng, description_fr, manufacturer_kit, manufacturer_reel, manufacturer_reel_id, scale, engine_detail, year_prod_kit, year_prod_reel, image_id, image_id1, image_id2 FROM kit "; $sqlOperand="WHERE"; if ($name != "cat") { $sql = $sql . $sqlOperand . " cat LIKE '%" . $name ."%' "; $sqlOperand = " AND "; } if ($name1 != "kit manufacturer") { $sql = $sql . $sqlOperand . " manufacturer_kit LIKE '%" . $name1 ."%' "; $sqlOperand = " AND "; } if ($name11 != "subcat") { $sql = $sql . $sqlOperand . " subcat LIKE '%" . $name11 ."%' "; $sqlOperand = " AND "; } if ($name2 != "vehicules year manufactured") { $sql = $sql . $sqlOperand . " year_prod_reel LIKE '%" . $name2 ."%' "; $sqlOperand = " AND "; } if ($name3 != "scale") { $sql = $sql . $sqlOperand . " scale LIKE '%" . $name3 ."%' "; $sqlOperand = " AND "; } if ($sqlOperand == "WHERE") { echo "<p>Please enter a search query</p>"; } else { // echo '<img src="web-design/sorry.jpg" alt="sorry">'; // echo "Sorry nothing match your selection / Desolle rien ne correspond a votre selection"; // echo "run sql: <BR> $sql <BR> and display results"; } //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1340\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description \n"; echo" <td nowrap align=center width='125'> vehicule year \n"; echo" <td nowrap align=center width='80'> complete engine detail\n"; echo" <td nowrap align=center width='80'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='75'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description_eng =$row['description_eng']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $manufacturer_reel=$row['manufacturer_reel']; $kit_id=$row['kit_id']; $kit_number=$row['kit_number']; $kit_name=$row['kit_name']; $engine_detail=$row['engine_detail']; $year_prod_reel=$row['year_prod_reel']; $image_id=$row['image_id']; $image_id1=$row['image_id1']; $image_id2=$row['image_id2']; //-create table of item during he while loop echo " <table align=center width=\"1340\" border=\"\">\n"; echo" <td nowrap align=center width='95'> $manufacturer_kit \n"; echo" <td nowrap align=center width='55'> $scale \n"; echo" <td nowrap align=center width='90'> $kit_number \n"; echo" <td nowrap align=center width='290'> $kit_name \n"; echo" <td nowrap width='400'> $description_eng \n"; echo" <td nowrap align=center width='125'> $year_prod_reel \n"; echo" <td nowrap align=center width='80'> $engine_detail \n"; echo" <td nowrap width='80'> <a href=".$image_id."> <img src='".$image_id."' width='75' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href=".$image_id2."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo " </tr>\n"; echo " </table>\n"; echo " </tr>\n"; echo " </table>\n"; } } else{ echo "<p>Please enter a search query</p>"; } ?> </body> </html> so what I do wrong. I knowI forgot something but what???? thanks in advance for your help sebastien
  18. Hi!! the question look simple at his base because I will receive TONS of answer saying ... " hey men use javascript OR ajax " but I don't want to use these... I want to populate the second dropdown menu dynamicly with PHP code. and sql query. why?? because I have over 43000 possibility and doing a script manually is impossible. the database is changing every hour. this is the code of my working page. the form NOTE: i REMOVE ALL DB CONNECTION FOR SECURITY PURPOSE. THANKS FOR YOUR UNDERTANDING. <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <img src="http://www.scale24-25.com/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="326,13,330,53,98,54,90,92,670,99,668,54,889,51,886,5" href="http://www.scale-auto-style.com" alt="" /> </map> <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $manufacturer_reel=$_POST['manufacturer_reel']; $query="select * from kit where "; ////////// Including manufacturer_reel field search //// if(strlen($manufacturer_reel) > 0 ){ $query.= " manufacturer_reel='$manufacturer_reel' and "; } //// End of class field search /////////// $query=substr($query,0,(strLen($query)-4)); echo $query; echo "<br><br>"; $nt=mysql_query($query); echo mysql_error(); // End if form submitted }else{ echo "<form method=post action='search-keyword.php?go'><input type=hidden name=todo value=search>"; ?> <table width="960" border="0"> <tr> <td colspan="3"><p align="center"></td> </tr> <tr> <td><div align="right"></div></td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><div align="right">Echelle du modele</div></td> <td align="center"> <?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT scale FROM kit ORDER BY scale"); echo '<select name="scale"><option value="scale">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['scale']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Scale of model</div></td> </tr> <tr> <td> </td> <td> </td> <td><div align="right"></div></td> </tr> <tr> <td><div align="right">Nom du manufacturier automobile</div></td> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_reel FROM kit ORDER BY manufacturer_reel"); echo '<select name="manufacturer_reel"><option value="reel manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // end of drop down /// ?></td> <td><div align="left">Name Of vehicule manufacturer</div></td> </tr> <tr> <td> </td> <td> </td> <td><div align="right"></div></td> </tr> <tr> <td><div align="right">Nom du manufacturier de modele reduit</div></td> <td align="center"><?php // start of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit"); echo '<select name="manufacturer_kit"><option value="kit manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_kit']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Name Of kit manufacturer</div></td> </tr> <tr> <td><div align="right"></div></td> <td> </td> <td> </td> </tr> <tr> <td><div align="right">Annee de fabrication du Vehicule</div></td> <td align="center"><?php // strat of drop down /// $q=mysql_query("SELECT DISTINCT year_prod_reel FROM kit ORDER BY year_prod_reel"); echo '<select name="year_prod_reel"><option value="vehicules year manufactured">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['year_prod_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; ?></td> <td><div align="left">Year of production of the vehicule</div></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td align="center"> </td> <td> </td> </tr> <tr> <td><div align="right"><strong></strong></div></td> <td align="center"> <?php echo " <br><input type=submit value=Search name='name' action='search-keyword.php?go' > </form> "; } ?> <td><div align="left"><strong></strong></div></td> </body> </html> AND THE PAGE RESULT <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <p align="center"><img src="http://www.scale24-25.com/catalog/images/banners/banner.jpg" alt="banner" width="997" height="213" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="0,100,85,102,92,55,108,50,326,51,323,7,3,3" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="672,57,891,53,887,4,995,4,985,108,673,102" href="http://www.hobby-shop.qc.ca" alt="hobby-shop" /> <area shape="poly" coords="325,11,329,51,97,52,89,90,669,97,667,52,888,49,885,3" href="http://www.scale-auto-style.com" alt="" /> </map></p> <table width="920" border="0"> <tr> <td width="359"><p class="style5">You will find some TBC. TBC is for "To Be Confirmed". If somebody know the missing information ( TBC ) it will be appreciate to send it to me at this mail: <a href="mailto:info@hobby-shop.qc.ca">info@hobby-shop.qc.ca</a> <br /> <br /> thanks in advance for your help</p> </td> <td width="161"> </td> <td width="386"> <div align="right"> <p>This logo <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50'/> mean that you can download a PDF file. To read it you need minimum Acrobat reader and you can download it <a href="http://get.adobe.com/reader/">here</a></p> <p>Some link will return a TBC. Sorry for any inconveniant. as soon as we will receive or do the PDF it will be updated.</p> </div></td> </tr> </table> <br> <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $name=$_POST['manufacturer_reel']; $name1=$_POST['manufacturer_kit']; $name2=$_POST['year_prod_reel']; $name3=$_POST['scale']; //-query the database table for the post field $sql="SELECT kit_id, kit_number, kit_name, description, manufacturer_kit, manufacturer_reel, scale, engine_detail, year_prod_kit, year_prod_reel, image_id, image_id1, image_id2 FROM kit "; $sqlOperand="WHERE"; if ($name != "reel manufacturer") { $sql = $sql . $sqlOperand . " manufacturer_reel LIKE '%" . $name ."%' "; $sqlOperand = " AND "; } if ($name1 != "kit manufacturer") { $sql = $sql . $sqlOperand . " manufacturer_kit LIKE '%" . $name1 ."%' "; $sqlOperand = " AND "; } if ($name2 != "vehicules year manufactured") { $sql = $sql . $sqlOperand . " year_prod_reel LIKE '%" . $name2 ."%' "; $sqlOperand = " AND "; } if ($name3 != "scale") { $sql = $sql . $sqlOperand . " scale LIKE '%" . $name3 ."%' "; $sqlOperand = " AND "; } if ($sqlOperand == "WHERE") { echo "<p>Please enter a search query</p>"; } else { // echo '<img src="web-design/sorry.jpg" alt="sorry">'; // echo "Sorry nothing match your selection / Desolle rien ne correspond a votre selection"; // echo "run sql: <BR> $sql <BR> and display results"; } //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1340\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description \n"; echo" <td nowrap align=center width='125'> vehicule year \n"; echo" <td nowrap align=center width='80'> complete engine detail\n"; echo" <td nowrap align=center width='80'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='75'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description =$row['description']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $manufacturer_reel=$row['manufacturer_reel']; $kit_id=$row['kit_id']; $kit_number=$row['kit_number']; $kit_name=$row['kit_name']; $engine_detail=$row['engine_detail']; $year_prod_reel=$row['year_prod_reel']; $image_id=$row['image_id']; $image_id1=$row['image_id1']; $image_id2=$row['image_id2']; //-create table of item during he while loop echo " <table align=center width=\"1340\" border=\"\">\n"; echo" <td nowrap align=center width='95'> $manufacturer_kit \n"; echo" <td nowrap align=center width='55'> $scale \n"; echo" <td nowrap align=center width='90'> $kit_number \n"; echo" <td nowrap align=center width='290'> $kit_name \n"; echo" <td nowrap width='400'> $description \n"; echo" <td nowrap align=center width='125'> $year_prod_reel \n"; echo" <td nowrap align=center width='80'> $engine_detail \n"; echo" <td nowrap width='80'> <a href=".$image_id."> <img src='".$image_id."' width='75' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href=".$image_id2."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo " </tr>\n"; echo " </table>\n"; echo " </tr>\n"; echo " </table>\n"; } } else{ echo "<p>Please enter a search query</p>"; } ?> </body> </html> YOU CAN SEE IN THE FORM i HAVE A DROP DOWN MENU CALL Name Of vehicule manufacturer .. IN VACT THIS IS THE REAL CAR MANUFACTURER EX: TOYOTA, gmc ETC.. WHEN THE USER WILL SELECT ONE OF THESE AN OTHER DROPDOWN ( NOT SHOWN ) WILL DISPLAY EVERY MODEL FOUND IN THE DATABASE IN RELATION WITH THE MANUFACTURE. IN FACT IT'S LOCATED IN THE TABLE. SO HOW I CAN GET THIS RELATION?? YOURS SEBASTIEN
  19. thank you ChemicalBliss for your explaination. I redo the code base on ehta you say about the value in my option dropdown. also correct as per the original script of jcbones. let see if I understand what you say. this the corrected FORM <?php include_once("db_connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $manufacturer_reel=$_POST['manufacturer_reel']; $query="select * from kit where "; ////////// Including manufacturer_reel field search //// if(strlen($manufacturer_reel) > 0 ){ $query.= " manufacturer_reel='$manufacturer_reel' and "; } //// End of class field search /////////// $query=substr($query,0,(strLen($query)-4)); echo $query; echo "<br><br>"; $nt=mysql_query($query); echo mysql_error(); // End if form submitted }else{ echo "<form method=post action='search-keyword.php?go'><input type=hidden name=todo value=search>"; // strat of drop down /// $q=mysql_query("SELECT DISTINCT scale FROM kit ORDER BY scale"); echo '<select name="scale"><option value="scale">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['scale']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; // strat of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_reel FROM kit ORDER BY manufacturer_reel"); echo '<select name="manufacturer_reel"><option value="reel manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // end of drop down /// // start of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit"); echo '<select name="manufacturer_kit"><option value="kit manufacturer">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_kit']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // strat of drop down /// $q=mysql_query("SELECT DISTINCT year_prod_reel FROM kit ORDER BY year_prod_reel"); echo '<select name="year_prod_reel"><option value="vehicules year manufactured">Please Choose an Option</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['year_prod_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; echo " <br><input type=submit value=Search name='name' action='search-keyword.php?go' > </form> "; } ?> and this is the corrected SEARCH-KEYORD.php <?php include_once("db_connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $name=$_POST['manufacturer_reel']; $name1=$_POST['manufacturer_kit']; $name2=$_POST['year_prod_reel']; $name3=$_POST['scale']; //-query the database table for the post field foreach($_POST as $key => $value) {$v = strtolower($value); if($v != 'reel manufacturer' || $v != 'scale' || $v != 'kit manufacturer' || $v != 'vehicules year manufactured') { //This kills the value being passed, if nothing was selected. $where[] = $key . ' = \'' . $value . '\''; }}if(!empty($where)) {$where = implode(' AND ',$where);$sql = "SELECT * FROM kit WHERE $where ";$nt = mysql_query($sql);}else {echo 'You need to select at least one parameter!';} //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1340\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description \n"; echo" <td nowrap align=center width='125'> vehicule year \n"; echo" <td nowrap align=center width='80'> complete engine detail\n"; echo" <td nowrap align=center width='80'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='75'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description =$row['description']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $manufacturer_reel=$row['manufacturer_reel']; $kit_id=$row['kit_id']; $kit_number=$row['kit_number']; $kit_name=$row['kit_name']; $engine_detail=$row['engine_detail']; $year_prod_reel=$row['year_prod_reel']; $image_id=$row['image_id']; $image_id1=$row['image_id1']; $image_id2=$row['image_id2']; //-create table of item during he while loop echo " <table align=center width=\"1340\" border=\"\">\n"; echo" <td nowrap align=center width='95'> $manufacturer_kit \n"; echo" <td nowrap align=center width='55'> $scale \n"; echo" <td nowrap align=center width='90'> $kit_number \n"; echo" <td nowrap align=center width='290'> $kit_name \n"; echo" <td nowrap width='400'> $description \n"; echo" <td nowrap align=center width='125'> $year_prod_reel \n"; echo" <td nowrap align=center width='80'> $engine_detail \n"; echo" <td nowrap width='80'> <a href=".$image_id."> <img src='".$image_id."' width='75' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href=".$image_id2."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo " </tr>\n"; echo " </table>\n"; echo " </tr>\n"; echo " </table>\n"; } } else{ echo "<p>Please enter a search query</p>"; } ?> if this is the code ... it's not working EXCEPT if I took a good selection that can be find in the database. EX: 1/24 for scale, Prosche for reel manufacturer, tamiya for kit manufacturer and 1968 for vehicule year. but in the case I put only 3 OR do an error for the year nothing will show up. thanks for help but I have to work a bit more to get it work. yours sebastien
  20. hi jcbones!! I just test something. with your coding. it gave me the same thing as my previous code. if I fill every dropdown and it find something I got a result. but if I fill 1 or 2 dropown I don't have any result :confused: yours sebastien
  21. I replace the existing sql query by yours. the final result is <?php //-query the database table for the post field foreach($_POST as $key => $value) {$v = strtolower($value); if($v != 'manufacturer_reel' || $v != 'scale' || $v != 'manufacturer_kit' || $v != 'year_prod_reel') { //This kills the value being passed, if nothing was selected. $where[] = $key . ' = \'' . $value . '\''; }}if(!empty($where)) {$where = implode(' AND ',$where);$sql = "SELECT * FROM kit WHERE $where ";$nt = mysql_query($sql);}else {echo 'You need to select at least one parameter!'; //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1340\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description \n"; echo" <td nowrap align=center width='125'> vehicule year \n"; echo" <td nowrap align=center width='80'> complete engine detail\n"; echo" <td nowrap align=center width='80'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='75'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description =$row['description']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $m ?> If it's what supposed to be I confirm you it doesn't work. it only display the table header. yours sebastien
  22. hummm looka good idea. but .... newvy's question.... where did I put this code... OR what will replace this code??? tanks sebastien
  23. I found this. and it's logical but it's not what I want. If I put the AND operator instead of the OR the user have to fill every field to pass the query. but what I want is: the user can fill as many as field he want. more field are filled less result will be shown. I was think doing an if else OR an if elseif statement in my sql aftre the WHERE like: will be good... but HOW can I do that to cover every possibility???? let me knw if someone think something. yours sebastien
  24. I already change the 3 OR by 3 AND but the result is nothing. I only get the table header. like it doesn't process the sql query... and with the OR. it look like if I choose a manufacturer and a year. it will gave me everything from this specific manufacturer and also everything will match the year. ???? So... what't the solution to this problem ??? I dig all around the web and my book to find the solution and right now :'( thanks for your help sebastien
  25. HELLO... me again... I do my add-on of drop down and everything work NUMBER 1. thanks to kenrbnsn for his help. but I just see something that will be not good for the user. I explain.. IF I make a choice in only one dropdown I get my result. but If I make a selection in 2 or more dropdown it doesn't work it will show the first result from the higher dropdown. EX: you select 1/24 in scale and aoshima in manufacturer kit. It will show you everything in 1/24 because this dropdown is before the other one. the order of drop down are: scale manufacturer_reel manufacturer_kit year_prod_reel An other thing if you do a selection that's impossible... EX. you select Honda and 1966 in the year. it will return every honda it will find. but in fact this selection is not valid. no honda 1996 are in the database. here my coding for both file. THE FORM <?php include_once("db_connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $manufacturer_reel=$_POST['manufacturer_reel']; $query="select * from kit where "; ////////// Including manufacturer_reel field search //// if(strlen($manufacturer_reel) > 0 ){ $query.= " manufacturer_reel='$manufacturer_reel' and "; } //// End of class field search /////////// $query=substr($query,0,(strLen($query)-4)); echo $query; echo "<br><br>"; $nt=mysql_query($query); echo mysql_error(); // End if form submitted }else{ echo "<form method=post action='search-keyword.php?go'><input type=hidden name=todo value=search>"; // strat of drop down /// $q=mysql_query("SELECT DISTINCT scale FROM kit ORDER BY scale"); echo '<select name="scale"><option>scale</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['scale']; echo '<option>'.$thing.'</option>'; } echo "</select>"; echo " <br> \n"; echo " <br> \n"; // strat of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_reel FROM kit ORDER BY manufacturer_reel"); echo '<select name="manufacturer_reel"><option>Reel manufacturer</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // end of drop down /// // start of drop down /// $q=mysql_query("SELECT DISTINCT manufacturer_kit FROM kit ORDER BY manufacturer_kit"); echo '<select name="manufacturer_kit"><option>kit manufacturer</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['manufacturer_kit']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; // strat of drop down /// $q=mysql_query("SELECT DISTINCT year_prod_reel FROM kit ORDER BY year_prod_reel"); echo '<select name="year_prod_reel"><option>vehicules year manufactured</option>'; while($row = mysql_fetch_array($q)) { $thing = $row['year_prod_reel']; echo '<option>'.$thing.'</option>'; } echo "</select>"; // end of drop down /// echo " <br> \n"; echo " <br> \n"; echo " <br><input type=submit value=Search name='name' action='search-keyword.php?go' > </form> "; } ?> </body> </html> and the search-keyword.php <?php include_once("db_connection.php"); ////////////////////////////// ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> </head> <body > <?php if (isset($_POST['todo']) && $_POST['todo'] == "search") { $todo=$_POST['todo']; $name=$_POST['manufacturer_reel']; $name1=$_POST['manufacturer_kit']; $name2=$_POST['year_prod_reel']; $name3=$_POST['scale']; //-query the database table for the post field $sql="SELECT kit_id, kit_number, kit_name, description, manufacturer_kit, manufacturer_reel, scale, engine_detail, year_prod_kit, year_prod_reel, image_id, image_id1, image_id2 FROM kit WHERE manufacturer_reel LIKE '%" . $name ."%' OR scale LIKE '%" . $name3 ."%' OR year_prod_reel LIKE '%" . $name2 ."%' OR manufacturer_kit LIKE '%" . $name1 ."%'"; //-run the query against the mysql query function $result=mysql_query($sql); //-make the header of the table echo " <table align=center width=\"1255\" border=\"\">\n"; echo " <tr>\n"; echo" <td nowrap align=center width='95'> kit manufacturer \n"; echo" <td nowrap align=center width='55'> scale \n"; echo" <td nowrap align=center width='90'> kit number \n"; echo" <td nowrap align=center width='290'> kit name \n"; echo" <td nowrap align=center width='400'> description \n"; echo" <td nowrap align=center width='95'> vehicule manufacturer \n"; echo" <td nowrap align=center width='75'> year of reel production of car \n"; echo" <td nowrap align=center width='75'> complete engine detail\n"; echo" <td nowrap align=center width='75'> Select Picture to get bigger\n"; echo" <td nowrap align=center width='75'> instruction sheet\n"; echo" <td nowrap align=center width='50'> box contain\n"; echo " <tr>\n"; //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $description =$row['description']; $manufacturer_kit=$row['manufacturer_kit']; $scale=$row['scale']; $manufacturer_reel=$row['manufacturer_reel']; $kit_id=$row['kit_id']; $kit_number=$row['kit_number']; $kit_name=$row['kit_name']; $engine_detail=$row['engine_detail']; $year_prod_reel=$row['year_prod_reel']; $image_id=$row['image_id']; $image_id1=$row['image_id1']; $image_id2=$row['image_id2']; //-create table of item during he while loop echo " <table align=center width=\"1255\" border=\"\">\n"; echo" <td nowrap align=center width='95'> $manufacturer_kit \n"; echo" <td nowrap align=center width='95'> $scale \n"; echo" <td nowrap align=center width='95'> $manufacturer_reel \n"; echo" <td nowrap align=center width='90'> $kit_number \n"; echo" <td nowrap align=center width='290'> $kit_name \n"; echo" <td nowrap width='400'> $description \n"; echo" <td nowrap align=center width='75'> $year_prod_reel \n"; echo" <td nowrap align=center width='75'> $engine_detail \n"; echo" <td nowrap width='75'> <a href=".$image_id."> <img src='".$image_id."' width='75' height='50' border='0'/>"; echo" <td nowrap width='75'> <a href= ".$image_id1."> <img src= 'http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo" <td nowrap width='50'> <a href=".$image_id2."> <img src='http://www.scale24-25.com/images/PDF_logo.gif' width='50' height='50' border='0'/>"; echo " </tr>\n"; echo " </table>\n"; echo " </tr>\n"; echo " </table>\n"; } } else{ echo "<p>Please enter a search query</p>"; } ?> </body> </html> thanks sebastien
×
×
  • 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.