انشأت صفحة للحجز في معرض ويجب لا يتم اكمال الحجز الا بعد الموافقة على الشروط بتفعيل الخيار الظهار في صورة checkbox في المرفق
يجب ان يتم التحقق من التفعيل كتبت الاكواد التالية
كود html
<td height="44" colspan="8" align="right" valign="top"><img src="images/S13.png" width="276" height="21" />
<input type="checkbox" name="personal" id="checkbox" value="ACCEPT" /></td>
كود php
<?
php
$Companyname = addslashes($_POST['Companyname']);
$phone = addslashes($_POST['phone']);
$Ext = addslashes($_POST['Ext']);
$Fax = addslashes($_POST['Fax']);
$Ext2 = addslashes($_POST['Ext2']);
$manegername = addslashes($_POST['manegername']);
$mob = addslashes($_POST['mob']);
$name = addslashes($_POST['name']);
$Position = addslashes($_POST['Position']);
$mob2 = addslashes($_POST['mob2']);
$Email = addslashes($_POST['Email']);
$Email2 = addslashes($_POST['Email2']);
$website = addslashes($_POST['website']);
$on = addslashes($_POST['on']);
$standno = addslashes($_POST['standno']);
$size = addslashes($_POST['size']);
$totalspace = addslashes($_POST['totalspace']);
$totalcost = addslashes($_POST['totalcost']);
$personal = addslashes($_POST['personal']);
/** التحقق من ملأ جميع الحقول **/
if(empty($_POST['Companyname']) OR empty($_POST['manegername']) OR empty($_POST['phone']) OR empty($_POST['Fax']) OR empty($_POST['mob']) OR empty($_POST['name'])
OR empty($_POST['Position']) OR empty($_POST['mob2']) OR empty($_POST['Email']) OR empty($_POST['Email2'])
OR empty($_POST['standno']) OR empty($_POST['size']) OR empty($_POST['totalspace']) OR empty($_POST['totalcost']) ) {
echo "<BR><BR><BR>";
echo "<BR><div align='center'>أحد الحقول فارغ
<BR><a href='javascript:history.back(1)'>عودة للخلف</a></div>";
echo "<BR><BR>";
exit ();
}else{
$Headers = "From: $Email <$Email>\r\n";
/** دالة التأكد من صحة البريد **/
if ((!$Email) or (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $Email))) {
echo ("<BR><BR><BR><div align='center'>البريد المدخل غير صحيح ...... فضلاً تأكد منه</div><BR>");
echo "<BR><div align='center'><a href='javascript:history.back(1)'>عودة للخلف</a></div>";
exit ();
}else{
/** دالة التأكد من الاطلاع على الشروط **/
if($personal=='1')
{
echo ("<BR><BR><BR><div align='center'>يجب الإطلاع على الشروط</div><BR>");
echo "<BR><div align='center'><a href='javascript:history.back(1)'>عودة للخلف</a></div>";
exit ();
}else{
$Companyname = addslashes($_POST['Companyname']);
$phone = addslashes($_POST['phone']);
$Ext = addslashes($_POST['Ext']);
$Fax = addslashes($_POST['Fax']);
$Ext2 = addslashes($_POST['Ext2']);
$manegername = addslashes($_POST['manegername']);
$mob = addslashes($_POST['mob']);
$name = addslashes($_POST['name']);
$Position = addslashes($_POST['Position']);
$mob2 = addslashes($_POST['mob2']);
$Email = addslashes($_POST['Email']);
$Email2 = addslashes($_POST['Email2']);
$website = addslashes($_POST['website']);
$ON = addslashes($_POST['on']);
$standno = addslashes($_POST['standno']);
$size = addslashes($_POST['size']);
$totalspace = addslashes($_POST['totalspace']);
$totalcost = addslashes($_POST['totalcost']);
$personal = addslashes($_POST['personal']);
$Message = "
---------------------------
اسم الشركة العارضة :$Companyname
---------------------------
هاتف :$phone
---------------------------
تحويلة:$Ext
---------------------------
فاكس:$Fax
---------------------------
تحويلة:$Ext2
---------------------------
المدير العام:$manegername
---------------------------
جوال:$mob
---------------------------
اسم المسؤول:$name
---------------------------
الوظيفة:$Position
---------------------------
جوال:$mob2
---------------------------
ايميل:$Email
---------------------------
ايميل الشركة:$Email2
---------------------------
الموقع الالكتروني:$website
---------------------------
نرغب الإشتراك والحجز:$ON
---------------------------
رقم المنصة:$standno
---------------------------
أبعاد:$size
---------------------------
اجمالي مساحة:$totalspace
---------------------------
اجمالي تكلفة:$totalcost
---------------------------
الاطلع على الشروط:$personal
---------------------------
";
?>
عند تجربة العمل تظهر الرسالة
Parse error: syntax error, unexpected $end in /home/content/22/8217122/html/Space Form.php on line 172
وعند حذف الكود الخاص بالـ checkbox تعمل بشكل جيد ارجوا المساعدة بهذا الكود
