مگه میشه سایت php قبول نکنه؟
در ضمن شما نیاز به یک فرم html برای ثبت مطالب توسط کاربر دارید
---------- Post added at 09:07 PM ---------- Previous post was at 08:56 PM ----------
البته اگر با کدهای html و php آشنایی ندارید می تونید از فرم آماده زیر استفاده کنید
برای اینکار کافیه کد زیر رو تو هرجای سایتتون که دوست دارید قرار بدبد
یک تصویر آونجا ظاهر خواهد شد که با کلیک بر روی اون کاربر به فرم تماس هدایت میشه
پیش نمایش
این هم کد
البته لازم هست که به جای test@yahoo.com ایمیل خودتون رو بنویسید تا پیامها براتون ارسال بشن
کد HTML:
<a href="http://www.blogskin.ir/tools/email/?email=test@yahoo.com" target="_blank">
<img border=0 src="http://1abzar.ir/abzar/tools/contact-form/c1.png" alt="تماس با ما"></a>
---------- Post added at 09:33 PM ---------- Previous post was at 09:07 PM ----------
این هم یک کد دیگه
باید اون رو تو یک فایل html ذخیره کنید و به عنوان یک صفحه مستقل ازون استفاده کنید
در اینجاهم بجای mail@yahoo.com ایمیل خودتون رو قرار بدید
کد:
<html dir="rtl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>فرم تماس با ما</title>
</head>
<body bgcolor="#99FFCC">
<!-- Start Code ParsTools.com Contact Form-->
<script type="text/javascript">
var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}
function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}
function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</b> کاراکتر'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true);
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true);
}
}
</script>
<SCRIPT language="JavaScript">
function CheckFormParstools () {
//Initialise variables
var errorMsg = "";
//Check for a name
if (document.Contactform.Name.value == ""){
errorMsg += "\n\n\t\t\t !نام شما وارد نشده است ";
}
//Check for an e-mail address and that it is valid
if ((document.Contactform.Email.value == "") || (document.Contactform.Email.value.length > 0 && (document.Contactform.Email.value.indexOf("@",0) == - 1 || document.Contactform.Email.value.indexOf(".",0) == - 1))) {
errorMsg += "\n\n\t !آدرس ایمیل شما بطور صحیح وارد نشده است ";
}
//Check for an enquiry
if (document.Contactform.Message.value == "") {
errorMsg += "\n\n\t\t !پیام شما وارد نشده است ";
}
//If there is aproblem with the form then display an error
if (errorMsg != ""){
msg = "\t\t : لطفا فرم ارسال را بطور کامل پر نمایید\n";
msg += "___________________________________________________";
errorMsg += alert(msg + errorMsg + "\n___________________________________________________\n\n");
return false;
}
return true;
}
// -->
</script>
<p align="center"> </p>
<p align="center"><b><font face="Tahoma" size="2" color="#FF0000">فرم تماس با ما</font></b></p>
<p align="center"><b><font face="Tahoma" size="2" color="#FF0000">پر کردن خانه
های ستاره دار الزامی است</font></b></p>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type="text/css">
.text {
font-family: Tahoma;
font-size: 9pt; color:#000000
}
.form {
font-family: Tahoma;
font-size: 9pt;
color: #333333;
border: 1px solid #808080; ; background-color:#FFFFFF
}
.button {
font-family: Tahoma;
font-size: xx-small;
color: #000000;
font-weight: bold;
border: 1px solid #808080; ; background-color:#EEEEEE
}
</STYLE>
<div align="center">
<table border="0" class="text" cellpadding="3" style="border-collapse: collapse" width="541" id="1" dir="rtl">
<tr>
<form name="Contactform" method="post" target=_self action="http://www.parstools.com/sendform/default.asp" onSubmit="return CheckFormParstools();">
</td>
</tr>
<tr>
<td align=right bgcolor="#EEEEEE"> * نام :
</td>
<td align=right bgcolor="#EEEEEE">
<INPUT size=40 name=Name class="form" maxlength="100">
</td>
</tr>
<tr>
<td align=right bgcolor="#EEEEEE"> تلفن همراه :
</td>
<td align=right bgcolor="#EEEEEE">
<INPUT size=40 name=Website class="form" maxlength="100" dir="ltr"></td>
</tr>
<tr>
<td align=right bgcolor="#EEEEEE"> * پست الکترونیک:
</td>
<td align=right bgcolor="#EEEEEE">
<INPUT size=40 name=Email class="form" maxlength="60" dir="ltr">
</td>
</tr>
<tr>
<td align=right height=33 bgcolor="#EEEEEE"> نحوه تماس با شما:
</td>
<td align=right bgcolor="#EEEEEE" >
<INPUT name=HowCon type=radio value="از طریق تلفن" >
پیامک
<INPUT name=HowCon type=radio value="از طریق ایمیل" >
پست الکترونیک</td>
</tr>
<tr>
<td align=right bgcolor="#EEEEEE"> نحوه آشنایی شما با ما :
</td>
<td align=right bgcolor="#EEEEEE">
<select size="1" name=HowFind class="form">
<option value="انتخاب کنید">
انتخاب کنید </option>
<option value="موتورهاي جستجو">
موتورهای جستجو </option>
<option value="سايتهاي ديگر">
سایتهای دیگر </option>
<option value="معرفي دوستان">
معرفی دوستان </option>
<option value="پيامک"> تبلیغات و پیامک </option>
<option value="ديگر"> دیگر </option>
</select>
</td>
</tr>
<tr>
<td align=right bgcolor="#EEEEEE"> موضوع پیام:
</td>
<td align=right bgcolor="#EEEEEE">
<INPUT size=40 name=Subject class="form" maxlength="50" dir="rtl">
</td>
</tr>
<tr>
<td valign=top align=right bgcolor="#EEEEEE"> *پیام:
</td>
<td align=right bgcolor="#EEEEEE">
<TEXTAREA name=Message rows="15" cols="68" class="form" ></TEXTAREA>
</td>
</tr>
<tr>
<td align=right height="25" colspan="2" bgcolor="#EEEEEE">
<p align="center">
<INPUT type="reset" value="پاک کردن فرم" name="Reset" class="button">
<INPUT type=submit value="ارسال" name="Submit" class="button">
<INPUT type="hidden" name="PB_SENDFORM" value="SEND">
<INPUT type="hidden" name="User" value="farshed">
<INPUT type="hidden" name="To" value="mail@yahoo.com">
<p align="center">
</tr>
</table>
</form>
</div>
<!-- End Code ParsTools.com Contact Form-->
</body>
</html>
البته ناگفته نومونه که این دوتا کد تحت سایتهای دیگه کار می کنن و مستقل نیستن
و در واقع سرویسشونو از جای دیگه ای می گیرن و اگر سایت میزبان روزی مشکل پیدا کنه و یا نخواد سرویس بده فرم شما با مشکل بر می خوره
اگر تمایل داشتید یک فرم اختصاصی در سایتتون داشته باشید با پرداخت هزینه قابل نوشتن هست