Jump to content

turk

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    San Diego

turk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i want users to be taken to the landingpage.php each time when they visit the site for the next 5 times they visit the site. the existing code i previously had (which is down below) works like a charm but brings the landingpage.php only once. <?php session_start(); if(!isset($_SESSION['views']) || !$_SESSION['views']) { $_SESSION['views'] = 1; header("location: /landingpage.php"); exit; } ?> here it goes in this code. user types www.mydomain.com and get redirected to www.mydomain.com/landingpage.php where clicks on HOME (<a href="www.mydomain.com">) button and goes to www.mydomain.com closes to browser, and next day user types www.mydomain.com and gets directed to www.mydomain.com what i need is that users redirected to the /landingpage.php at least the first 5 times they visit the site. P.S. i hope, i made more sense this time. this could be very strategic and useful to capture user emails, advertise promotional, recent news, info video, etc. user gets fully familiar with the site.
  2. thank you david and tendola. updated the session as follows, and now it only stays on the /landingpage.php <?php session_start(); $_SESSION['views'] = (isset($_SESSION['views'])) ? $_SESSION['views']++ : 0; if ($_SESSION['views'] <= 4) { header("Location: landingpage.php"); exit; } ?> P.S. glad asked you guys, this much testing would have taken me over a week.
  3. sorry for the headache im causing AyKay47. why simple looking things always has to cause the major headache. no luck with the if statement either chief. getting the same print "Array ( [views] => 0"
  4. very tough. it is printing only Array ( [views] => 0 )  i might be wrong but it seemed to me like, it gets directed to landingpage.php but before even load it get redirected to back to index.php
  5. i see the change. tried few other things but it still hits index.php without redirecting to landingpage.php
  6. WOW. first of all very impressed by all these help. u guys are fucking great. I love the freaks already. @djless clever. i really like the clock. i dont know why but it works as my session code. it wont do the count. :/ @premiso this session did not redirect me to landingpage.php for some reason yes. when users type the root domain, instead of index.php, i want visitors to be directed /landingpage.php at least 5 times.
  7. ..nice. thanks alot premiso. it worked. but it kinda makes loop :-\ it brings the .com/landingpage.php without showing /index.php 5 times.
  8. hi fellas. my first ever question on phpfreaks. when visitors type www.mydomain.com, session takes them to www.mydomain.com/landingpage.php when they click "go to the site" on www.mydomain.com/landingpage.php, it takes them to the index page www.mydomain.com Unless they clean their cooking, session won't forward take visitors to the landingpage ever again. but is there anyway to show the landing page to visitors, lets say the first 5 times when they type www.mydomain.com? here is what i exactly use for it. <?php session_start(); if(!isset($_SESSION['views']) || !$_SESSION['views']) { $_SESSION['views'] = 1; header("location: /landingpage.php"); exit; } ?> Much Thanks in advance. Turk.
  9. turk

    hello freaks

    thanks guys. and tec-4, you are 6 mins to me dude.
  10. turk

    hello freaks

    btw love SMF. built couple of them myself. easy and fun to work with.
  11. we are on the same boat mate. welcome.
  12. hello dear freaks. im the new freak on the block. originally turkish. MIS grad. san diego resident. looking forward share and get freaky
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.