Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-14-2005, 05:03 AM PHP Intro
Skilled Talker

Posts: 80
Trades: 0
Im asuming this is done with php. I have an intro, but I dont want it to appear everytime some one opens the site. I want it to come up for first time lookers and once every 3 days.
Hope that makes sence.
Thanx
TBLTK is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-14-2005, 02:05 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
yeah it makes sense.

You're looking at working with cookies, so when a new user come along u add a cookie to their system to be deleted in 3 days time which tell the PHP script not to show them the intro again because they've already seen it!

try phpbuddy.com, they have an article on cookies, or if that dont help look at http://www.sitepoint.com they may have an article - it's not too complex to do

http://www.phpbuddy.com/article.php?id=12
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 08-15-2005, 03:04 AM
Skilled Talker

Posts: 80
Trades: 0
Thanx but it doesnt really you how to use them. Ive got this bit <?php
$site_name = "Site.com";
setcookie("first_cookie",$site_name,time()+604800) ;
?>
Where do you put it, and does it mean it will go to Site.com if the person has visted the site it will go to Site.com.
TBLTK is offline
Reply With Quote
View Public Profile
 
Old 08-16-2005, 11:14 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
PHP Code:
  $site_name "Site.com"
  if(
$_COOKIE['first_cookie']){
     
// already set 3 day limit not reached 
     
$this->do_whatever();    
  }else{
     
setcookie("first_cookie",$site_name,time()+604800); 
     
$this->show_intro();  
  } 
you will need it to be one of the first bits of code parsed so as not to give false display.

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to PHP Intro
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26894 seconds with 12 queries