Jump to content

PHP previous page on given condition


aldrin151

Recommended Posts

Hello everyone...I'm trying to do a redirect after a certain condition to the previous page...I tried using header("Location: x.php"); , but there are parameters that I need to maintain and I want to avoid alot of coding...

 

Anyway I want to use a javascript:history.go(-1);

 

For example

 

if ($fldtrappid == "1")

  {

javascript:history.go(-1);

  }

 

I guess this doesn't work since it requires a missing onclick or onblur or something to execute the script. How can I go upon going to the previous page

using javascript:history.go(-1); in the code...?

 

 

Thanks  :)

 

Link to comment
https://forums.phpfreaks.com/topic/112112-php-previous-page-on-given-condition/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.