[PHP/MySQL] Login and Register codes

Canadian
Loyal Member
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.
 
Canadian
Loyal Member
Joined
Dec 4, 2007
Messages
1,935
Reaction score
96
if you're not answering my question, please don't post.
 
Junior Spellweaver
Joined
Dec 2, 2006
Messages
198
Reaction score
0
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
Top