<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>فواصل &#187; شرح،عمل،فورم،اتصل،بنا،بلغه،jQuery،php</title>
	<atom:link href="http://portal.fwasl.com/tag/%d8%b4%d8%b1%d8%ad%d8%8c%d8%b9%d9%85%d9%84%d8%8c%d9%81%d9%88%d8%b1%d9%85%d8%8c%d8%a7%d8%aa%d8%b5%d9%84%d8%8c%d8%a8%d9%86%d8%a7%d8%8c%d8%a8%d9%84%d8%ba%d9%87%d8%8cjquery%d8%8cphp/feed/" rel="self" type="application/rss+xml" />
	<link>http://portal.fwasl.com</link>
	<description></description>
	<lastBuildDate>Wed, 16 Oct 2019 18:49:35 +0000</lastBuildDate>
	<language>ar</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>فورم اتصل بنا باستخدام jQuery وphp</title>
		<link>http://portal.fwasl.com/%d9%81%d9%88%d8%b1%d9%85-%d8%a7%d8%aa%d8%b5%d9%84-%d8%a8%d9%86%d8%a7-%d8%a8%d8%a7%d8%b3%d8%aa%d8%ae%d8%af%d8%a7%d9%85-jquery-%d9%88php/</link>
		<comments>http://portal.fwasl.com/%d9%81%d9%88%d8%b1%d9%85-%d8%a7%d8%aa%d8%b5%d9%84-%d8%a8%d9%86%d8%a7-%d8%a8%d8%a7%d8%b3%d8%aa%d8%ae%d8%af%d8%a7%d9%85-jquery-%d9%88php/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 23:46:10 +0000</pubDate>
		<dc:creator><![CDATA[مدهش]]></dc:creator>
				<category><![CDATA[jquery & java script]]></category>
		<category><![CDATA[شرح،عمل،فورم،اتصل،بنا،بلغه،jQuery،php]]></category>

		<guid isPermaLink="false">http://www.portal.fwasl.com/?p=5593</guid>
		<description><![CDATA[هذه طريقه فعالة ومجربه لعمل فورم إتصل بنا contact us باستخدام HTML و PHP و JQuery الخطوة الأولى انشاء صفحة HTML وسميها Contact.php او اي اسم ثاني المهم .php وهذا هو الكود : [html] الاتصال بنا _ فواصل &#60;script src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;!&#8211;mce:0&#8211;&#62;&#60;/script&#62; &#60;div id=&#34;contact-wrapper&#34;&#62; &#60;!&#8211;?php if(isset($hasError)) { //If errors are found ?&#8211;&#62; الرجاء التأكد من جميع ...]]></description>
				<content:encoded><![CDATA[<p>هذه طريقه فعالة ومجربه لعمل فورم إتصل بنا contact us باستخدام HTML و PHP و JQuery</p>
<p><strong>الخطوة الأولى</strong><br />
انشاء صفحة HTML وسميها Contact.php او اي اسم ثاني المهم .php</p>
<p>وهذا هو الكود :</p>
[html]
<p>	الاتصال بنا _ فواصل</p>
<p>&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!&#8211;mce:0&#8211;&gt;&lt;/script&gt;<br />
&lt;div id=&quot;contact-wrapper&quot;&gt;<br />
	&lt;!&#8211;?php if(isset($hasError)) { //If errors are found ?&#8211;&gt;</p>
<p>الرجاء التأكد من جميع الفراغات</p>
<p>	&lt;!&#8211;?php } ?&#8211;&gt;</p>
<p>	&lt;!&#8211;?php if(isset($emailSent) &amp;&amp; $emailSent == true) { //If email is sent ?&#8211;&gt;</p>
<p>&lt;strong&gt;تم الارسال&lt;/strong&gt;</p>
<p>شكراً &lt;strong&gt;&lt;!&#8211;?php echo $name;?&#8211;&gt;&lt;/strong&gt; سيتم الرد عليك قريباً</p>
<p>	&lt;!&#8211;?php } ?&#8211;&gt;<br />
&lt;form id=&quot;contactform&quot; action=&quot;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&lt;br /&gt;&quot; method=&quot;post&quot;&gt;<br />
&lt;div&gt;<br />
		    &lt;label for=&quot;name&quot;&gt;&lt;strong&gt;الإسم:&lt;/strong&gt;&lt;/label&gt;<br />
			&lt;input id=&quot;contactname&quot; name=&quot;contactname&quot; size=&quot;50&quot; type=&quot;text&quot; /&gt;&lt;/div&gt;<br />
&lt;div&gt;<br />
			&lt;label for=&quot;email&quot;&gt;&lt;strong&gt;البريد الالكتروني:&lt;/strong&gt;&lt;/label&gt;<br />
			&lt;input id=&quot;email&quot; name=&quot;email&quot; size=&quot;50&quot; type=&quot;text&quot; /&gt;&lt;/div&gt;<br />
&lt;div&gt;<br />
			&lt;label for=&quot;subject&quot;&gt;&lt;strong&gt;العنوان:&lt;/strong&gt;&lt;/label&gt;<br />
			&lt;input id=&quot;subject&quot; name=&quot;subject&quot; size=&quot;50&quot; type=&quot;text&quot; /&gt;&lt;/div&gt;<br />
&lt;div&gt;<br />
			&lt;label for=&quot;message&quot;&gt;&lt;strong&gt;الرسالة:&lt;/strong&gt;&lt;/label&gt;<br />
			&lt;textarea id=&quot;message&quot; cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;message&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;<br />
	    &lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;ارسال&quot; /&gt;<br />
	&lt;/form&gt;&lt;/div&gt;<br />
[/html]
<p><strong>الخطوة الثانية<br />
</strong></p>
<p>تنسيق الصفحة..نفتح صفحة جديدة بمحرر النصوص<br />
ونسميه style.css<br />
ونلصق الكود التالي</p>
[html]
body {<br />
	font-family:&quot;arabic&quot;,Tahoma, sans-serif;<br />
	direction:rtl;<br />
}<br />
#contact-wrapper {<br />
	width:430px;<br />
	border:1px solid #e2e2e2;<br />
	background:#f1f1f1;<br />
	padding:20px;<br />
	float:right;<br />
}<br />
#contact-wrapper div {<br />
	clear:both;<br />
	margin:1em 0;<br />
}<br />
#contact-wrapper label {<br />
	display:block;<br />
	float:none;<br />
	font-size:16px;<br />
	width:auto;<br />
}<br />
form#contactform input {<br />
	border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;<br />
	border-style:solid;<br />
	border-width:1px;<br />
	padding:5px;<br />
	font-size:16px;<br />
	color:#333;<br />
	-moz-border-radius:8px;<br />
	-webkit-border-radius:8px;<br />
	border-radius:8px;</p>
<p>}<br />
form#contactform textarea {<br />
	font-family:&quot;arabic&quot;, Tahoma, Helvetica, sans-serif;<br />
	font-size:100%;<br />
	padding:0.6em 0.5em 0.7em;<br />
	border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;<br />
	border-style:solid;<br />
	border-width:1px;<br />
	-moz-border-radius:8px;<br />
	-webkit-border-radius:8px;<br />
	border-radius:8px;<br />
}<br />
form#contactform input:focus,<br />
form#contactform input:hover{<br />
	-moz-box-shadow:0 0 8px black;<br />
	-webkit-box-shadow:0 0 8px black;<br />
	box-shadow:0 0 8px black;<br />
}<br />
form#contactform textarea:focus,<br />
form#contactform textarea:hover {<br />
	-moz-box-shadow:0 0 8px black;<br />
	-webkit-box-shadow:0 0 8px black;<br />
	box-shadow:0 0 8px black;<br />
	{<br />
[/html]
<p><strong>الخطوة الثالثة</strong></p>
<p>الPHP<br />
في اعلى صفحةcontact<br />
نلصق الكود التالي</p>
[html]
&lt; ?php<br />
//If the form is submitted<br />
if(isset($_POST['submit'])) {</p>
<p>	//Check to make sure that the name field is not empty<br />
	if(trim($_POST['contactname']) == &#8221;) {<br />
		$hasError = true;<br />
	} else {<br />
		$name = trim($_POST['contactname']);<br />
	}</p>
<p>	//Check to make sure that the subject field is not empty<br />
	if(trim($_POST['subject']) == &#8221;) {<br />
		$hasError = true;<br />
	} else {<br />
		$subject = trim($_POST['subject']);<br />
	}</p>
<p>	//Check to make sure sure that a valid email address is submitted<br />
	if(trim($_POST['email']) == &#8221;)  {<br />
		$hasError = true;<br />
	} else if (!eregi(&quot;^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$&quot;, trim($_POST['email']))) {<br />
		$hasError = true;<br />
	} else {<br />
		$email = trim($_POST['email']);<br />
	}</p>
<p>	//Check to make sure comments were entered<br />
	if(trim($_POST['message']) == &#8221;) {<br />
		$hasError = true;<br />
	} else {<br />
		if(function_exists(&#8216;stripslashes&#8217;)) {<br />
			$comments = stripslashes(trim($_POST['message']));<br />
		} else {<br />
			$comments = trim($_POST['message']);<br />
		}<br />
	}</p>
<p>	//If there is no error, send the email<br />
	if(!isset($hasError)) {<br />
		$emailTo = &#8216;ضع بريدك هناااااااااااااااااااااا&#8217;; //Put your own email address here<br />
		$body = &quot;الاسم: $name \n\nEmail: $email \n\nSubject: $subject \n\nComments:\n $comments&quot;;<br />
		$headers = &#8216;من موقعي &lt;&#8217;.$emailTo.&#8217;&gt;&#8217; . &quot;\r\n&quot; . &#8216;إعادة ارسال الى: &#8216; . $email;</p>
<p>		mail($emailTo, $subject, $body, $headers);<br />
		$emailSent = true;<br />
	}<br />
}<br />
?&gt;<br />
[/html]
<p>والأن مع كود css</p>
[html]
body {<br />
	font-family:&quot;arabic&quot;,Tahoma, sans-serif;<br />
	direction:rtl;<br />
}<br />
#contact-wrapper {<br />
	width:430px;<br />
	border:1px solid #e2e2e2;<br />
	background:#f1f1f1;<br />
	padding:20px;<br />
	float:right;<br />
}<br />
#contact-wrapper div {<br />
	clear:both;<br />
	margin:1em 0;<br />
}<br />
#contact-wrapper label {<br />
	display:block;<br />
	float:none;<br />
	font-size:16px;<br />
	width:auto;<br />
}<br />
form#contactform input {<br />
	border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;<br />
	border-style:solid;<br />
	border-width:1px;<br />
	padding:5px;<br />
	font-size:16px;<br />
	color:#333;<br />
	-moz-border-radius:8px;<br />
	-webkit-border-radius:8px;<br />
	border-radius:8px;</p>
<p>}<br />
form#contactform textarea {<br />
	font-family:&quot;arabic&quot;, Tahoma, Helvetica, sans-serif;<br />
	font-size:100%;<br />
	padding:0.6em 0.5em 0.7em;<br />
	border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;<br />
	border-style:solid;<br />
	border-width:1px;<br />
	-moz-border-radius:8px;<br />
	-webkit-border-radius:8px;<br />
	border-radius:8px;<br />
}<br />
form#contactform input:focus,<br />
form#contactform input:hover{<br />
	-moz-box-shadow:0 0 8px black;<br />
	-webkit-box-shadow:0 0 8px black;<br />
	box-shadow:0 0 8px black;<br />
}<br />
form#contactform textarea:focus,<br />
form#contactform textarea:hover {<br />
	-moz-box-shadow:0 0 8px black;<br />
	-webkit-box-shadow:0 0 8px black;<br />
	box-shadow:0 0 8px black;<br />
	}<br />
[/html]
]]></content:encoded>
			<wfw:commentRss>http://portal.fwasl.com/%d9%81%d9%88%d8%b1%d9%85-%d8%a7%d8%aa%d8%b5%d9%84-%d8%a8%d9%86%d8%a7-%d8%a8%d8%a7%d8%b3%d8%aa%d8%ae%d8%af%d8%a7%d9%85-jquery-%d9%88php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
