If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Funky URL's

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-04, 13:54
ilikeitraw ilikeitraw is offline
Registered User
 
Join Date: Oct 2003
Posts: 13
Question Funky URL's

Each page of my site is dynamically generated via my database, and some of the URL's to product names contain special characters, like trademark symbols...etc.

The name in the URL is then queried in my database, and I've been having luck using odd URL's like so:
http://www.domain.com/Coolproduct-Rad_reg;_Super.php
http://www.domain.com/DopeProduct-Nice__153;_Travel.php

Notice that I just had to use an underscore character in the name, so that MySQL will treat it as a wildcard character and return the proper results.

I ran into one problem, which is in regard to double quotes.
I have a product name like so:
/SuperCoolProduct Black "large"

I've tried escaping the double quotes using many different techniques, but to no avail.
I was assuming I'd just be able to utilize the underscores like I did with the rest of the product names, but that is not the case... and, I've tried many of the following combinations:
/SuperCoolProduct_Black__large_
/SuperCoolProduct_Black__quot;large_quot;
/SuperCoolProduct_Black__34;large_34;


Any suggestions would be greatly appreciated !!
TIA !
Reply With Quote
  #2 (permalink)  
Old 01-15-04, 22:54
donsimon donsimon is offline
Registered User
 
Join Date: Jan 2004
Posts: 24
preg_replace. Just use preg_replace to find any funky characters and remove them. Or just replace them with something goofy like | or the $.

Donny
__________________
http://www.phpscripts.com/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On