Can anyone reccomend me a good secure PHP/Mailto form tutorial

Soldato
Joined
1 Dec 2004
Posts
23,076
Location
S.Wales
There are lots of these on the web, but the only problem is they are either simple (non-secure) ones, or ones that claim to be secure but are not fully secure.

I would like a reccomendation on one that will tacle

Form input validation
Prevent PHP Injections
Prevent spam attacks?

So far I have only written the top part of my sendmail.php file as im researching on the web for the best methods to use

Code:
/Sendmail.php copyright dmoranda.co.uk 2009
//-------------------------------------------

<?php

//SQL Database Connection

$host='***';
$username='***';
$password='***';
$db_name='***';
$tbl_name='***';
	
mysql_connect($host, $username, $password)or die('cannot connect');
mysql_select_db($db_name)or die('cannot select DB');


//Variable declarations
	$name = strip_tags($_POST['name']);
	$email = strip_tags($_POST['email']);
	$message = strip_tags($_POST['message']);
 
OK, so im guessing there isnt really any great need for me to use a database backend for this? all i want is a secure one :)
 
Back
Top Bottom