Jump to content
Larry Ullman's Book Forums

Chapter 3: Pursue


Recommended Posts

Hi,

 

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?

 

<div>

<p>Click a name</p>

 

<ul>

<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>

</ul>

 

</div>

 

Am I misunderstanding something here?

 

I'm running PHP version 5.2.14.

 

Thanks,

 

Rob

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

 Share

×
×
  • Create New...