943,805 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1108
  • PHP RSS
Jan 27th, 2008
0

Set cookies at start of the website

Expand Post »
Hi,
I was searching for the code to set a cookie at the start of the website like you can see at
http://www.apniisp.com , they have given the cookie at the start of the website which automatically popups.
plz send me as soon as possible
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AbdullahKhatri is offline Offline
6 posts
since Jan 2008
Jan 28th, 2008
0

Re: Set cookies at start of the website

Reputation Points: 59
Solved Threads: 12
Junior Poster
MitkOK is offline Offline
142 posts
since Jul 2007
Jan 29th, 2008
0

Re: Set cookies at start of the website

but what about that pop-up window
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AbdullahKhatri is offline Offline
6 posts
since Jan 2008
Jan 31st, 2008
0

Re: Set cookies at start of the website

I want it very urgently because
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AbdullahKhatri is offline Offline
6 posts
since Jan 2008
Jan 31st, 2008
0

Re: Set cookies at start of the website

try this javascript function which will be called with php code

add this code in your inside the head tag but below the title tag

PHP Syntax (Toggle Plain Text)
  1.  
  2. <script type="text/JavaScript">
  3. <!--
  4. function MM_openBrWindow(theURL,winName,features) { //v2.0
  5. window.open(theURL,winName,features);
  6. }
  7. //-->
  8. </script>

and this code you will add it inside the body tag, but you have to first test if the cookie is not set. if not set thats when you put this code

PHP Syntax (Toggle Plain Text)
  1. <?php echo"<SCRIPT LANGUAGE='JavaScript'> MM_openBrWindow('yourpage.html','advert','status=yes,resizable=yes,width=500,height=400')</SCRIPT>";

where it says:

your page- put the name of the page you want to be popped
advert- just the name you want to give it
status- is if you want it to show status bar
resizable- is when you want it to be resizable
width and height- thats the size of the pop up
Reputation Points: 11
Solved Threads: 2
Light Poster
tirivamwe is offline Offline
36 posts
since Oct 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Call to undefined function mysqli_connect()
Next Thread in PHP Forum Timeline: dolphin chat script





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC