Posted by David PurpleBerry ASP PRO on 12/18/06 09:10
De: "e" <rjsa@netcabo.pt>
Para: "J.O. Aho" <user@example.net>
Assunto: Re: redirect.php?redirID=1
Data: segunda-feira, 18 de Dezembro de 2006 9:10
The page returns this PHP error:
Parse error: syntax error, unexpected T_BREAK in
/home/matemati/public_html/redirect.php on line 25
----- Original Message -----
From: "J.O. Aho" <user@example.net>
Newsgroups: alt.php
Sent: Sunday, December 17, 2006 10:35 PM
Subject: Re: redirect.php?redirID=1
> David Bagge wrote:
>> How do I create a redirect.php page that i can use for many url's?
>>
>> Ex: http://www.mydomain.com/redirect.php?redirID=1 and
>> http://www.mydomain.com/redirect.php?redirID=2
>>
>> My real question is how do I define a page's contents by a database.
>
> --- redirect.php ---
> <?PHP
> /* This is a hardcoded version, a database based don't need a switch */
> switch ($_REQUEST['redirID']) {
> case 1:
> /* redirID=1 */
> header('Location: http://www.example.net');
> break;
> case 2:
> /* redirID=2 */
> header('Location: http://www.example.com');
> break;
> default:
> /* When redirID don't match */
> header('Location: http://www.microsuck.com');
> break;
> }
> --- eof ---
>
> --
>
> //Aho
[Back to original message]
|