Add / Edit / List users with email intimation

Its a simple tutorial, which explains Add / Edit / List functionalities with mail confirmation. bottom of this tutorial has a link to download the zip file.

Zip File includes.

  1. registration.php
  2. registration_tpl.php
  3. userlist_tpl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 
//change the headers 
 
// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: User registeration <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
 
// Mail it
//mail($to, $subject, $message, $headers);
// SMTP or sendmail has to be configured in your system in order to send mails
//unless you configure smtp
//you will get 
//Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\xampp\htdocs\learning\beginners\user-registration\AddEditList\registration.php on line 55
 
mail($_POST['email'], $subject, $mailmsg, $headers);

Download

Add / Edit / List users

Its a simple tutorial, which explains Add / Edit / List functionalities. bottom of this tutorial has a link to download the zip file.

Zip File includes.

  1. registration.php
  2. registration_tpl.php
  3. userlist.php

CREATE TABLE `users` (
`userid` int(11) NOT NULL auto_increment,
`username` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
PRIMARY KEY (`userid`)
) AUTO_INCREMENT=1 ;

registration.php is the file to be called for three different actions namely INSERT,EDIT and LIST, Let me explain registration.php in three different steps.

Read more

← Previous Page