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

but what about that pop-up window

I want it very urgently because

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

<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</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   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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.