0

DOES ANY ONE KNOW HOW TO VALIDATE THIS FORM?
case 1: if any field is not completed, display in red colour and display a text message to correct,

case 2: once is completed, display TANKS FOR SUBMIT YOUR FORM, AND REDERECT TO INDEX PAGE.

<?php 

$msg ="Name:       $_POST[name]\n";
$msg .="Email:      $_POST[email]\n";
$msg .="message:    $_POST[message]\n";
$subject = "form results";

$recipient = "contact@domain.com";
$mailheaders ="reply-to: $_POST[email]";

mail($recipient, $subject, $msg, $mailheaders);
?>

THANK EVERY BODY

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by ADVAD
0

DOES ANY ONE KNOW HOW TO VALIDATE THIS FORM?
case 1: if any field is not completed, display in red colour and display a text message to correct,

case 2: once is completed, display TANKS FOR SUBMIT YOUR FORM, AND REDERECT TO INDEX PAGE.

<?php

$msg ="Name: $_POST[name]\n";
$msg .="Email: $_POST[email]\n";
$msg .="message: $_POST[message]\n";
$subject = "form results";

$recipient = "contact@domain.com";
$mailheaders ="reply-to: $_POST[email]";

mail($recipient, $subject, $msg, $mailheaders);
?>

THANK EVERY BODY

Check this link http://www.echoecho.com/jsforms.htm, pretty good..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.