Why are you passing the title as your primary?
Don't get me wrong, You found a very good solution to your problem, but it's a problem that you can avoid.
...My point is that if you pass an id number instead of your title you can eliminate some sloppy coding & work from a better data model. You won't have to manipulate the string to pass it in the URL then correct it for your select statement. You will never have to worry about duplicating the title...
However you choose to handle this obstacle, I'm sure that your project will turn out great. You seem very resourceful. I'm no expert myself, but I am fortunate enough to work with someone with amazing knowledge of data models.