Jump to content

url variable


bsv77

Recommended Posts

I have a re-write rule that takes the URL such as:

/products/?bookname=late-rain

and displays it like:

/products/late-rain

 

and the my script uses the bookname value to search the database. I am running into an issue in that if the value is say "Late Rain" with spaces or "Late-Rain" with dashes, the script will not use that as it should.

 

What is the best way to query something like WHERE bookname = "late-rain"?

 

It may instead be the rewrite as it adds a trailing / when it does not work. If there are no spaces or anything, it works just fine.

 

Thanks for the advise in advance.

Link to comment
https://forums.phpfreaks.com/topic/244707-url-variable/
Share on other sites

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.