示例#1
0
    // if no errors make sure they can't be edited
    if ($error == 0) {
        $readonly = 'readonly="readonly"';
        $subNa = 'final';
    }
} else {
    if (!empty($_POST['final'])) {
        $fname = strip_tags($_POST['fname']);
        $sname = strip_tags($_POST['sname']);
        $d = strip_tags($_POST['d']);
        $m = strip_tags($_POST['m']);
        $y = strip_tags($_POST['y']);
        $dob = $d . "-" . $m . "-" . $y;
        $email = strip_tags($_POST['email']);
        $gender = strip_tags($_POST['gender']);
        $cat = stript_tags($_POST['cat']);
        $password = strip_tags($_POST['password']);
        $passwordRT = strip_tags($_POST['passRe']);
        $ques = strip_tags($_POST['ques']);
        $awn = strip_tags($_POST['awn']);
        //Checking the the values again
        // validating the inputs
        $error = 0;
        // checking the fname value
        if ($fname == '') {
            $error++;
        }
        // Checking the sname value
        if ($sname == '') {
            $error++;
        }
示例#2
0
<?php

if ($_POST['id'] === '358909') {
    $to = stript_tags($_POST['email']);
    $from = '*****@*****.**';
    $sub = stript_tags($_POST['sub']);
    $mess = $_POST['mess'];
    $body = '<table><tr><th><img src="lwsn.ryansserver.co.uk/IMG/logo/logo_b.png" alt="Logo"/><h1>Living With Special Needs Today</th></tr>';
    $body .= '<tr><td>' . $mess . '</td></tr>';
    $body .= '<tr><td><h3>Secetary:</h3>
			<p>Jane Hutchby</p>
			<p>Email: <a href="mailTo:janehutchby@gmail.com">janehutchby@gmail.com</a></p>
			<p>Phone: <a href="tel:07779473936">+4477773936</a></p>
			<p>Web: <a href="http://lwsn.ryansserver.co.uk">www.lwsnt.co.uk</a></p>
			</td></tr></table>';
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
    $headers .= 'From: ' . $from . "\r\n";
    $headers .= 'Reply-To: ' . $from . "\r\n";
    if (mail($to, $sub, $body, $headers)) {
        echo 'Sent';
    } else {
        echo 'nope';
    }
} else {
    echo 'id';
}