Jump to content
Larry Ullman's Book Forums

Recommended Posts

Thanks for the answers. Since I've never used cookies I just have the idea of the word in my mind that it's just simple for misc things. In Asp.Net I used sessions and the cache which seem more solid. So when I saw an author using Header I thought he was going to a more secure level by having more control by passing the data that way even though I was thinking it still wasn`t very secure. So I'll start studying sessions to go for more security. I'll keep in mind that cookies aren't just floating around if you can find them.

Link to post
Share on other sites

Just used a cookie and it worked the first time.  Used "header" to redirect which raises one question.  In your examples you use the absolute path.  You'd think if the destination was in the same directory that you could just address that page instead all the way from the root.  Discovered from reading In your book about sessions that the browser itself handles the back and forth transferring of the cookie.  I suppose there's a lot to learn about all the things browsers do.  A subtle question in my earlier request had to do with getElementById and jQuery.  I was wondering if PHP existed mostly in its own world and would interact with JavaScript and JQuery just like HTML, or maybe it had certain relationships built in developmentwise.

Link to post
Share on other sites

I'm having a hard time following what your actual questions are. Going forward, I'd really appreciate it if you asked explicit questions--with question marks--so I can know whether I'm answering the right thing. You should also, please, create separate threads for separate questions. That makes for better forum hygiene, thereby improving the usability of the Q&A for others. Thanks!

 

I think you're asking:

 

> Why use an absolute path for the redirection?

 

It's more reliable across all browsers.

 

And possibly:

 

> Does PHP operate in a separate realm than JavaScript and jQuery?

 

Yes, PHP runs on the server, not in the browser. JavaScript and jQuery run in the browser, not on the server. 

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