saadat_2003 Posted November 30, 2017 Share Posted November 30, 2017 echo '<li ><a href="sidebar.php?category='.$row["cid"].'">'.$row2["csname"].'</a></li> <?php $query3="SELECT * FROM items where category='sidebar.php?category'"; I want to use this id of href in the query to display text and image of that category id Link to comment Share on other sites More sharing options...
requinix Posted November 30, 2017 Share Posted November 30, 2017 $_GET And before you do, don't put the value directly into the query. Use a prepared statement. How you do that depends on whether you're using mysqli or PDO... Link to comment Share on other sites More sharing options...
saadat_2003 Posted November 30, 2017 Author Share Posted November 30, 2017 using sqli Link to comment Share on other sites More sharing options...
BigB Posted November 30, 2017 Share Posted November 30, 2017 @saadat_2003, did you prepare the statement like "requinix" mentioned in above post? where is the code or where you at with it? more information if you require help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.