Solved

Reloading page from action script

Posted on 2003-11-12
5
229 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP/Magento not logging 2 35
Form not operating correctly. 1 23
test if query has no results 2 19
How to count in a table in php 22 14
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now