Link to home
Start Free TrialLog in
Avatar of RichardFox
RichardFox

asked on

Reloading page from action script

Hi,

TO illustrate my question, I have 2 scripts, list.php and action.php.

list.php displays a form with a list, each list entry having a checkbox, and a 'remove' button. When the 'remove' button is clicked, the form is submitted to action.php, and the checked entries should be removed and list.php reloaded.

What is the syntax for simply reloading list.php in the window, from action.php?

Thanks,

Rich
Avatar of aolXFT
aolXFT

check out www.php.net/include and www.php.net/readfile

I think that they are what you are looking for.
You can use javascript:

<?php

// code to remove the checked entries

echo "<html><head><title>Name of Company</title></head><body>";
echo "<script language=\"javascript\">window.location=\"list.php\";</script>";
echo "</body></html>";

?>
That or you can use a header redirect:

header("Location: http://www.newdomain.com/list.php");
exit();
ASKER CERTIFIED SOLUTION
Avatar of Giovanni G
Giovanni G
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thg's approach is the method I use personally.