Without code to look at, it's anybody's guess as to what's wrong.
Is this some kind of database question?
Possibly solution if it is, would be to pass the database record ID instead of name. Alternatives are to use urlencode() and urldecode() [check the manual for details] so that the spaces in names can be handled.