Jump to content

How to remove the verification code here


getyourkarthick

Recommended Posts

How to remove the verification code here,i mean the captcha...

 

<?php

session_start();

if ($_POST['Submit'] == 'Send')

{

if (strcmp(md5($_POST['user_code']),$_SESSION['ckey']))

{ 

header("Location: sendmail.php?msg=ERROR: Invalid Verification Code");

exit();

  } 



$to = $_POST['toemail'];

$subject = $_POST['subject'];

$message = $_POST['message'];

$fromemail = $_POST['fromemail'];

$fromname = $_POST['fromname'];

$lt= '<';

$gt= '>';

$sp= ' ';

$from= 'From:';

$headers = $from.$fromname.$sp.$lt.$fromemail.$gt;

mail($to,$subject,$message,$headers);

header("Location: sendmail.php?msg= Mail Sent!");

exit();

}

?>

<html>

<head>

<title>Email </title>

</head>

<body bgcolor="#ffffcc">

<h2 align="center">

Email
</h2>

<h3 align="center">

Please do not misuse this script.
</h3><br>

<p style="margin-left:15px">

<form action="sendmail.php" method="POST">

<b>From Name:</b><br>

<input type="text" name="fromname" size="50"><br>

<br><b>From Email:</b><br>

<input type="text" name="fromemail" size="50"><br>

<br><b>To Email:</b><br>

<input type="text" name="toemail" size="50"><br>

<br><b>Subject:</b><br>

<input type="text" name="subject" size="74"><br>

<br><b>Your Message:</b><br>

<textarea name="message" rows="5" cols="50">

</textarea><br>

<br><b>Verification Code:</b><br>

<input name="user_code" type="text" size="25">  

<img src="pngimg.php" align="middle"><br><br>

<input type="submit" name="Submit" value="Send">

<input type="reset" value="Reset">

</form>

</p>

<?php if (isset($_GET['msg'])) { echo "<font color=\"red\"><h3 align=\"center\"> $_GET[msg] </h3></font>"; } ?>

</body>

</html>

 

Link to comment
Share on other sites

This should do, but had to take out the IF statement so all emails should send without warning.

 

<?php

session_start();

if ($_POST['Submit'] == 'Send')

{


$to = $_POST['toemail'];

$subject = $_POST['subject'];

$message = $_POST['message'];

$fromemail = $_POST['fromemail'];

$fromname = $_POST['fromname'];

$lt= '<';

$gt= '>';

$sp= ' ';

$from= 'From:';

$headers = $from.$fromname.$sp.$lt.$fromemail.$gt;

mail($to,$subject,$message,$headers);

header("Location: sendmail.php?msg= Mail Sent!");

exit();

}

?>

<html>

<head>

<title>Email </title>

</head>

<body bgcolor="#ffffcc">

<h2 align="center">

Email
</h2>

<h3 align="center">

Please do not misuse this script.
</h3><br>

<p style="margin-left:15px">

<form action="sendmail.php" method="POST">

<b>From Name:</b><br>

<input type="text" name="fromname" size="50"><br>

<br><b>From Email:</b><br>

<input type="text" name="fromemail" size="50"><br>

<br><b>To Email:</b><br>

<input type="text" name="toemail" size="50"><br>

<br><b>Subject:</b><br>

<input type="text" name="subject" size="74"><br>

<br><b>Your Message:</b><br>

<textarea name="message" rows="5" cols="50">

</textarea><br>

<input type="submit" name="Submit" value="Send">

<input type="reset" value="Reset">

</form>

</p>

<?php if (isset($_GET['msg'])) { echo "<font color=\"red\"><h3 align=\"center\"> $_GET[msg] </h3></font>"; } ?>

</body>

</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.