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
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 
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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