Jump to content
Larry Ullman's Book Forums

Chapter 3: Pursue

Recommended Posts



Firstly I'd like to say 'm really enjoying the book, it expalins things a little slower than the php & mysql book which suits me better :)


My question is regarding the chapter 3 pursue and the $_GET variable.


"If you're the inquisiive type, and don't mind waiting for answers, try passing more complicated values to a page through the URL. Try using spaces and punctuation to see what happens."


Earlier in the chapter you said "They won't be passed to the php script properly...", yet when I tried this it returned the value no problem?



<p>Click a name</p>



<li><a href="hello.php?name=Paul 'John' Thomas">Paul 'John' Thomas</a></li>

<li><a href="hello.php?name=Lee">Lee</a></li>

<li><a href="hello.php?name=John">John</a></li>





Am I misunderstanding something here?


I'm running PHP version 5.2.14.





Link to comment
Share on other sites

Okay, then. So maybe that's not causing a problem any more and kudos for discovering it. In real-world code, though, I'd always run values through urlencode() to make them safe to use in a URL. You'll learn about this function in time.

  • Upvote 1
Link to comment
Share on other sites


  • Create New...