کسی نیست کمک کنه !؟
کسی نیست کمک کنه !؟
سلام،
چرا از فرم های تماس باما آماده استفاده نمی کنید؟
مثل:
فرم ارتباط با ما html5 فارسی | مرجع اسكريپت و ابزار وبمسترها >Deviran دویران<
افزونه فرم تماس با ما ایجکس برای وردپرس | پرشین اسکریپت-پایگاه تخصصی اسکریپت
فرم تماس با ما html | ایکس اسکریپت
فرم ارتباط با ما به صورت HTML و جی کوئری | میهن گراف
و ...
البته مطمئن بشید سرور ارسال ایمیل رو نبسته باشه.
همیشه زیبایی خوب نیست، اما خوب بودن همیشه زیباست...
ممنون
5 تومن حاضرم بدم ولی بیشتر نه
عزيز بيا اينم فرمي كه دادي , كد پي اچ پي گذاشتم داخلش.
5 تومن هم بزار جيب خودت
توضيح :
در سطر 7 ايميل خودتان بزاريد.
کد PHP:
<?php
session_start();
if(isset($_POST['submit'])) {
if(!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['username']) && !empty($_POST['service']) && !empty($_POST['mobail']) && !empty($_POST['subject']) && !empty($_POST['amount']) && !empty($_POST['bank']) && !empty($_POST['fish']) && !empty($_POST['onvan']) && !empty($_POST['message'])) {
// send email
$accept = "پیغام شما با موفقیت ارسال شد. با تشکر";
$to = "test@yahoo.com";
$name = $_POST['name'];
$from = $_POST['email'];
$username = $_POST['username'];
$service = $_POST['service'];
$mobail = $_POST['mobail'];
$subject = $_POST['subject'];
$amount = $_POST['amount'];
$bank = $_POST['bank'];
$fish = $_POST['fish'];
$onvan = $_POST['onvan'];
$user_message = $_POST['message'];
$body = "<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">نام و نام خانوادگي : $name</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">يوزر نيم خريداري شده : $username</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">سرويس شما : $subject</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">ایمیل: $from</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">شماره تماس : $mobail</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">ميزان اشتراک : $service</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">مبلغ واریزی: $amount تومان</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">نام بانک : $bank</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">شماره فيش , پيگيري, سند : $fish</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">عنوان پيغام: $onvan</font></div><br>".
"<div align=\"right\" style=\"direction: rtl\"><font size=\"2\" face=\"Tahoma\">پيغام : $user_message</font></div><br>";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= "From: $from \r\n";
$headers .= "Reply-To: $from \r\n";
mail($to, $subject, $body, $headers);
} else {
$error = "لطفا تمامی فیلد ها را تکمیل نمایید.";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ارسال ايميل</title>
<style>
.tbl {
border-radius: 5px 5px 5px 5px;
direction: rtl;
font-family: Tahoma;
font-size: 12px;
padding:10px 0;
}
table {
border: 1px solid black;
}
.right {
background-color: #F2F8FF;
color: #003D59;
font-size: 12px;
line-height: 25px;
width: 150px;
}
input, select, option, textarea {
font-family: Tahoma;
font-size: 11px;
}
#sent {
background-color: #EEFBEE;
border: 1px dashed green;
border-radius: 5px 5px 5px 5px;
box-shadow: -10px -10px 0 yellow;
display: block;
font-family: Tahoma;
font-size: 12px;
margin: 20px auto;
padding: 10px;
text-align: center;
width: 580px;
}
#err{
display:block;
background-color:#FFF8F4;
border:1px maroon dashed;
font-family:Tahoma;
width:580px;
margin:20px auto 20px auto;
font-size:12px;
text-align:center;
padding:10px;
}
.error {
background: none repeat scroll 0 0 #F2F8FF;
border: 1px solid;
border-radius: 5px 5px 5px 5px;
direction: rtl;
font-family: tahoma;
font-size: 12px;
margin: 10px auto;
padding: 10px;
text-align: center;
width: 580px;
}
.ok {
background: none repeat scroll 0 0 #F2F8FF;
border: 1px solid;
border-radius: 5px 5px 5px 5px;
direction: rtl;
font-family: tahoma;
font-size: 12px;
margin: 10px auto;
padding: 10px;
text-align: center;
width: 580px;
}
</style>
</head>
<body>
<?php if(!empty($error)) echo '<div class="error">'.$error.'</div>'; ?>
<?php if(!empty($accept)) echo '<div class="ok">'.$accept.'</div>'; ?>
<form action="" method="post">
<table width="600" align="center" class="tbl" >
<tr>
<td class="right">نام و نام خانوادگي :</td>
<td class="left"><input type="text" id="name" name="name"/></td>
</tr>
<tr>
<td class="right">يوزر نيم خريداري شده : </td>
<td class="left"><input type="text" id="username" name="username"/></td>
</tr>
<tr>
<td class="right">سرويس شما : </td>
<td class="left">
<select id="subject" name="subject">
<option>HTTPS+***</option>
<option>***</option>
<option>HTTPS+*** دو كاربره</option>
</select>
</td>
</tr>
<tr>
<td class="right">ايميل: </td>
<td class="left"><input type="text" id="email" name="email"/></td>
</tr>
<tr>
<td class="right">شماره تماس : </td>
<td class="left"><input type="text" id="mobail" name="mobail"/></td>
</tr>
<tr>
<td class="right">ميزان اشتراک :</td>
<td class="left">
<select id="service" name="service">
<option>يک ماهه</option>
<option>دو ماهه</option>
<option>سه ماهه</option>
<option>شش ماهه</option>
</select>
</td>
</tr>
<tr>
<td class="right">مبلغ واريزي :</td>
<td class="left"><input type="text" id="amount" name="amount"/> تومان</td>
</tr>
<tr>
<td class="right">نام بانک :</td>
<td class="left">
<select id="bank" name="bank">
<option>ملت</option>
<option>ملي</option>
</select>
</td>
</tr>
<tr>
<td class="right">شماره فيش / پيگيري/ سند :</td>
<td class="left"><input type="text" id="fish" name="fish"/></td>
</tr>
<tr>
<td class="right">عنوان پيغام:</td>
<td class="left"><input type="text" id="onvan" name="onvan"/></td>
</tr>
<tr>
<td class="right" style="width: 150px" valign="top">پيغام :</td>
<td class="left">
<textarea id="message" name="message" style="width: 254px; height: 117px"></textarea></td>
</tr>
<tr>
<td class="right" style="width: 150px" valign="top"></td>
<td class="left"><input type="submit" name="submit" value="ارسال فرم" /><input type="reset" value="نگارش از نو" /></td>
</tr>
</table>
</form>
</body>
</html>
خدا خیرت بده خیلی لطف کردی
![]()
سلام به همه
من یه فرم رو نمیدونم از کدوم سایت یا کدوم یکی از دوستان گرفتم
الان خود فرم رو مشکلی باهاش ندارم
زیاد هم سرم نمیشه ! یعنی میدونین چیه ؟ تو هر مطلبی یه جوری توضیح داده بودکه گیجم میکنه .
من جسارتا! کد فرم اصلی رو میزارم هرکدوم از دوستان که میتونه منو کمک کنه . میخوام وقتی ارسال رو میزنم بره مثلاً به ایمیل rayasabt@yahoo.com
خیلی ممنونم از لطف همتون
<!doctype html>
<html lang="en">
<head>
<title>فرم سفارش خدمات</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<!-- Load the jQuery library and the full jQuery Tools library -->
<!-- http://flowplayer.org/tools/download/index.html -->
<script src="http://cdn.jquerytools.org/1.2.4/full/jquery.tools.min.js"></script>
<!-- Add the dateinput and validator tools to the form (except for iOS devices) -->
<script>
$( function() {
if( !navigator.userAgent.match( /(iPhone|iPod|iPad)/i ) ) {
$("#expiryDate").dateinput( { format: 'yyyy-mm' } );
$("#orderForm").validator();
}
} );
</script>
<!-- For styling the dateinput field and calendar -->
<link rel="stylesheet" type="text/css" href="http://flowplayer.org/tools/demos/dateinput/css/skin1.css" />
<style>
/* Add some margin to the page and set a default font */
body {
margin: 30px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
/* Style the form with a coloured background (and a gradient for Gecko/WebKit browsers), along with curved corners and a drop shadow */
form {
width: 35em;
margin: 0 auto;
padding: 50px 60px;
overflow: auto;
color: #3e4a49;
background-color: #f5eedb;
background: -webkit-gradient( linear, left bottom, left top, color-stop(0,#f5eedb), color-stop(1, #faf8f1) );
background: -moz-linear-gradient( center bottom, #f5eedb 0%, #faf8f1 100% );
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
-moz-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
-webkit-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
}
/* Give form elements consistent margin, padding and line height */
form ul {
list-style: none;
margin: 0;
padding: 0;
}
form ul li {
margin: .9em 0 0 0;
padding: 0;
}
form * {
line-height: 1em;
}
/* Form heading */
form h1 {
margin: 0 0 1.5em 0;
padding: 0;
text-align: center;
}
/* Give each fieldset a darker background, dark curved border and plenty of space */
fieldset {
padding: 0 20px 20px;
margin: 0 0 30px;
border: 2px solid #593131;
background: #eae1c0;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
/* Give each fieldset legend a nice curvy green box with white text */
legend {
color: #fff;
background: #8fb98b;
font-family: Arial, Helvetica, sans-serif;
font-size: 0.9em;
font-weight: bold;
text-align: center;
padding: 5px;
margin: 0;
width: 9em;
border: 2px solid #593131;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
/* The field labels */
label {
display: block;
float: left;
clear: left;
text-align: right;
width: 40%;
padding: .4em 0 0 0;
margin: .15em .5em 0 0;
}
/* Style the fields */
input, select, textarea {
display: block;
margin: 0;
padding: .4em;
width: 50%;
}
input, textarea, .date {
border: 2px solid #eae1c0;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: rgba(0,0,0,.5) 1px 1px 1px 1px inset;
-moz-box-shadow: rgba(0,0,0,.5) 1px 1px 1px 1px inset;
-webkit-box-shadow: rgba(0,0,0,.5) 1px 1px 1px 1px inset;
background: #fff;
}
input {
font-size: .9em;
}
select {
padding: 0;
margin-bottom: 2.5em;
position: relative;
top: .7em;
}
textarea {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: .9em;
height: 5em;
}
/* Place a border around focused fields, and hide the inner shadow */
form *:focus {
border: 2px solid #593131;
outline: none;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
font-family: "0 Arabic Style", "0 Aria", "0 Arshia", "0 Aseman", "0 Aseman Italic", "0 Badr", "0 Badr Bold", "0 Baran", "0 Baran Italic";
}
/* Display correctly filled-in fields with a green background */
input:valid, textarea:valid {
background: #efe;
}
/* Submit button */
input[type="submit"] {
margin: 50px auto 0 auto;
width: 12em;
padding: 10px;
border: 2px solid #593131;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
-moz-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
-webkit-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
color: #fff;
background: #593131;
font-size: 1.2em;
font-weight: bold;
-webkit-appearance: none;
}
input[type="submit"]:hover, input[type="submit"]:active {
cursor: pointer;
background: #fff;
color: #593131;
}
input[type="submit"]:active {
background: #eee;
box-shadow: 0 0 .5em rgba(0, 0, 0, .8) inset;
-moz-box-shadow: 0 0 .5em rgba(0, 0, 0, .8) inset;
-webkit-box-shadow: 0 0 .5em rgba(0, 0, 0, .8) inset;
}
/* Header/footer boxes */
.wideBox {
clear: both;
text-align: center;
margin: 70px;
padding: 10px;
background: #ebedf2;
border: 1px solid #333;
line-height: 80%;
}
.wideBox h1 {
font-weight: bold;
margin: 20px;
color: #666;
font-size: 1.5cm;
font-family: "0 Arabic Style", "0 Aria", "0 Arshia", "0 Aseman", "0 Aseman Italic", "0 Badr", "0 Badr Bold", "0 Baran", "0 Baran Italic";
}
/* Validator error boxes */
.error {
background-color: #fffe36;
border: 1px solid #e1e16d;
font-size: .8em;
color: #000;
padding: .3em;
margin-left: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
-moz-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
-webkit-box-shadow: 0 0 .5em rgba(0, 0, 0, .8);
}
</style>
<!--[if IE]>
<style>
/* Work around IE fieldset background bleed bug */
fieldset {
background: transparent;
}
</style>
<![endif]-->
<!--[if IE 7]>
<style>
/* Work around broken IE7 box model */
form ul li {
margin: 0;
}
label {
padding-top: 1.3em;
}
</style>
<![endif]-->
</head>
<body>
<div class="wideBox">
<h1>تماس با ما</h1>
</div>
<form id="orderForm" action="" method="get">
<h1>فرم سفارش خدمات</h1>
<fieldset>
<legend>مشخصات کلی</legend>
<ul>
<li>
<label for="emailAddress">آدرس ایمیل</label>
<input type="email" name="emailAddress" id="emailAddress" placeholder="مثال:raya.sabt@yahoo.com" required autofocus maxlength="50" />
</li>
<li>
<label for="website">آدرس سایت</label>
<input type="url" name="website" id="website" placeholder="http://www.rayasabt.ir/" required maxlength="100" />
</li>
<li>
<label for="numLicenses">کد تخفیف</label>
<input type="url" name="website2" id="website2" placeholder="لطفاً کد تخفیف خود را وارد نمایید/" required maxlength="100" />
</li>
</ul>
</fieldset>
<fieldset>
<legend>مشخصات سفارش دهنده</legend>
<ul>
<li>
<label for="billingName">نام و نام خانوادگی </label>
<input type="text" name="billingName" id="billingName" placeholder="نام و نام خانوادگی خود را قید فرمایید" required maxlength="50" />
</li>
<li>
<label for="billingAddress">آدرس پستی</label>
<textarea name="billingAddress" id="billingAddress" placeholder="لطفاً آدرس دقیق خود را درج نمایید" required maxlength="150"></textarea>
</li>
<li></li>
<li>
<label for="billingCountry">شهر</label>
<select name="billingCountry" id="billingCountry"><option>تهران</option><option>اصفهان</option><option>شیراز</option><option>تبریز</option><option>قم</option></select>
</li>
<li>
<label for="phone">تلفن</label>
<input type="tel" name="phone" id="phone" placeholder="مثال:22896166" maxlength="20" />
</li>
</ul>
</fieldset>
<fieldset>
<legend>گزینه های قرارداد</legend>
<ul>
<li>
<label for="cardNumber">شرح کلی سفارش</label>
<input type="text" name="orders" id="orders" placeholder="کلیه خدمات مورد نیاز خود را در این قسمت درج فرمایید" required maxlength="5000" pattern="[\d\ ]{12,}" />
</li>
<li>
<label for="cvvCode">مبلغ واریزی</label>
<input type="text" name="cardNumber2" id="cardNumber2" placeholder="مبلغ واریز شده را در این قسمت وارد نمایید" required maxlength="5000" pattern="[\d\ ]{12,}" />
</li>
<li>
<label for="expiryDate">نام مشاور</label>
<select name="billingCountry2" id="billingCountry2">
<option>خانم پارسا</option>
<option>خانم خوانساری</option>
<option>خانم تهرانی</option>
<option>خانم سامان</option>
<option>خانم مقدم</option>
</select>
</li>
</ul>
</fieldset>
<input type="submit" name="placeOrder" value="ارسال سفارش" />
</form>
</body>
</html>
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)