Rev server: going to another .irev page from script

Alex Tweedly alex at tweedly.net
Fri Feb 11 18:52:54 EST 2011


It looks (but only minimally tested) as though you can simply include 
the redirect where needed

> <?rev
>
> put $_GET["cmd"] into tCmd
>
> if tCmd = "redirect"  then
> ?>
> <html>
> <head>
> <title>Your Page Title</title>
> <meta http-equiv="REFRESH" 
> content="0;url=http://www.kilmelford.com/admin/anythingtodo.irev"></HEAD>
> <BODY>
> Optional page text here.
> </BODY>
> </HTML>
> <?rev
> else
>   put "another command " & tCmd & CR
> end if
> ?>

-- Alex.


On 11/02/2011 21:57, stephen barncard wrote:
> I'm sure there's a way to do this but I can't seem to find it.
>
> I have a user password script that then is supposed to 'go' to another html
> page but the only way I can get it to work is to use an intermediate file
> (gosite.html) which has a cheesy html redirect command : CONTENT="0;URL=
> http://site.com/private/index.irev">
>
> I can't figure out what to use to go to another irev page directly.
>
> launch document  does not work.
> launch doesn't work
> include is just wrong and has side effects
>
> I know it's just me, but I can't figure what command to do this simplest of
> things.
>
> any help appreciated.
>
> thanks
>
> sqb
>
> <?rev
> set the errormode to "inline"
>
>
> put $_POST["user"] into tUSER
> put $_POST["pwd"] into tPWD
>
> switch
> case tPWD is "marvin" AND (tUSER is "visitor1006")
> include "gosite.html" -- this file is needed somehow
> exit to top
> break
> case tPWD is "doggie" AND (tUSER is "visitor2006")
> include "gosite.html"
> exit to top
> break
> case (tPWD is "admin") AND (tUSER is "admin")
> include "private/index.irev"  -- this works but it throws off any css
> encoding.
> exit to top
> break
> default
> -- do nothing on bad entry
> end switch
>
>
> ?>
>
>





More information about the use-livecode mailing list