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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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