Sending HTML mail by mail()
-
$to = "nuhilmehdy@gmail.com";
-
$subject = "HTML Test";
-
$Name = "Nuhil"; //senders name. // This is just for display name
-
$email = "email@adress.com"; //senders e-mail adress. // I think this would be generated by the host automatically
-
$last_name = "Mehdy"; // A test variable for using in the html format
-
-
$message = '
-
<html>
-
<head>
-
<title>HTML email</title>
-
</head>
-
<body>
-
<p>This email contains HTML Tags!</p>
-
<table width="100%" border="1">
-
<tr>
-
<td>First Name </td>
-
<td>Last Name </td>
-
</tr>
-
<tr>
-
<td>Nuhil</td>
-
<td>'.$last_name.'</td>
-
</tr>
-
</table>
-
</body>
-
</html>
-
'; // Use ' (single quote) for defining the variable content if you use " (double quote) inside that html format OR use reverse method
-
-
$headers = "MIME-Version: 1.0" . "\r\n"; // Always set content-type when sending HTML email
-
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; // This defines the mail as html content
-
-
// More headers
-
$headers .= "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
-
$headers .= "Cc: nuhil@yahoo.com" . "\r\n"; // For Cc sending you can use headers also
-
-
mail($to,$subject,$message,$headers);
-
?>
My First WordPress Theme!
Yesterday i made a wordpress theme which is my first work in theme based works. The theme is 100% widgets supported. It is two columns based and has fixed width. I named it RedHat because i used a redhat logo and Black+Red color in major in that theme.
You can see this theme in work.
Click the screenshot below.
Please don’t forget to comment about my silly job.
Authentication Module with E-mail & Image Verification!
I’ve built an authentication system which can be used as secured module in a registration form or in a suggestion box where there are probability of insertion of data by a robot script. By using the image verification fact no auto generated script can fill up a form. Other wise there is an e-mail verification fact by which the man who fill up the form giving his e-mail address should check up his inbox for the mail sent by the form.
The e-mail is sent with a link on which by clicking it executes a script for neccessary update in the database.

In this module when a user fill up the form then in database every data is inserted and in a filled named active ’0′ is inserted. When the user clicks on the link sent to him by e-mail. It then executes another script page which then updates the value of active field into ’1′.
Then you can verify a user by examining the value of his active field in database that ensures that he clicked on th link.
This can be used as module in any Webapp.
See the example: Register Login
You can download the source code from the ShareBox left of side of my site. named Auth.zip
My 5th Semester Project!
I have launched my 5th semester project on the web for testing and further feedback. I was directed to make a web app for a garments shop. There are two types of use. Administrator can upload a product by specific privilege and customer can see required product or all product by searching with requirements. They also can by the product.
The address: My project
Store your Source Code of page in Database and Rtrieve them on Request.
You can store any kind of code in database. Simply you have to choose BLOB Datatype. For example LONGBLOB, MEDIUMBLOB etc. Using this datatype you can insert any data as binary such as image, codes, files etc in the same row of a corresponding id.
Here i’ve made a file named call_from_db.php in which there are a few lines to retrieve the original codes from DB and put them on this page. In template table, the main configuration of HTML tags are fixed. In content table codes are inserted in different columns. Finally in call_from_db.php page print them sequentially.
Download the example from the Share Box in the right side of this page. The file is named call_from_db.zip




