jalaladdin
Active Member
برای فرم تماس با ما از کدcaptcha استفاده کردم اما تصویر امنیتی نشان داده نمیشود به نظر شما مشکل از کجا میتونه باشد
برای فرم تماس با ما از کدcaptcha استفاده کردم اما تصویر امنیتی نشان داده نمیشود به نظر شما مشکل از کجا میتونه باشد
<form action="<?php $_SERVER['PHP_SELF']?>" name="contact" method="post" class=" dir "name="signup" id="signup" >
<center><table summary="Demonstration form">
<tbody>
<tr>
<td><label for="name">نام :</label></td>
<td><input name="name" size="35" maxlength="50" type="text" ></td>
</tr>
<tr>
<td><label for="email">ایمیل:</label></td>
<td><input name="email" size="35" maxlength="25" type="text"></td>
</tr>
<tr>
<td><label for="title">عنوان:</label></td>
<td><input name="title" size="35" maxlength="25" type="text"></td>
</tr>
<tr>
<td><label for="message">پیام:</label></td>
<td><textarea style="width:250px;height:120px" name="message" type="text"rows="5" cols"100" maxlength="2000"></textarea></td>
</tr>
<tr>
<td><label for="user_code">تصویر امنیتی:</label></td>
<td><input name="user_code" size="20" type="text"><img src="visual-captcha.php" width="200" height="60" alt="Visual CAPTCHA" /></td>
</tr>
<tr>
<td> </td>
<td><input name="Submit" value="ارسال" type="submit" class="button" ></td>
<td><input type="reset" value="پاک کردن" name="B2" class="button"> </td>
</tr>
</tbody>
</table></center>
</form>
<?php
$to="[email protected]";
$subject=$_POST['subject'];
$from=$_POST['mail'];
$message=$_POST['message'];
// Additional headers
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'To: '.$to . "\r\n";
$headers .= 'From: '.$from . "\r\n";
$headers .= 'Reply-To: '.$to . "\r\n";
// Mail it
$sendmail=mail($to, $subject, $message, $headers);
if ($sendmail)
echo "پیغام شما با موفقیت ارسال شد";//Sucess Message
else
echo "خطا در ارسال متن";//Failed Message
?>
<br/>
<?php
require('php-captcha.inc.php');
if (PhpCaptcha::Validate($_POST['user_code'])) {
echo 'Valid code entered';
} else {
echo 'Invalid code entered';
}
?>
<html>
<body>
<form action="" method="post">
<img src="visual-captcha.php" width="200" height="60" alt="Visual CAPTCHA" />
<br/>Security Code:
<input id="user_code" name="user_code" type="text" />
<input type="submit" name="send" value="send captcha" />
</form>
<?php
require('php-captcha.inc.php');
if ( PhpCaptcha::Validate($_POST['user_code']) ) {
echo 'Valid code entered';
} else {
echo 'Invalid code entered';
}
?>
</body>
</html>
img src="visual-captcha.php" width="200" height="60" alt="Visual CAPTCHA" /><a onClick="reload(); return false;" href="">ریست کد</a>