Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reloading page from action script

Posted on 2003-11-12
5
Medium Priority
?
259 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:RichardFox
5 Comments
 
LVL 6

Expert Comment

by:aolXFT
ID: 9734527
check out www.php.net/include and www.php.net/readfile

I think that they are what you are looking for.
0
 
LVL 4

Expert Comment

by:intrwrks
ID: 9734666
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>";

?>
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9736047
That or you can use a header redirect:

header("Location: http://www.newdomain.com/list.php");
exit();
0
 
LVL 14

Accepted Solution

by:
ThG earned 200 total points
ID: 9736342
OR you can move the code in action.php inside list.php (at the top, you'll sort out the details..) and have  the form submit to himself.
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9736431
Thg's approach is the method I use personally.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question