Jump to content

Help with PHP form


barn07

Recommended Posts

If form.php is the original contact form, then you can put all of the code in this one file and do away with the second file contact.php.  You will note in the example code I posted that the action attribute of the form is blank, this causes the form to post to the same file that it is in (in this case form.php).  You can explicitly put form.php there but if you later change the name of the file you will have to change it in the action as well (of course you will be changing it on other pages that link to it, so that is no big deal).

 

So, basically, the code I posted becomes form.php and you delete contact.php (well, save it off somewhere incase you want to refer to it later).  Note, that I did not include any of your processing that builds up the mail parameters in the example, you will have to cut and paste that as needed.

 

I did not test that code, so it may have some issues.  If you run into any problems, continue to post the problems, code and error messages.

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.