PHP Send Mail redirect in particular div, need help...

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
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

PHP Send Mail redirect in particular div, need help...

Post by WithHisStripes »

Heya,
I am working on my website http://www.firetree.us and I have a link on the left that opens a form into the content div in the center of the page. The form then submits to a PHP send mail page but it opens it into an entirely new page rather than containing it within the div. Obviously this is expected but I'm not sure if there's any real solution for it considering the structure of the site with javascript. Can anyone help?
Thanks!
RhapX
Forum Commoner
Posts: 30
Joined: Mon Dec 05, 2005 5:24 pm
Location: Seattle, Washington

Post by RhapX »

Can you be more specific, it seems to be working fine?
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

Post by WithHisStripes »

Sure... thanks for your reply... In Safari and FF on Mac you submit the form, it redirects to an entirely blank page and then back to the home page. I'd like, when you click send, for the page to stay the same and the data in the div to update instead.

Does that make better sense? Thanks again!
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

PHP doesn't just 'update a div,' it send a whole new page request. You can simulate it by keeping the same content on the otside of that particular div, but PHP won't change just that. AJAX may be of some use.
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

Post by WithHisStripes »

Cool. Thanks guys.
Post Reply