View Full Version : Help with some code plz =D [+Rep]
Jahova
15-02-2007, 05:10 PM
Hi, I want to know what should I add to the code below to make the specified go into a new window, not the same one.
+ rep for awnsers
- T.
setcookie("in", 1, time()+3600);
// Start hidden page
header("Location: http://www.cowly.co.uk/staff/logged.htm");
}
}
Edited by Lµke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks :).
Jahova
15-02-2007, 05:20 PM
This is php...?
- T.
PHP cannot control the client, it is server-side, so it cannot choose whether it loads in a new page etc.
Use Javascript to load the page instead.
Heres a simple code
<script type="text/javascript">
function LoadPage(URL){
window.open(URL);
}
</script>
And heres an example of using it
<a href="javascript:LoadPage('http://google.co.uk')">LOL</a>
Jahova
15-02-2007, 05:28 PM
Oh yeah forgot, its for a login system :l
Plz =D
Then you could use something like this
<?php
setcookie("in", 1, time()+3600);
// Start hidden page
?>
<script type="text/javascript">
window.open('http://www.cowly.co.uk/staff/logged.htm');
</script>
<?php
}
}
?>
Jahova
15-02-2007, 05:44 PM
Thanks +rep.
I am not using it but it would have worked.
I am making a whole new system using a tutorial and building on it =D
- T.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2026 vBulletin Solutions Inc. All rights reserved.