Browsing articles in "HTML"

Sending HTML mail by mail()

Sep 17, 2009   //   by nuhil   //   Featured, HTML, PHP, Tips for the New  //  No Comments
<?php
  1. $to = "nuhilmehdy@gmail.com";
  2. $subject = "HTML Test";
  3. $Name = "Nuhil"; //senders name. // This is just for display name
  4. $email = "email@adress.com"; //senders e-mail adress. // I think this would be generated by the host automatically
  5. $last_name = "Mehdy"; // A test variable for using in the html format
  6.  
  7. $message = '
  8. <html>
  9. <head>
  10. <title>HTML email</title>
  11. </head>
  12. <body>
  13. <p>This email contains HTML Tags!</p>
  14. <table width="100%"  border="1">
  15.  <tr>
  16.    <td>First Name </td>
  17.    <td>Last Name </td>
  18.  </tr>
  19.  <tr>
  20.    <td>Nuhil</td>
  21.    <td>'.$last_name.'</td>
  22.  </tr>
  23. </table>
  24. </body>
  25. </html>
  26. '; // Use ' (single quote) for defining the variable content if you use " (double quote) inside that html format OR use reverse method
  27.  
  28. $headers = "MIME-Version: 1.0" . "\r\n"; // Always set content-type when sending HTML email
  29. $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; // This defines the mail as html content
  30.  
  31. // More headers
  32. $headers .= "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
  33. $headers .= "Cc: nuhil@yahoo.com" . "\r\n"; // For Cc sending you can use headers also
  34.  
  35. mail($to,$subject,$message,$headers);
  36. ?>

My First WordPress Theme!

Nov 24, 2008   //   by nuhil   //   CMS, CSS, HTML, PHP, Wordpress  //  4 Comments

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.screenshot

Please don’t forget to comment about my silly job.

Authentication Module with E-mail & Image Verification!

Aug 1, 2008   //   by nuhil   //   HTML, JS, MySQL, PHP  //  1 Comment

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!

Jul 29, 2008   //   by nuhil   //   CSS, HTML, My RUET life, MySQL, PHP  //  No Comments

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.

Apr 2, 2008   //   by nuhil   //   HTML, MySQL, PHP  //  No Comments

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

Pages:12»