Tuesday, September 13, 2011

MySQL Data Types: Quick Reference Table


http://kimbriggs.com/computers/computer-notes/mysql-notes/mysql-data-types-50.file
The latest MySQL documentation is at the MySQL Web Site, but I highly recommend getting the book "MySQL" by Paul DuBois for a very readable and thorough book on the subject. There is a sample database that you can download to follow along with the examples in the book. Good Stuff. These notes are ...

Tuesday, April 19, 2011

CODE FOR PHP CAPTCHA


http://www.white-hat-web-design.co.uk/articles/php-captcha.php
[1:37:18 PM] yogesh Bajpai: CODE FOR PHP CAPTCHA

<form method="post"  action="reg.php">
<b>Name</b><br/>
<input type="text" name="name" /><br/>
<b>Message</b><br/>
<textarea name="message"></textarea><br/>
<img src="captcha.php" id="captcha" /><br/>
<a href="#" onclick="
document.getElementById('captcha').src='captcha.php?'+Math.random();
document.getElementById('captcha-form').focus();"
id="change-image">Not readable? Change text.</a><br/><br/>
<b>Human Test</b><br/>
<input type="text" name="captcha" id="captcha-form" /><br/&gt;
<input type="submit" />
</form>
======================================
<?php
session_start();
if (!empty($_REQUEST['captcha']))
{

if (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST

['captcha'])) != $_SESSION['captcha'])
{
$note= 'Please enter correct text code';
}

else
{

if($_SERVER["REQUEST_METHOD"] == "POST")
{
$name=htmlentities($_POST['name']);
$message=htmlentities($_POST['message']);
// Insert SQL Statement
$note= 'Values Inserted Successfully';
}

}
unset($_SESSION['captcha']);
}
?>

Thursday, January 20, 2011

Downloade php cms for job portal,

http://www.jobberbase.com/

Php mail function not working with godaddy.com

function emailHtml($from, $subject, $message, $to) {
$host = "localhost";
$username = "";
$password = "";

$headers = array ('MIME-Version' => "1.0", 'Content-type' => "text/html; charset=iso-8859-1;", 'From' => $from, 'To' => $to, 'Subject' => $subject);

$smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => false));

$mail = $smtp->send($to, $headers, $message);
if (PEAR::isError($mail))
return 0;
else
return 1;
}