You are here: Re: Re: redirect.php?redirID=1 « All PHP « IT news, forums, messages
Re: Re: redirect.php?redirID=1

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация