Jump to content

Adding - Between Keywords in Link


justlukeyou

Recommended Posts

Hi,

 

I have roled out pretty URLs throughout my site however I am stuggling to search for more than one keyword.

 

I can add links for "widgets" but not "red-widgets".  Can anyone advise how - between the keywords in a query link?

 

RewriteRule ^products/nameproductscategorised/([a-zA-Z-]+)$ /products/productscategorised.php?name=$1

Link to comment
https://forums.phpfreaks.com/topic/264128-adding-between-keywords-in-link/
Share on other sites

Hi,

 

This is complete code I am using:

 

<?php
$name = mysql_real_escape_string($_GET['name']);
$query = mysql_query("
    SELECT name, product_id, rrp, discount, image_link
        FROM productdbase p
        INNER JOIN groups f
            ON
                f.long_name = p.group
        WHERE
            name LIKE '%{$name}%'
    LIMIT 15");

while ($query_row = mysql_fetch_assoc($query)) { 

?>


<div class="productrangeborder">
<div class="productsdetailsborder">
<a href="/product/<?php echo $query_row['product_id']; ?>" class='productlink' rel="nofollow" ><?php 

echo $query_row['name']; ?>
</a>
</div>

<div class="productimageborder">
<a href="/product/<?php echo $query_row['product_id']; ?>" rel="nofollow"><img src="<?php echo 

$query_row['image_link']; ?>"/></a>
</div>

<div class="priceborder">Price £<?php echo $query_row['rrp']; ?><br /></div><div class="discountborder">Save <?php echo $query_row

['discount']; ?>%<br />
</div></div>

<?php echo $_GET['name'] ?>

<?php 
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.