View Single Post
Old 08-22-2008, 04:28 PM   #6 (permalink)
CrazeD
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,686

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: PHP / MySQL (Die)

PHP Code:
<?php

if (isset($_POST['join'])) {
    
$firstname $_POST['firstname'];
    
$surname   $_POST['surname'];
    
    if(empty (
$firstname) || empty ($surname)) {
        echo 
'You haven\'t filled in all the fields!';
    } else {
        
$sql mysql_query ("INSERT INTO table (firstname,surname) VALUES ('".$firstname."','".$surname."')");
        echo 
'Your entry has been saved to the database!';
    }
} else {
    
// get form
}

?>

__________________

Need website help? PM me!
CrazeD is offline