URL replace space with hyphen but recordset doesnt recognise...
Hi. ok quick question I am using Product names in my URL
For example a product name would be stored in the database as: Double Print Bookmark
Client is having issues copying the URL link to facebook, and its because of the spaces inbetween words.
I then used
str_replace(' ', '-', after the echo and before the fieldname and this worked as it replaced spaces for hyphens in the URL.
<div class="button"><a href="product.php?Product=<?php echo str_replace(' ', '-', $row_rsProducts['ProductName']); ?>">View Item</a></div>
However, when the link is pressed and the page goes to the specific URL it of course doesnt display since the recordset on the products.php page is filtering the URL (that now has hyphens) with the original product name in the database (with spaces).
So my question how can I tell the recordset to look up the product but with hyphens included?
Could I somehow set product name to include hyphens just before the recordset query?