html help
#1

I m new learning html coding. my question is: look at my coding and i want if someone put comment or select whatever and then after they click on submit, they should go to my email. i want result to my email. now how i got msg on email when someone comment and select. SrY bad english.


PHP код:
<html>
<
head>
<
title>Contact Us</title>
</
head>
<
body>
<
body background="gui.png">
<
font color "FFFFFF"><h2><strong>Contact Us</strong></h2></font>
<
hr>
<
br>
<
br>
<
form>
<
input type="radio" name="choice" value="choice"><font color "FFFFFF"><strong>Excellent</strong></font><br>
<
input type="radio" name="choice" value="choice"><font color "FFFFFF"><strong>Very Good</strong></font><br>
<
input type="radio" name="choice" value="choice"><font color "FFFFFF"><strong>Good</strong></font><br>
<
input type="radio" name="choice" value="choice"><font color "FFFFFF"><strong>Fair</strong></font><br>
<
br>
<
font color "FFFFFF"><Strong>Your Comment</strong></font>
<
br>
<
textarea name="cmsg" id="cmsg" cols="35" rows="7" class="form-feild" style="border: none;"></textarea>
<
br>
<
input type="button" value="Submit" onclick="submitForm()"/>
<
input type="button" value="Reset" onclick="reset()"/>
</
form>
</
div>
</
body>
</
html
Reply
#2

Use PHP.
PHP код:
bool mail (string $tostring $subjectstring $message [, string $additional_headers [, string $additional_parameters ]]) 
That means in PHP you would do:
PHP код:
<form method="post">
<textarea name="text" id="cmsg" cols="35" rows="7" class="form-feild" style="border: none;"></textarea><br />
<input type="submit" name="submit">
</form>
<?php
if(isset($_POST['submit'])) {
    if(empty(
$_POST['text'])) {
        echo 
"Enter something.";
        exit;
    }
    
mail('BLABLA@BLA.COM''E-MAIL SUBJECT'$_POST['text']);
}
?>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)