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


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


7 Years
Discussion Span
Last Post by chrishea

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


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?

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.