[PHP/MySQL] Login and Register codes

Joined
Dec 4, 2007
Messages
1,935
Reaction score
96
I want a nice splash page for my forum, and on it have a login and register, to login/register to the forum.

Can someone tell me a code to make you login or register to a certain MySQL database? In the code where the MySQL goes just right MYSQL HERE or something, please.
 
are you trying to login with like a login and password from a table or trying to login to mysql with a script?
if your trying to mysql login.
PHP:
<?php
if($_POST['submit']) {
mysql_connect("$_POST['host']", "$_POST['user']", "$_POST['pass']") or die(mysql_error());
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Host:<input type="text" name"host"><br>
Username:<input type="text" name="user"><br>
Password:<input type="password" name="pass"><br>
<input type="submit" name="submit" value="Submit">

just a quick script i just wrote.
 
Back