Jump to content
Larry Ullman's Book Forums

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...