1
michaelo
How do I go to an external URL?
  • 2008/5/12 21:21

  • michaelo

  • Just popping in

  • Posts: 1

  • Since: 2008/3/7 1


I have constructed a valid url out of some bits and pieces in a MySQL database and can't figure out how to push that url out of XOOPS so that a user can jump to it.

I thought I should use "redirect_header" but I cannot seem to get that to work.

The use case is that I have a form with a button on it and when pushed I want to jump out of my xoops-based website to an external website.

php code looks like this ....

<?php
/* index.php */
require_once("../../mainfile.php");
include XOOPS_ROOT_PATH."/header.php";

blah ...
blah ...

$url="http://www.google.com";

redirect_header($url, 1, "Redirecting to Google", true);

include XOOPS_ROOT_PATH."/footer.php";
<?php

Thanks for any help you can provide.

2
trabis
Re: How do I go to an external URL?
  • 2008/5/12 23:06

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Maybe,

header('location: '.$url);

Login

Username:
Password:

Lost Password? Register now!

Who's Online

76 user(s) are online (40 user(s) are browsing Support Forums)


Members: 0


Guests: 76


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits