Jump to content

header pop-up?


bm4499

Recommended Posts

No can do, its not serverside, it cannot control the browser. Use Javascript or HTML.

i would suggest a meta refresh or a little js wrapped in and if statement...

 

<?php
if($variable==true) {
?>
<script>
window.open("www.google.co.uk");
</script>
<?php } ?>

 

or

<meta http-equiv="refresh" content="1;URL=http://google.co.uk" target="_blank">

 

 

Link to comment
https://forums.phpfreaks.com/topic/224615-header-pop-up/#findComment-1160332
Share on other sites

Just to clarify same window does not mean server side, serverside means that the script is processed on the hosting server and then passed to the users browser as html, php does this, clientside means that the script is processed on the clients machine and modifies the contents of the users web browser, javascript does this.

 

The reason you couldnt do what you wanted with php is because php has no actual communication with the users web browser as it has finished its job before it gets there, and thus we use scripts like javascript to perform any actions we need on the users web browser, such as onclick events, onmouse over events, pop ups etc etc

Link to comment
https://forums.phpfreaks.com/topic/224615-header-pop-up/#findComment-1160571
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.