I have stared at this code for an hour and can't figure this out to save my life. maybe I need more coffee
I'm creating a switch register page but every time I submit the form it refreshes the default page heres the code cut down extensively.
include("../tools/config.php");
session_start();
switch($_GET['action']){
case "joinb":
addmember($member);
break;
default:
register($user);
break;
}
function register($user){
echo "
<form method='post'>
data blah blah
<input type='hidden' name='action' value='joinb'>
<input type='submit' class='button' name='submit' value='Create Account'>
</form>
";
}
function addmember($member){
insert mysql function
}