Hey man, I thought I would direct this to you for a quick answer.
Form automatically proceeds without checking form fields first.
<?php
require_once('lib/config.php');
require_once('lib/user.php');
require_once('lib/database.php');
require_once('lib/file.php');
require_once('lib/accounts.php');
require_once('lib/sessions.php');
session_start();
$conn = new Database($dbname, $dbhost, $dbpass, $dbuser);
// if the form is submitted
if ($_POST['signup']) {
//make sure all [i]required[/i] form fields are filled in
if (isset($_POST['us']) || isset($_POST['pa']) || isset($_POST['na']) || isset($_POST['st']) || isset($_POST['ci']) || isset($_POST['sa']) || isset($_POST['zi']) || isset($_POST['em']) || isset($_POST['te'])) {
//if they are then load information into database and include finished message
$accounts = new accounts();
$accounts->create($conn, $us, $pa, $na, $st, $ci, $sa, $zi, $co, $te, $em, '1048576', '50242880', '0');
require('signupcomplete.php');
}
} else {
//else define an error message this will be echoed in the html
$error = 'Please fill out all form fields';
{
?>
............................................................
HTML and FORM w/ $PHP_SELF
............................................................
<?php
}
}
?>