Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- OT: Php redirect query
- Animesh K
June 26, 2007, 7:48 pm
rate this thread
This question is slightly off-topic, but hopefully someone has fiddled
with this problem before.
A php script poem_fb.php is a separate file. I call it using a form to
submit comments. Then the php form gives a redirect url which causes an
extra reload of the page where the user is already present.
Is it possible to get rid of the extra re-load? What is a better way to
call the php script so that this reload can be avoided?
The page can be found at the above link (sorry about bad aesthetics, I
need to improve the icons and the floated layer style).
Clicking on contact reveals the form. Clicking on abort removes the form
away. Clicking on Send will send an email to me (don't worry about
flooding me, just say alt.html in the text and I will delete the email).
Right now validation is not present (in a proper way). I will add the
validation script later.
I can email the php script if needed.
Re: OT: Php redirect query
on what kind of solution you want
Of course, all depends on what kind of solution you want.
1. You can poem_fb.php include the page you want to show.
2. You can redirect the form to the page you want to show, if a $_POST value
been got by the page, it includes the poem_fb.php
3. you use ajax to send the comment, this way the user stays on the original
page all the time.