<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Create fancy contact form with CSS 3 and jQuery</title>
	<atom:link href="http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/</link>
	<description>Tips,Tricks and Hacks!</description>
	<lastBuildDate>Thu, 10 May 2012 08:13:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Szymon</title>
		<link>http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/comment-page-1/#comment-1453</link>
		<dc:creator>Szymon</dc:creator>
		<pubDate>Tue, 10 Apr 2012 17:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://youhack.me/?p=600#comment-1453</guid>
		<description>Please, some1 found solution for not working ajax submission? 
When i click send - mail has been send but after this nothing happened, i mean the next part with &quot;Thank you, We will contact you soon !&quot; doesnt appear.
Cheers</description>
		<content:encoded><![CDATA[<p>Please, some1 found solution for not working ajax submission?<br />
When i click send &#8211; mail has been send but after this nothing happened, i mean the next part with &#8220;Thank you, We will contact you soon !&#8221; doesnt appear.<br />
Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tribaldeath</title>
		<link>http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/comment-page-1/#comment-1382</link>
		<dc:creator>tribaldeath</dc:creator>
		<pubDate>Tue, 28 Feb 2012 18:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://youhack.me/?p=600#comment-1382</guid>
		<description>anybody come up with a solution.. the submit button doesn&#039;t work for me..</description>
		<content:encoded><![CDATA[<p>anybody come up with a solution.. the submit button doesn&#8217;t work for me..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giorgos Key</title>
		<link>http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/comment-page-1/#comment-1368</link>
		<dc:creator>Giorgos Key</dc:creator>
		<pubDate>Fri, 17 Feb 2012 13:59:28 +0000</pubDate>
		<guid isPermaLink="false">http://youhack.me/?p=600#comment-1368</guid>
		<description>I have used fancybox to open the contact form inline. Why does not it works? Everything seems normal but the button is disabled.

Also do we need an action on the form? It is obligatory in XTHML 1.1 so sites in this doctype are not validates successfully.</description>
		<content:encoded><![CDATA[<p>I have used fancybox to open the contact form inline. Why does not it works? Everything seems normal but the button is disabled.</p>
<p>Also do we need an action on the form? It is obligatory in XTHML 1.1 so sites in this doctype are not validates successfully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jude</title>
		<link>http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/comment-page-1/#comment-1344</link>
		<dc:creator>Jude</dc:creator>
		<pubDate>Sun, 05 Feb 2012 09:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://youhack.me/?p=600#comment-1344</guid>
		<description>Still the code below seems not working since i did not receive any message from my email where the message should supposed to be sent.

</description>
		<content:encoded><![CDATA[<p>Still the code below seems not working since i did not receive any message from my email where the message should supposed to be sent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jude</title>
		<link>http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/comment-page-1/#comment-1343</link>
		<dc:creator>Jude</dc:creator>
		<pubDate>Sun, 05 Feb 2012 08:07:52 +0000</pubDate>
		<guid isPermaLink="false">http://youhack.me/?p=600#comment-1343</guid>
		<description>Hi Hyder, how are you doing? I have a question and hoping you could help me. I followed a tutorial about registration and activation email however after clicking the registration button, i did not receive any email from yahoomail... I tried to register using a webmail email and i received it. What could be the problem? I&#039;ve checked on my spam and inbox in yahoo however it doesnt work for yahoomail or even gmail. here&#039;s my code:

&lt;?

include &#039;db.php&#039;;

// Define post fields into simple variables
$first_name = $_POST[&#039;first_name&#039;];
$last_name = $_POST[&#039;last_name&#039;];
$email_address = $_POST[&#039;email_address&#039;];
$username = $_POST[&#039;username&#039;];
$info = $_POST[&#039;info&#039;];

/* Let&#039;s strip some slashes in case the user entered
any escaped characters. */

$first_name = stripslashes($first_name);
$last_name = stripslashes($last_name);
$email_address = stripslashes($email_address);
$username = stripslashes($username);
$info = stripslashes($info);


/* Do some error checking on the form posted fields */

if((!$first_name) &#124;&#124; (!$last_name) &#124;&#124; (!$email_address) &#124;&#124; (!$username)){
	echo &#039;You did not submit the following required information! &#039;;
	if(!$first_name){
		echo &quot;First Name is a required field. Please enter it below.&quot;;
	}
	if(!$last_name){
		echo &quot;Last Name is a required field. Please enter it below.&quot;;
	}
	if(!$email_address){
		echo &quot;Email Address is a required field. Please enter it below.&quot;;
	}
	if(!$username){
		echo &quot;Desired Username is a required field. Please enter it below.&quot;;
	}
	include &#039;join_form.html&#039;; // Show the form again!
	/* End the error checking and if everything is ok, we&#039;ll move on to
	 creating the user account */
	exit(); // if the error checking has failed, we&#039;ll exit the script!
}
	
/* Let&#039;s do some checking and ensure that the user&#039;s email address or username
 does not exist in the database */
 
 $sql_email_check = mysql_query(&quot;SELECT email_address FROM users WHERE email_address=&#039;$email_address&#039;&quot;);
 $sql_username_check = mysql_query(&quot;SELECT username FROM users WHERE username=&#039;$username&#039;&quot;);
 
 $email_check = mysql_num_rows($sql_email_check);
 $username_check = mysql_num_rows($sql_username_check);
 
 if(($email_check &gt; 0) &#124;&#124; ($username_check &gt; 0)){
 	echo &quot;Please fix the following errors: &quot;;
 	if($email_check &gt; 0){
 		echo &quot;&lt;strong&gt;Your email address has already been used by another member in our database. Please submit a different Email address!&quot;;
 		unset($email_address);
 	}
 	if($username_check &gt; 0){
 		echo &quot;The username you have selected has already been used by another member in our database. Please choose a different Username!&quot;;
 		unset($username);
 	}
 	include &#039;join_form.html&#039;; // Show the form again!
 	exit();  // exit the script so that we do not create this account!
 }
 
/* Everything has passed both error checks that we have done.
It&#039;s time to create the account! */

/* Random Password generator. 
http://www.phpfreaks.com/quickcode/Random_Password_Generator/56.php

We&#039;ll generate a random password for the
user and encrypt it, email it and then enter it into the db.
*/

function makeRandomPassword() {
  $salt = &quot;abchefghjkmnpqrstuvwxyz0123456789&quot;;
  srand((double)microtime()*1000000); 
  	$i == 0;
  	while ($i &lt;= 7) {
    		$num = rand() % 33;
    		$tmp = substr($salt, $num, 1);
    		$pass = $pass . $tmp;
    		$i++;
  	}
  	return $pass;
}

$random_password = makeRandomPassword();

$db_password = md5($random_password);

// Enter info into the Database.
$info2 = htmlspecialchars($info);
$sql = mysql_query(&quot;INSERT INTO users (first_name, last_name, email_address, username, password, info, signup_date)
		VALUES(&#039;$first_name&#039;, &#039;$last_name&#039;, &#039;$email_address&#039;, &#039;$username&#039;, &#039;$db_password&#039;, &#039;$info2&#039;, now())&quot;) or die (mysql_error());

if(!$sql){
	echo &#039;There has been an error creating your account. Please contact the webmaster.&#039;;
} else {
	$userid = mysql_insert_id();
	// Let&#039;s mail the user!
	$subject = &quot;Welcome to my Website Cebu! Member details&quot;;
	$message = &quot;Dear $first_name $last_name,
	Thank you for registering at our website, http://www.greenbarley.com.ph!
	
	You are two steps away from logging in and accessing our exclusive members area.
	
	To activate your membership, please click here: http://www.greenbarley.com.ph/activate.php?id=$userid&amp;code=$db_password
	
	Once you activate your memebership, you will be able to login with the following information:
	Username: $username
	Password: $random_password
	
	Thanks!
	Green Barley Team
	
	This is an automated response, please do not reply!&quot;;
	
	mail($email_address, $subject, $message, &quot;From: MyDomain Webmaster\nX-Mailer: PHP/&quot; . phpversion());
	echo &#039;Your membership information has been mailed to your email address! Please check it and follow the directions! Thank you&#039;;
}

?&gt;</description>
		<content:encoded><![CDATA[<p>Hi Hyder, how are you doing? I have a question and hoping you could help me. I followed a tutorial about registration and activation email however after clicking the registration button, i did not receive any email from yahoomail&#8230; I tried to register using a webmail email and i received it. What could be the problem? I&#8217;ve checked on my spam and inbox in yahoo however it doesnt work for yahoomail or even gmail. here&#8217;s my code:</p>
<p>&lt;?</p>
<p>include &#039;db.php&#039;;</p>
<p>// Define post fields into simple variables<br />
$first_name = $_POST[&#039;first_name&#039;];<br />
$last_name = $_POST[&#039;last_name&#039;];<br />
$email_address = $_POST[&#039;email_address&#039;];<br />
$username = $_POST[&#039;username&#039;];<br />
$info = $_POST[&#039;info&#039;];</p>
<p>/* Let&#039;s strip some slashes in case the user entered<br />
any escaped characters. */</p>
<p>$first_name = stripslashes($first_name);<br />
$last_name = stripslashes($last_name);<br />
$email_address = stripslashes($email_address);<br />
$username = stripslashes($username);<br />
$info = stripslashes($info);</p>
<p>/* Do some error checking on the form posted fields */</p>
<p>if((!$first_name) || (!$last_name) || (!$email_address) || (!$username)){<br />
	echo &#039;You did not submit the following required information! &#8216;;<br />
	if(!$first_name){<br />
		echo &#8220;First Name is a required field. Please enter it below.&#8221;;<br />
	}<br />
	if(!$last_name){<br />
		echo &#8220;Last Name is a required field. Please enter it below.&#8221;;<br />
	}<br />
	if(!$email_address){<br />
		echo &#8220;Email Address is a required field. Please enter it below.&#8221;;<br />
	}<br />
	if(!$username){<br />
		echo &#8220;Desired Username is a required field. Please enter it below.&#8221;;<br />
	}<br />
	include &#8216;join_form.html&#8217;; // Show the form again!<br />
	/* End the error checking and if everything is ok, we&#8217;ll move on to<br />
	 creating the user account */<br />
	exit(); // if the error checking has failed, we&#8217;ll exit the script!<br />
}</p>
<p>/* Let&#8217;s do some checking and ensure that the user&#8217;s email address or username<br />
 does not exist in the database */</p>
<p> $sql_email_check = mysql_query(&#8220;SELECT email_address FROM users WHERE email_address=&#8217;$email_address&#8217;&#8221;);<br />
 $sql_username_check = mysql_query(&#8220;SELECT username FROM users WHERE username=&#8217;$username&#8217;&#8221;);</p>
<p> $email_check = mysql_num_rows($sql_email_check);<br />
 $username_check = mysql_num_rows($sql_username_check);</p>
<p> if(($email_check &gt; 0) || ($username_check &gt; 0)){<br />
 	echo &#8220;Please fix the following errors: &#8220;;<br />
 	if($email_check &gt; 0){<br />
 		echo &#8220;<strong>Your email address has already been used by another member in our database. Please submit a different Email address!&#8221;;<br />
 		unset($email_address);<br />
 	}<br />
 	if($username_check &gt; 0){<br />
 		echo &#8220;The username you have selected has already been used by another member in our database. Please choose a different Username!&#8221;;<br />
 		unset($username);<br />
 	}<br />
 	include &#8216;join_form.html&#8217;; // Show the form again!<br />
 	exit();  // exit the script so that we do not create this account!<br />
 }</p>
<p>/* Everything has passed both error checks that we have done.<br />
It&#8217;s time to create the account! */</p>
<p>/* Random Password generator.<br />
<a href="http://www.phpfreaks.com/quickcode/Random_Password_Generator/56.php" rel="nofollow">http://www.phpfreaks.com/quickcode/Random_Password_Generator/56.php</a></p>
<p>We&#8217;ll generate a random password for the<br />
user and encrypt it, email it and then enter it into the db.<br />
*/</p>
<p>function makeRandomPassword() {<br />
  $salt = &#8220;abchefghjkmnpqrstuvwxyz0123456789&#8243;;<br />
  srand((double)microtime()*1000000);<br />
  	$i == 0;<br />
  	while ($i &lt;= 7) {<br />
    		$num = rand() % 33;<br />
    		$tmp = substr($salt, $num, 1);<br />
    		$pass = $pass . $tmp;<br />
    		$i++;<br />
  	}<br />
  	return $pass;<br />
}</p>
<p>$random_password = makeRandomPassword();</p>
<p>$db_password = md5($random_password);</p>
<p>// Enter info into the Database.<br />
$info2 = htmlspecialchars($info);<br />
$sql = mysql_query(&quot;INSERT INTO users (first_name, last_name, email_address, username, password, info, signup_date)<br />
		VALUES(&#039;$first_name&#039;, &#039;$last_name&#039;, &#039;$email_address&#039;, &#039;$username&#039;, &#039;$db_password&#039;, &#039;$info2&#039;, now())&quot;) or die (mysql_error());</p>
<p>if(!$sql){<br />
	echo &#039;There has been an error creating your account. Please contact the webmaster.&#039;;<br />
} else {<br />
	$userid = mysql_insert_id();<br />
	// Let&#039;s mail the user!<br />
	$subject = &quot;Welcome to my Website Cebu! Member details&quot;;<br />
	$message = &quot;Dear $first_name $last_name,<br />
	Thank you for registering at our website, <a href="http://www.greenbarley.com.ph" rel="nofollow">http://www.greenbarley.com.ph</a>!</p>
<p>	You are two steps away from logging in and accessing our exclusive members area.</p>
<p>	To activate your membership, please click here: <a href="http://www.greenbarley.com.ph/activate.php?id=$userid&amp;code=$db_password" rel="nofollow">http://www.greenbarley.com.ph/activate.php?id=$userid&amp;code=$db_password</a></p>
<p>	Once you activate your memebership, you will be able to login with the following information:<br />
	Username: $username<br />
	Password: $random_password</p>
<p>	Thanks!<br />
	Green Barley Team</p>
<p>	This is an automated response, please do not reply!&quot;;</p>
<p>	mail($email_address, $subject, $message, &quot;From: MyDomain Webmaster\nX-Mailer: PHP/&#8221; . phpversion());<br />
	echo &#8216;Your membership information has been mailed to your email address! Please check it and follow the directions! Thank you&#8217;;<br />
}</p>
<p>?&gt;</strong></p>
]]></content:encoded>
	</item>
</channel>
</rss>

