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

 Share

×
×
  • Create New...