I have a problem concerning php,mysql, apache's mod_rewrite and a slug function for friendly urls.
I have a table in mysql with series.
This table has an auto_increment ID and an unique_key string that is the name of the serie.
What I want to do is:
The user could write something like
series/name-of-a-serie(because I would prefer to use the unique string more than IDs in this case), and I would get something like
series.php?serieName=name-of-a-seriebut the name I have in the database is
"name of a serie"
then I was thinking about revert the slugged string to take back the original... but then I have other problem:
If I have a function that replace white spaces with hyphens, I would have problems with, for example, the string
"this - name",because if I revert the process, I would get
"this name"and that's not the original name.
Any ideas?
Thanks id advance and sorry because i'm not english and I can't express myself as well as I would like.