الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

طريقة إرسال بيانات إلى ايميل - لغة php

بدأه Hanno Ahmed في 23 مايو 2012 · 3 رد · 529 مشاهدة · في منتدى تطوير المواقع بـ PHP
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

إخواني المبرمجين

أنا خلصت برمجة موقعي

ورفعته تجريبيا على سيرفر مجاني

لكن مشكلتي ما ضبطت معي ارسال بيانات الطالب إلى الإيميل و لا أعلم هل أضع إيميل Hotmail أو يجب أن يكون ايميل خاص بالموقع

أتمنى من المبرمجين يتأكدون لي من الكود!؟؟

وشكراَ لكم

<?

include ("top.php");

start_block("تسجيل الطلاب المبدئي");

if ($_POST['submit'])

{

$std_name = $_POST['std_name'];

$std_reg = $_POST['std_reg'];

$std_status = $_POST['std_status'];

$std_status_txt = $_POST['std_status_txt'];

$std_nation = $_POST['std_nation'];

$std_nation_txt = $_POST['std_nation_txt'];

$std_bday = $_POST['std_bday'];

$std_fath = $_POST['std_fath'];

$std_fath_job = $_POST['std_fath_job'];

$std_fath_relation = $_POST['std_fath_relation'];

$std_fath_job_place = $_POST['std_fath_job_place'];

$std_mobile = $_POST['std_mobile'];

$std_passport = "http://" . $_SERVER['SERVER_NAME'] ."/std_data/" . $_POST['std_passport'];

$std_birthcert = "http://" . $_SERVER['SERVER_NAME'] ."/std_data/" . $_POST['std_birthcert'];

$std_home_bills = "http://" . $_SERVER['SERVER_NAME'] ."/std_data/" . $_POST['std_home_bills'];

$std_mobile = $_POST['std_mobile'];

$mail_txt = <<<END

الاسم : $std_name

الجنسية : $std_nation -- $std_nation_txt

تاريخ الميلاد : $std_bday

اسم ولي الامر : $std_fath

عمل ولي الامر : $std_name

قرابة ولي الامر : $std_fath_relation

مقر عمل ولي الامر : $std_fath_job_place

دفتر العائلة او الجواز : $std_passport

شهادة الميلاد : $std_birthcert

صك المنزل او الفاتورة : $std_home_bills

رقم الجوال : $std_mobile

مدى انتظام الطالب : $std_reg

وضع الطالب الدراسي : $std_status -- $std_nation_txt

END;

$mail_txt = "تسجيل طالب جديد";

if (strlen($std_name) < 5){$error .="تأكد من مدخلات اسم الطالب - 5 احرف و أكثر<br />";}

if (strlen($std_bday) < 5){$error .="تأكد من مدخلات تاريخ الميلاد<br />";}

if (strlen($std_fath) < 5){$error .="تأكد من مدخلات اسم ولي الامر - 5 احرف و أكثر<br />";}

if (strlen($std_fath_job) < 5){$error .="تأكد من مدخلات وظيفة ولي الامر - 5 احرف و أكثر<br />";}

if (strlen($std_fath_relation) < 5){$error .="تأكد من مدخلات صلة قرابة ولي الامر - 5 احرف و أكثر<br />";}

if (strlen($std_fath_job_place) < 5){$error .="تأكد من مدخلات مقر عمل ولي الامر - 5 احرف و أكثر<br />";}

if (strlen($std_passport) < 1){$error .="تأكد من ارفاق الجواز او دفتر العائلة<br />";}

if (strlen($std_birthcert) < 1){$error .="تأكد من ارفاق شهادة الميلاد<br />";}

if (strlen($std_home_bills) < 1){$error .="تأكد من ارفاق فاتورة او صك للمنزل<br />";}

if (strlen($std_mobile) <9){$error .="تأكد من مدخلات رقم الجوال<br />";}

if (strlen($error) == 0)

{

if (send_mail('YOUR EMAIL',$mail_txt,$mail_txt))

$msg = "تم الارسال بنجاح";

else

$msg = "لقد فشل الارسال .. يرجى المحاولة مرة اخرى";

}else{

$er_show =1;

}

}

?>

<form name="std_sign" method="post" action="">

<table width="95%" border="0" cellspacing="0" cellpadding="1" align="center">

<?

if (strlen($er_show) == 1)

{

echo '<tr><td colspan="2"><font color="red">' . $error . '</font></td></tr>';

}

?>

<tr>

<td align="right" width="25%">اسم الطالب</td>

<td align="right" width="75%"><input name="std_name" value="<?=$_POST['std_name']?>" type="text" class="login_input" id="std_name" /></td>

</tr>

<tr>

<td align="right">مدى انتظام الطالب</td>

<td align="right">

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><input type="radio" name="std_reg" id="std_reg" value="منتظم" checked="checked" />منتظم</td>

<td><input type="radio" name="std_reg" id="std_reg" value="منتسب" />منتسب</td>

<td><input type="radio" name="std_reg" id="std_reg" value="منازل" />منازل</td>

<td><input type="radio" name="std_reg" id="std_reg" value="منقطع واعيد قيده" />منقطع واعيد قيده</td>

</tr>

</table>

</td>

</tr>

<tr>

<td align="right">وضع الطالب الدراسي بالفصل</td>

<td align="right">

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><input type="radio" name="std_status" id="std_status" value="مرفع" checked="checked" />مرفع</td>

<td><input type="radio" name="std_status" id="std_status" value="باقي للإعادة" />باقي للإعادة</td>

<td>مدة بقائة <input type="text" value="<?=$_POST['std_status_txt']?>" name="std_status_txt" class="login_input" style="width:30px;" /> سنة</td>

</tr>

</table> </td>

</tr>

<tr>

<td align="right">الجنسية</td>

<td align="right">

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><input type="radio" name="std_nation" id="std_nation" value="1" checked="checked" />سعودي</td>

<td><input type="radio" name="std_nation" id="std_nation" value="2" />غير ذلك</td>

<td>من فضلك حدد الجنسية <input type="text" value="<?=$_POST['std_nation_txt']?>" class="login_input" name="std_nation_txt" style="width:70px;" /></td>

</tr>

</table> </td>

</tr>

<tr>

<td align="right">تاريخ الميلاد</td>

<td align="right"><input name="std_bday" value="<?=$_POST['std_bday']?>" type="text" class="login_input" id="std_bday" /></td>

</tr>

<tr>

<td align="right">اسم ولي الامر</td>

<td align="right"><input name="std_fath" value="<?=$_POST['std_fath']?>" type="text" class="login_input" id="std_fath" /></td>

</tr>

<tr>

<td align="right">عمل ولي الامر</td>

<td align="right"><input name="std_fath_job" value="<?=$_POST['std_fath_job']?>" type="text" class="login_input" id="std_fath_job" /></td>

</tr>

<tr>

<td align="right">قرابة ولي الامر</td>

<td align="right"><input name="std_fath_relation" value="<?=$_POST['std_fath_relation']?>" type="text" class="login_input" id="std_fath_relation" /></td>

</tr>

<tr>

<td align="right">مقر عمل ولي الامر</td>

<td align="right"><input name="std_fath_job_place" value="<?=$_POST['std_fath_job_place']?>" type="text" class="login_input" id="std_fath_job_place" /></td>

</tr>

<tr align="center">

<td colspan="2">ارفق دفتر العائلة اذا كان الطالب سعودي او جواز السفر ازا كان الطلب اجنبي</td>

</tr>

<tr>

<td colspan="2"><input name="std_passport" value="<?=$_POST['std_passport']?>" type="text" class="login_input" id="std_passport" />

<a href="javascript:imgup('std_passport')"><img src="images/upload.gif"></a></td>

</tr>

<tr align="center">

<td colspan="2">ارفاق شهادة الميلاد</td>

</tr>

<tr>

<td colspan="2"><input name="std_birthcert" value="<?=$_POST['std_birthcert']?>" type="text" class="login_input" id="std_birthcert" />

<a href="javascript:imgup('std_birthcert')"><img src="images/upload.gif"></a></td>

</tr>

<tr align="center">

<td colspan="2">ارفاق صورة من صك المنزل الذي تسكنه او صك ايجار شقة او فاتورة الكهرباء والماء</td>

</tr>

<tr>

<td colspan="2"><input name="std_home_bills" value="<?=$_POST['std_home_bills']?>" type="text" class="login_input" id="std_home_bills" />

<a href="javascript:imgup('std_home_bills')"><img src="images/upload.gif"></a></td>

</tr>

<tr>

<td colspan="2" align="center">ادخل رقم هاتفك النقال ليتم الرد على التسجيل مبدئيا</td>

</tr>

<tr>

<td colspan="2" align="center"><input type="text" value="<?=$_POST['std_mobile']?>" name="std_mobile" class="login_input" /></td>

</tr>

<tr>

<td colspan="2" align="center"><input value="ارسال الطلب" name="submit" type="submit" class="login_submit" /></td>

</tr>

</table>

</form>

<?

end_block();

include ("bottom.php");

?>

#2

جريب على اسضافة مدفوعة

اغلب المجانية لاتدعم ارسال الاميل

#3

أخي legendq

و ماذا عن الكود هل البرمجية فيها أي خطأ ؟

شكراً لك

#4

لم اجرب الكود ولان انت جرب على اسضافة مدفوعة او على الموقع التالي

000webhost.comالرابط الخاص بي

هذا الرابط يدعم ارسال الاميل سجل وجرب مجاني

مواضيع مشابهة