Email Form to ID

I would like to add a PHP form to a ID on my page, do I need to create a HTML Form or do I just use the PHP code, here is the manual as I don’t know PHP.

What does that mean?

What does that mean?

I want to add a PHP email form in a ID.

What does that mean? :lol:

You add a form to a page. Not sure what “in a ID” means. I only know an ID as being something like id=“something”. You don’t put a form in that.

So, do you mean you want a contact form on your page, or something else?

yep, agree with ralph.m

define ID

So, do you mean you want a contact form on your page

I want a contact form on my page, I just want it contained within a ID (div)

There is no reason why that wouldn’t be possible

I never said it’s not possible, but do you have to wrap the PHP within the HTML as I just read, I don’t understand !

You don’t have to but it won’t do any harm. So just place it in the required div

What code must I insert, that is what one of the dilemmas :slight_smile:

Ah I see Dou you want it all to happen on one page or two separate pages, I.E a thank you page?

please explain exactly what you need? give me in details

thanks

<snip/>

Ah I see Dou you want it all to happen on one page or two separate pages, I.E a thank you page?

I want it to happen on one page.

please explain exactly what you need? give me in details

I want the email contact form within a div, to which I’ll stylize afterwards.

I’m just doing a follow up on this problem if I could get some assistance.

Let me try and confirm what you actually want.

Is this what you want?
A form that people submit, which ends up getting emailed to you?

Oh, the link.

See: Send Email

Let me try and confirm what you actually want.

Is this what you want?
A form that people submit, which ends up getting emailed to you?

Yes, the PHP form is the one I want to use. The HTML form code must be used even if I use PHP that I now understand. What I don’t understand is how to bring in the PHP code into the whole scheme of this !

Submit the form to your php page that will email the form, and have that php page retrieve the form data and email it off to you.

Here’s the majority of the code you should need: send email

How is the Form Tag telling the PHP form, how is it calling it in the HTML code, I don’t quite understand that. How can I tell the form to use the PHP form that I have chosen ?

You might have missed reading part of the send email page.

Here - I’ll quote it for you, and mark in bold the piece that tells you what to do.

  1. Process with PHP
    This could be in a seperate file (e.g. sendemail.php) in which you’d set the action URL of the form to go there.

So what you do is, set the action URL of the form, which is the action attribute of the form element.

For example:


<form action="sendemail.php" method="post">