0

The question is how do i make the submit button work so if they press submit, the ff will be send to my email (ex: example@gmail.com).' If PHP is needed please post the code so i just gonna paste it on my code :D ty

<div id="forms">
<form class="form">
<p class="name">
<input type="text" name="name" id="name" placeholder="Enter Your Name" />
</p>
<p class="email">
<input type="text" name="email" id="email" placeholder="mail@example.com" />
</p>
<p class="text">
<textarea name="text" placeholder="Describe your logo" /></textarea>
</p>
<p class="submit">
<input type="submit" value="Send" />
</p>
</form>
</div>

I cannot find the answer in the existing question of this, So i decided to make another one... the existing is like 2 years ago?

2 Answers2

0

All you need to do is change your form tag to look like this:

<form action="mailto:address@example.com">

This will send unformatted data to your email address without needing PHP. If you would rather format it in a specific way, then you can use the PHP mail function.

I also removed class="form". Typically this is not needed, but it depends on your reason. If you are using class for CSS you can just reference the element form rather than the class name .form.

kojow7
  • 10,308
  • 17
  • 80
  • 135
0

I think you just need to put a mailto action on the <form> tag, i.e.:

<form class="form" action="mailto:someone@example.com">
jeffjenx
  • 17,041
  • 6
  • 57
  • 99