0

hi, i have a form that i am using inside of my site.. and i just recently updated it... to use captcha...
all is well, its just that when i submit it.. it hides the rest of the page, and only shows the form, and says, form sent successfully.. i want it to stay where i have it included...

<?php include('http://site.com/folder/file.php'); ?>

how can i have it so, any errors (missing form data, wrong turing number it will display in the context to the rest of the page...)

easiest way to see what i am talking about is to look at it live...

http://naniboujou.com/retreat.php

scroll down, you will see the form, to test it, just leave all fields blank.. and hit submit.. you will see what i am talking about...
thanks

pj

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by chrishea
0

You're sending the form to the http://naniboujou.com/contacts/retreat.php file as opposed to http://naniboujou.com/retreat.php. It looks as though you've either included the form in your main page and are sending the data to the actual form itself. OR you've got two identical pieces of code, one in the main page and one in contacts/retreat.php.

As a rule, I always send form data to form handling file which processes the data and then either redirects to the original page or to a new one. Data can be stored temporarily by session variables.
For quick fixes, I store error messages, sent form data etc in sessions and redirect to the original form. Then I populate the form with the session data (and display an error if there is one). I then unset the session data.

Edited by diafol: n/a

0

thanks for responding.. those are two different files... retreat.php is the website, and contacts/retreat.php is the contact form, that pulls files from /contact dir...
nani/retreat.php is the guts, and i am inlcluding /contacts/retreat.php...

any way to keep it put?
thanks
pj

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.