OT: Php redirect query

A

Animesh K

Hello All:

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?


More details:
-------------

Javascript: Needed (nothing funky there, except some onclick events).

URL: http://stutimandal.com/gif_misc/indra_krta_rama_stotram.php

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.

Best regards,
Animesh
 
J

J.O. Aho

Animesh said:
Hello All:

This question is slightly off-topic, but hopefully someone has fiddled
with this problem before.

This had been far better on a javascript group

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.

You see to that the poem_fb.php generates the page you want to have displayed,
instead of the header() you can have include_once('index.php');
 
J

J.O. Aho

Animesh said:
Hello All:

This question is slightly off-topic, but hopefully someone has fiddled
with this problem before.

This had been better posted at alt.php or some javascript nesgroup, depending
on what kind of solution you want

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?

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.
 
A

Animesh K

J.O. Aho said:
Animesh K wrote:
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.

I am using #2 in the above list, I think. I want a no-reload type
solution (mimicking Ajax) using php. I wonder if that is possible.

Thanks for the reply,
Animesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,795
Messages
2,569,644
Members
45,359
Latest member
1854578

Latest Threads

Top