Tuesday, 15 June 2010

php - Click on brand name and send it to another page -



php - Click on brand name and send it to another page -

i'm having problem sending brand name page.

i have code:

$data = mysqli_query($link, "select distinct brand products order rand() limit 12"); while ($info=mysqli_fetch_array($data)) { $output .= '<article class="indibrand">'; $output .='<li>'; $output .='<a href="brandproducts.php?brand=". $info["brand"].">'; $output.=$info["brand"]; $output.= '</a>'; $output.='</li>'; $output.='</article>'; }

so when click on brand link, brand name should passed brandproducts.php, when click on brand name takes me brandproducts.php not pass brand name. address bar says http://site/brandproducts.php?brand=

you're using wrong quotes,

$output .='<a href="brandproducts.php?brand='. $info["brand"] . '">';

php

No comments:

Post a Comment