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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
man_with_hat
Forum Newbie
Posts: 3
Joined: Wed Feb 18, 2004 2:34 am

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

Post 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
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post 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
Last edited by tim on Wed Feb 18, 2004 10:37 am, edited 1 time in total.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post 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...
Post Reply