FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Code to create a cookie in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Code to create a cookie in PHP [message #169829 is a reply to message #169826] Mon, 27 September 2010 20:37 Go to previous messageGo to previous message
MikeB is currently offline  MikeB
Messages: 65
Registered: September 2010
Karma:
Member
Captain Paralytic wrote:

> Mike, it's nice that you're keen, but if you slow down a bit and start
> from the examples in the manual, changing them step by step, you'll
> get on a lot better that just throwing some code down and asking here
> when it doesn't work.
>
> Try the Example #1 from
>
> http://uk.php.net/manual/en/function.setcookie.php
>
> and then note that you are multiplying the time() value rather than
> adding to it.

I am *so* sorry for such a dumb mistake. I checked my code when you
pointed this out and realized the expiry time has wrapped as a result of
that mistake. Apart from that it works fine.

COnsider myself chastised and I'll spend more time self-checking my code
before bothering the folks here.

In my defense, may I just say that this whole learning curve thing is
mega-steep. It's not only PHP that I need to understand, it's also HTML,
the whole protocol thing (like sending data in the headers before the
web page is sent), MySQL, Apache, and a host of other things. Sometimes
I just sit here for a couple of days trying to figure it all out. :(
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mysql_fetch_array
Next Topic: Route/Link to an action works with http, but NOT with httpS (SSL!)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 09:21:57 GMT 2024

Total time taken to generate the page: 0.04276 seconds