I want to create an email class with many functions and use this methods
I want some advice how to make this flexible and reliable as much as I can but another important feature is security to verify all the external input
I am going to past all my code that I made so far, this is my own work not copy paste or anything else.
This what I made so far
<?php
/*Email class
*
* @var $name;
var $email;
var $address;
var $phone;
var $city;
var $message;
*/
class email{
private $name;
private $email;
private $address;
private $phone;
private $city;
private $message;
function content(){
if( iseet($_POST['submit'])){
$this->name= strip_tags($_POST['name']);
$this->email= strip_tags($_POST['email']);
$this->address= strip_tags($_POST['address']);
$this->phone= strip_tags($_POST['phone']);
$this->city = strip_tags($_POST['city']);
$this->message = strip_tags($_POST['message']);
}
}
function verify(){
if(!ereg ("([a-zA-z]", $this->name)){
$ename='Error the name contains numbers or not permitted symbols';
}
}
function error(){
}
function send(){
}
}
?>
Any suggestion or expanation is welcomed Thank you.