Jump to content

Ezkiel

New Members
  • Posts

    9
  • Joined

  • Last visited

Ezkiel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I want something like this http://postimage.org/image/6lq1a8xa1/
  2. Ginerrjm, yes, you are correct. I'm so stupid... echo "<input type='radio' value='" .$link_diametro ."' >" . $pro_diametro . "</option>";
  3. I declared $con in the begin of the index from other page (include etc etc). $con = mysqli_connect ("localhost","root","xxxx","xxxxx"); I don't need do this? I can do something like this? $get_cat_pro = "SELECT * FROM produtos where cat='$cat' "; $run_cat_pro = mysqli_query ($con, $get_cat_pro); echo"Diâmetro <select name='diametro' onchange='location= this.value;'>"; while($row_cat_pro=mysqli_fetch_array($run_cat_pro)){ $pro_diametro = $row_cat_pro['diametro'] ; $link_diametro= "index.php?diametro=$pro_diametro"; $pro_espess_segmento = $row_cat_pro['espess_segmento'] ; $link_espess_segmento= "index.php?espess_segmento=$pro_diametro"; echo "<input type='radio' value='" .$link_diametro ."' >" . $pro_diametro . "</option>"; } echo "</br>"; echo "<option value='" .$link_espess_segmento ."' >" . $pro_espess_segmento . "</option>"; } echo "</select>"; I will read more about PDO
  4. Hi everyone, When I choose one of the value, I want this shown in the url. example: index.php?espess_segmento=450 . But display the values of "diametro" available in the table where the espess_segmento=450. After this I want can choose the values of "diametro" and appear in url something like this: index.php?espess_segmento=450&diametro=3. This the code I write: <?php function getCats1 () { global $con; $get_cats = "select * from categorias"; $run_cats = mysqli_query ($con, $get_cats); while($row_cats= mysqli_fetch_array ($run_cats)) { $cat_id = $row_cats['cat_id']; $cat_title = $row_cats['cat_title']; } if(isset($_GET['cat'])){ $cat= $_GET['cat']; global $con; //Diamentro $get_cat_pro = "SELECT * FROM produtos where cat='$cat' "; $run_cat_pro = mysqli_query ($con, $get_cat_pro); echo"Diâmetro <select name='diametro' onchange='location= this.value;'>"; while($row_cat_pro=mysqli_fetch_array($run_cat_pro)){ $pro_diametro = $row_cat_pro['diametro'] ; $link_diametro= "index.php?diametro=$pro_diametro"; echo "<input type='radio' value='" .$link_diametro ."' >" . $pro_diametro . "</option>"; } echo "</br>"; //Espess_segmento $get_cat_pro2 = "SELECT * FROM produtos where cat='$cat' "; $run_cat_pro2 = mysqli_query ($con, $get_cat_pro2); echo"Espessura de Segmento <select name='espess_segmento' onchange='location= this.value;'>"; while($row_cat_pro2=mysqli_fetch_array($run_cat_pro2)){ $pro_espess_segmento = $row_cat_pro2['espess_segmento'] ; $link_espess_segmento= "index.php?espess_segmento=$pro_diametro"; echo "<option value='" .$link_espess_segmento ."' >" . $pro_espess_segmento . "</option>"; } echo "</select>"; } } ?> What I need do? Thanks for the attention!
×
×
  • 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.