Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

goto url

1 view
Skip to first unread message

Rene

unread,
Jul 24, 2002, 12:32:11 PM7/24/02
to
I want to let users goto a page (url) in my .php file.
how can I do this?

Benjamin Esham

unread,
Jul 24, 2002, 12:50:07 PM7/24/02
to
On Wed, 24 Jul 2002 13:32:11 -0400, Rene wrote:

> I want to let users goto a page (url) in my .php file. how can I do this?

Do you mean, output a link to another page that users can click on? Or
automatically redirect them to another page as soon as your .php page is loaded?

For a link:
echo '<a href="' . $url . '">link text</a>';

For a redirect:
header("Location: $url");

For more information about header(), see http://www.php.net/header .

--
Benjamin Esham
bde...@iname.com
http://bdesham.net

Ewgenij Starostin

unread,
Jul 24, 2002, 12:45:51 PM7/24/02
to
On Wed, 24 Jul 2002 18:32:11 +0200, Rene wrote:

> I want to let users goto a page (url) in my .php file. how can I do
> this?

Usual HTML. <a href="url">Go to URL</a> if outside PHP code, otherwise
echo "<a href=\"url\">Go to URL</a>";

HTH

--
Some people say that dying is hazardous for one's health.
Others say that nothing can travel faster than light.
I wonder what the logical connection between these statements is.

Rene

unread,
Jul 24, 2002, 3:05:08 PM7/24/02
to
I was searching for:
header("Location: $url");

Perfect guys, (both of you)...
Thnx for the great help!!!

0 new messages