Jump to content

calling pages...


ardyandkari

Recommended Posts

hello.

 

i was wondering how a php page calls pages to itself...

 

what i mean is this:

 

i have a contact form.  when i submit information to the form, i basically want a new page to be up, but the page should still be contact.php.

 

i have seen it done in shopping carts and stuff...now i want to figure it out to use on my site.

 

does it have something to do with includes or something?

 

thanks a lot.

ardy

Link to comment
https://forums.phpfreaks.com/topic/60556-calling-pages/
Share on other sites

You can get the same page to behave differently depending on if the form has already been submitted or not. When a form is submitted by POST method for example, there will be $_POST variables containing the values from the form fields. So you can check to see if these exist.

if(isset($_POST["your_form_field_name"]))
{

.....do something with the submitted form values...

}
else
{

....output the form as it has not yet been submitted...

}

Link to comment
https://forums.phpfreaks.com/topic/60556-calling-pages/#findComment-301253
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.