Getting my php file to work with my html file -


so want contact form work on site wrote php make work. here code: (form_process.php)

<?php  $name = $_post('name'); $company = $_post('company'); $email = $_post('email'); $message = $_post('message');  $to ="arp2222@yahoo.com"; $subject="new message kincentive";  mail($to, $subject, $message, "from: ".$name); echo "your message has been sent";  ?> 

i want know how can make php work html file. put php file in root folder index.html file , believe need set form tag. believe need use action or method attribute? setup as

for example.

i using mamp pro local host since site not live yet , want test contact form , recieve test email.

any please new php

in sendemail.html should write code given

<form name="frmemail" id="frmemail" action="sendemail.php" method="post">   <input type="text" name="fname" id="fname">   <input type="text" name="email" id="email">   <input type="text" name="company" id="company">   <textarea name="message" id="message"></textarea>   <input type="submit">  </form> 

this form redirect sendemail.php

<?php   $name=$_post['fname'];   $company=$_post['company'];   $message=$_post['message'];   $to =$_post['email'];   $subject="new message kincentive";   mail($to, $subject, $message, "from: ".$name);   echo "your message has been sent";   ?> 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -