ok, i think i fixed up everything everybody told me (although some
answers did contradict) and here is the entire script...
Jule
--script (globals.inc.php)--
<?php
$host_glob = "localhost";
$db_glob = "phpquiz";
$un_glob = "phpquiz";
$pw_glob = "phpquiz";
$link_glob = mysql_connect("$host_glob", "$un_glob", "$pw_glob");
$webmaster = "[EMAIL PROTECTED]";
?>
--script (globals.inc.php)--
--script (register_user.php)--
<?php
session_start();
require("globals.inc.php");
require("layout.fnct.php");
html_header("Register a New User", "Enter Information");
/*--------------------*/
if ($fname && $lname && $email && $username && $password && $vpassword) {
if ($password != $vpassword) {
echo "<font size = +1 color = \"#FF0000\">Your passwords do
not match,
please try again</font><br>";
} else {
if (!$link_glob) {
echo "<font size=+1 color=\"#FF0000\">You could not
connect to the
database.<br>Please contact the <a
href=mailto:$webmaster>webmaster</a>.<br><br></font>" . mysql_errno() .
": " . mysql_error() . "<br>";
} else {
if (!mysql_select_db("$db_glob", "$link_glob")) {
echo "<font size=+1 color=\"#FF0000\">The
Database could not be selected<br>
Please contact the <a
href=mailto:$webmaster>webmaster</a>.<br><br></font>" . mysql_errno() .
": " . mysql_error() . "<br>";
} else {
$table_user = "user";
$query = "INSERT INTO $table_user values('0',
'$fname', '$lname', '$email',
'$username', PASSWORD('$password'))";
$result = mysql_query('$query', '$link_glob');
if (!$result) {
echo "<font size=+1
color=\"#FF0000\">Your Information could not be entered
into the database.<br> Please contact the <a
href=mailto:$webmaster>webmaster</a>.</font><br><br>" . mysql_errno() .
": " . mysql_error() . "<br>";
} else {
echo "<font size = +1
color=\"#0000FF\">Your Information has successfully been
entered into the database!</font><br>";
echo "click <a
href=\"manage_account.php\">here</a> to change your personal
options and to add your first quiz!";
html_footer();
exit;
}
}
}
}
}
echo "<font size=+1>Please enter the required information</font>";
echo " <form method=post action=register_user.php>
Name: <input type=text name=fname size=10 maxlength=10>
<input type=text name=lname size=20 maxlength=20><br>
Email: <input type=text name=email size=30 maxlength=100><br>
UserName: <input type=text name=username size=16
maclength=16><br>
Password: <input type=password name=password size=8
maxlength=8><br>
Verify Password: <input type=password name=vpassword size=8
maxlength=8<br><br>
<input type=submit value=\"Register\"><input type=reset
value=\"Clear\">
</form>";
/*--------------------*/
html_footer();
?>
--script (register_user.php)--
--
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php