Anyone have any ideas on how to do this? Want some HTML to only show up when the visitor first view the page.




Anyone have any ideas on how to do this? Want some HTML to only show up when the visitor first view the page.
Free Styles for Indexscript, phpBB, BrokenScript, Wordpress and phpLD - My Blogging Life! - Expired Domains
Knowledge is for those who believe that they can do well!
Something like this should work for you. Create a cookie and check said cookie to see if you need to output HTML.
Scratch that, I'll look at this again when I get home.
Last edited by JHalstead; Jan 3rd, 2008 at 3:02 pm. Reason: error in code
First time ever and never ever again? First time in a new session?
There are so many ways to think about this, 20 coders could give 20 different answers that all work and not serve your need.
But cookies can help and sessions with DB records can certainly do it, but in the best case scenario if the case if never ever again, a user DB would be needed.
Free vBulletin hacks and vBulletin Support.
Talk to bikers around the world about motorcycles.
Clogging an american dance step.




Well first time and every first time you've closed your browser, so it only shows once if you do not close your browser.
Free Styles for Indexscript, phpBB, BrokenScript, Wordpress and phpLD - My Blogging Life! - Expired Domains
Knowledge is for those who believe that they can do well!
A cookie could do it. But cookies are blocked by so many these days it's possible it could not work for all.
A session is likely the best bet I would speculate.
Free vBulletin hacks and vBulletin Support.
Talk to bikers around the world about motorcycles.
Clogging an american dance step.




Well how do i make a php script to do this? I'm kind of bad at it as i haven't coded php that much lately![]()
Free Styles for Indexscript, phpBB, BrokenScript, Wordpress and phpLD - My Blogging Life! - Expired Domains
Knowledge is for those who believe that they can do well!
If you are not collecting any personal info, a simple sessions code block found on the net will solve the problem. If it's personal info, I would hire a professional or use a service. Too much liability.
It's not a difficult job to do, getting it right is important though for your needs and covering your butt and your users info.
noppid added 5 Minutes and 8 Seconds later...
See this post Webmaster Discussion Forums - View Single Post - form posts and .htaccess
Last edited by noppid; Jan 4th, 2008 at 7:01 am. Reason: Automerged Doublepost
Free vBulletin hacks and vBulletin Support.
Talk to bikers around the world about motorcycles.
Clogging an american dance step.





I think that using a session is the best in your situation...But you have to keep in mind that the 3 major SE's don't care much for session ID's...Do you mind if I ask what you are doing? Cookies can be quite useful, you can use a cookie, and have the cookie expire within 10 minutes of no use, and have it re start everytime a new page is loaded...I have done this with a few script before...I try to avoid sessions at all costs. Basically, if the person leaves your website for 10 minutes or more, or idles for 10 minutes or more, they will be shown the front page of the site....Once they have seen the front page of the site....On and on....
It's true that there are a few people who believe that disabling cookies is a security feature, however, most people nowadays are smarter than that, and continue to allow cookies...Especially considering that most of the internet wouldn't be available to them if it weren't for enabling cookies...I would say that less than 1% of internet users disable cookies.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks