Page 1 of 1

Output another X.PHP file on Y.php

Posted: Thu Oct 29, 2009 10:59 am
by DiscoDave
Hi lads,

Just wondering if anyone culd help me.

I have a file form.php. This has checkboxes and textfields etc in it.
When the form is processed it directs to process.php where it checks for errors and shows them.
What I want to be able to do is to show the form.php under the errors in the process.php form IF there are any errors.

Anyone be able to shed some light on this ? Is this the include() function?

Thanks,
Dave

Re: Output another X.PHP file on Y.php

Posted: Fri Oct 30, 2009 11:57 am
by davegmpd
Simple answer is - almost certainly yes! You do want to use the include if your aim is to pull in a section of HTML / PHP and execute.

However, if you're "form" PHP file contains a FULL HTML document, eg: <head></head> etc.. then you will have a problem. It really depends on exactly what the files contain.

Suggestion -> try it!

Dave