hi everybody. i need to make a code witch redirect user after bank on-line paying to 2 sites. one after paying was successful and second if not. bank after paying set url with some parameters but important is RES with values OK and FAIL. so i need script witch do something like this: if param res = ok > redirect to http://www.some.biz/success.php if param res = fail > redirect to http://www.some.biz/fail.php but i cant find the rigth way to do it.. please help me if somebody know how to do this correct way. thanks a lot
How you receive the value of the parameters. If its through GET, you can use it like this. <?php ob_start(); if($parameter == 'OK') { header('Location: http://www.some.biz/success.php'); } else { header('Location: http://www.some.biz/fail.php'); } ob_end_flush(); ?> PHP:
hi nishanair, thanks for your reply but, this dont work for me. bank is calling site witch i want (there should be a script) and adding some parameters after this url. what they send to me is some like this : http://www.some.com/afterpaying?VS=232&RES=OK&SIGN=7676556789221 imortant for the script is the RES with parameters OK or FAIL do you know how to do this? thanks
does RES value changes? i mean if it was okay it will show value OK? and if it fails it shows failed?
If you can understand the above code, then you only need assign the variable first, for example if($parameter == 'OK') PHP: to $parameter = $_GET['RES']; if($parameter == 'OK') PHP: