0
How can I connect HTML message send to server through PHP?
I have created a message send form in index.html package and I need to connect it to back-end via PHP and I do not know how! Code in HTML Form is like below!!! <form action="message.php" method="post"> <input type="text" placeholder="name" class="box"> <input type="email" placeholder="email" class="box"> <input type="number" placeholder="number" class="box"> <textarea name="" placeholder="message" id="" cols="30" rows="10"></textarea> <input type="submit" class="btn" value="send message"> </form>
4 Réponses
+ 1
with a local apache server, you will also need to create an account on some SMTP server to use it as a gateway and use those credentials in your script. there are a lot of solutions, check Github for php email.
+ 1
your form action uses "message.php" so the code to retrieve all the variables and send their content should be in that file.
in the same directory where index.html is, create message.php
and put your code there.
what server are you using?
+ 1
Understand. Thanks a lot bro!
0
Okay. Thanks for response. Yeah, honestly, I am using an Apache HTTP Server