Page 1 of 1

I want to show msg-proccess-clear page-show results

Posted: Wed Feb 18, 2004 2:34 am
by man_with_hat
Hi all
I want to show msg-proccess-clear page-show results
ie
data is posted to page
page shows msg "Proccessing..." wotever
php script on page searches db etc
then clears the msg away and prints out results
all this happens in same page
no redirection
a bit like these forums when you search you get a splash screen first..
any help or pointers would be cool
thx

Posted: Wed Feb 18, 2004 10:12 am
by tim
You will probably be using forms, so have a page (index.php) and have like:

Code: Select all

// input your form data you want to pass
<form action=process.php mehtod=POST name=variable
Then have on process.php:

Code: Select all

<?
if (isset(variable)) {
// insert however you wish to connect to your db and whatever you want to do with the file
echo "processing file(s) $variable, please stand by";
// if you want the page to refresh like this site does after you post a msg, use some javascript or whatever
}  else {
echo "the variable you tried to pass from the previous page isnt present";
}
?>
is this what you are wanting?

:// edit: I see what you want

instead of process.php, use the page you have your form on there..
like index.php?id=$variable, then use your isset on the page and you may use the $_POST and $_GET to call upon your variables

Posted: Wed Feb 18, 2004 10:20 am
by vigge89
when things are processed here (phpBB), its not actually the same page, if you look at the adressbar, there are a referer url there...