View Single Post
Old 07-28-2004, 04:55 AM  
dgraf
Confirmed User
 
Join Date: Jun 2004
Posts: 133
Quote:
Originally posted by arial
PHP Code:
<?
if ($go = "1")
header("Location: [url]http://website[/url]");
:
?>
Simple.

Usage
script.php?go=1

Damn word filters
It is wrong.
At first, the condition will be always true and it will assign value "1" to the "$go" variable instead of evaluating the clause. The condition ($go = "1") should go with an extra equals sign. Moreover, PHP configuration on many servers has register_globals set to off, so you have to use $_GET['go'] instead of $go ... and in the end, the link itself is crippled by the board engine.

I will post example without the condition because this board cannot manage the code even in php or code section.

PHP Code:
header("HTTP/1.1 301 Moved Permanently");
header("Location: FULL-URL-HERE");
header("Connection: close"); 

Last edited by dgraf; 07-28-2004 at 04:58 AM..
dgraf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote