Jump to content

what`s meaning this error


sonita

Recommended Posts

i download code for php contact form with captcha , ii exe but with this errorerror is :SCREAM:Error suppression innored for -Notic: use of undefined constant E_NONE -assumed 'E_NONE' in .... line11 what`s meaning above error? how do i? why showing this error?this code is my contact form code:

<html><head><meta charset="utf8"/><title></title><link rel="stylesheet" type="text/css" href="style.css"/></head><body><?phpsession_start();ob_start();ini_set('error_reporting', E_NONE);$php_self = $_SERVER['PHP_SELF'];// on submitif( isset($_POST[name]) && isset($_POST[email]) && isset($_POST[message]) && isset($_POST[captcha]) ){    $name = $_POST[name];    $email = $_POST[email];    $message = $_POST[message];    $captcha = $_POST[captcha];	    $error = 0;    // name    if( $name == "" ){ $error ++; $error_name = "class='error'"; }    // email    if( $email == "" ){ $error ++; $error_email = "class='error'"; }    // message    if( $message == "" ){ $error ++; $error_message = "class='error'"; }    // captcha    if( $captcha == "" || $captcha != $_SESSION[captcha]){ $error ++; $error_captcha = "class='error'"; }    // no error, send email    if( $error == 0){			 							    // your email address	    $address = "your-email-address@domain.com";			    // email subject	    $subject = "New message";	    // email content	    $content = "<strong>Name:</strong><br/>$name<br/><strong>Email address:</strong><br/><strong>Message:</strong><br/>$email<br/>$message";	    // html email	    $email_content = "<!doctype html><head><meta charset='utf-8'><title>".$subject."</title>";	    $email_content .= "</head><body>";	    $email_content .= $content;	    $email_content .= "</body></html>";				   					    // headers for html email	    $headers  = 'MIME-Version: 1.0' . "/r/n";	    $headers .= 'Content-type: text/html; charset=utf-8' . "/r/n";	    $headers .= "From: 1stWebMagazine.com <web@1stwebmagazine.com>" . "/r/n";	    // send email	    mail($address, $subject, $email_content, $headers);	   			    // reset variables	    $name = ""; $email = ""; $message = "";	    $mail_sent = 1;														       }}// captcha$num = rand(1, 20);$num2 = rand(1, 9);   $verif = $num . "+" . $num2;$_SESSION[captcha] = $num + $num2;	if( $mail_sent == 1 ){    echo "<h1>Thank you for your message! We'll be in touch soon.</h1>";} else {    echo "    <form action='".$php_self."' method='post'>    <p><strong>Name:</strong> <span class='required'>*</span></p>    <input type='text' ".$error_name." name='name' value='".$name."'>    <p><strong>Email address:</strong> <span class='required'>*</span></p>    <input type='email' ".$error_email." name='email' value='".$email."'>    <p><strong>Message:</strong> <span class='required'>*</span></p>    <textarea ".$error_message." name='message'>".$message."</textarea>    <p><strong>How much is ".$verif."?</strong> <span class='required'>*</span></p>		      <input type='text' ".$error_captcha." name='captcha' value=''><br/>    <button>Send</button>    </form>";}ob_end_flush();?></body></html>

please help me. thanks

Link to comment
Share on other sites

Now what do I do to run the code without error؟how i do?Should I remove it? If I delete what I write instead?please help me

Link to comment
Share on other sites

If you're trying to turn off all error reporting (which I don't know why you would want to do that), then instead of the line where you set error_reporting, instead set display_errors to 0. But again, I don't know why you would want to hide error messages.

Link to comment
Share on other sites

i can't put attch file and image`s my contact page in my web, beacase I have enough space to put the pictures uploaded here, I do not.See you and you understand why i turn off all reporting .please give me the your`s email address ,and i send for you,and see you,then see you, you answare me. & help me? can you give me your`s email please? i wait....

Link to comment
Share on other sites

I don't give out my email address here, you can send me a PM if you want to. I don't see a reason to turn off error reporting though, if there are errors happening then you should fix them instead of hide them. But if you do want to turn off error reporting, then you need to set display_errors like I said.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...