DigitalBoB12 Posted November 16, 2009 Share Posted November 16, 2009 Hey guys, kind of new to php (done a few things with databases and apis), even newer to php freaks. I have a homework due for school, and both the teacher and TA do not have the solution to my problem. Long story short the assignment is to set up a web site to search an actor and movie database. Searching a name gives you results, searching a movie gives you results, this far I have gotten. The problem I am having is (for extra credit) we are required to allow the user to search an actor, get results of the movies he was in, and have the ability to click on a movie name which will then reload the page and show all the actors in that movie. Then the user should be able to click on any actors name that was in the movie, and show all the information for that single actor. My code works for movies of one name (ie: Terminator, T2), but not for movies of two names (ie: Waterworld 2), or names because they are first and last. When I try to assign a name, lets say Ben Stiller, to a session variable it only holds "Ben". Has anybody had this issue with session variables cutting off at whitespace? To better illustrate my problem here is the web URL: http://pdc-amd01.poly.edu/~rmulle01/hw3.php Try searching Arnold Schwarzenegger. This way you can see how "Terminator" and "T2" appear as links that can be clicked to search the movie name. However when Arnold Schwarzenegger appears as a link and is clicked, the session variable only recieves Arnold and nothing is returned. The session variables value can be seen in the URL in your browser Hope this wasn't too long, thanks. Link to comment https://forums.phpfreaks.com/topic/181781-session-variables-stopping-at-whitespace/ Share on other sites More sharing options...
DigitalBoB12 Posted November 16, 2009 Author Share Posted November 16, 2009 Was able to figure out using str_ireplace and replacing all spaces with periods and vice versa. Link to comment https://forums.phpfreaks.com/topic/181781-session-variables-stopping-at-whitespace/#findComment-958758 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.