JoJo2000
08-12-2002, 06:48 PM
:confused: I'll take anyones help. I'm only 12, but i have my own website i'm making. I'm really confused with how to make a login. So that they sign up and are added i nto the server. I also don't know how to get a server.
Would this code work:
<html>
<head>
</head>
<body bgcolor=#ffffff>
<?
if(isset($UserName) && isset($password) && isset($hometown) && isset($age) && isset($email) && isset($start_city)) {
$dbhandle = @mysql_connect("localhost", "dbusername", "dbpassword") or die("Unable to connect to database at this time");
mysql_select_db("databasenamegoeshere", $dbhandle);
$query = "INSERT INTO pregame VALUES ('$UserName','$password','$hometown','$age','$email','$start_city')";
if (mysql_query($query)){
echo "<p>$UserName was added to the database</p>";
}
}
?>
<h1>regester</h1>
<form method="post" action="<?=$PHP_SELF?>">
User Name: <input type="text" name="UserName"><br>
Password: <input type=text name="password"><br>
<input type="submit">
</form>
</body>
</html>
Thanks if you help me!:thumbsup:
Would this code work:
<html>
<head>
</head>
<body bgcolor=#ffffff>
<?
if(isset($UserName) && isset($password) && isset($hometown) && isset($age) && isset($email) && isset($start_city)) {
$dbhandle = @mysql_connect("localhost", "dbusername", "dbpassword") or die("Unable to connect to database at this time");
mysql_select_db("databasenamegoeshere", $dbhandle);
$query = "INSERT INTO pregame VALUES ('$UserName','$password','$hometown','$age','$email','$start_city')";
if (mysql_query($query)){
echo "<p>$UserName was added to the database</p>";
}
}
?>
<h1>regester</h1>
<form method="post" action="<?=$PHP_SELF?>">
User Name: <input type="text" name="UserName"><br>
Password: <input type=text name="password"><br>
<input type="submit">
</form>
</body>
</html>
Thanks if you help me!:thumbsup: