Jump to content


Photo

If recordset is empty - GOTO


  • Please log in to reply
2 replies to this topic

#1 frankriedel

frankriedel
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 11 November 2005 - 01:39 PM

Is it possible to make a PHP code that redirect to another page if a recordset is EMPTY ??

If so - give an example please ;o)

Regards
Frank

#2 jweiss

jweiss
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 14 November 2005 - 09:36 PM

Hey Frank,

Insert this into your page and then highlight it and tell DW to show when there are no records

[!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--][blockquote]header("Location: [a href=\"http://www.example.com");\" target=\"_blank\"]http://www.example.com");[/a][/blockquote][!--fontc--][/span][!--/fontc--]

Or, if you're redirecting to another page on your site, this snip will redirect to the index page.

[!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--][blockquote]header("Location: http://" . $_SERVER['HTTP_HOST']
. dirname($_SERVER['PHP_SELF'])
. "/index.php");[/blockquote][!--fontc--][/span][!--/fontc--]

If you have any problems let us know.

-jeremy

#3 frankriedel

frankriedel
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 14 November 2005 - 09:47 PM

Thx - Sir

Working fine




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users