um a couple of questions and one issue.
Problem is I can get a user to be able to join. Nothing fancy but when i go to register.php and enter a username and password and then click submit i go to join.php. Once there nothing shows and my database is still empty. I am missing something. question is this: is it a good idead to use includes? i have a db_connect.php and auth.php(just checks for the user on each page). I might find a way to combine the two. Just wonderin if this good or bad idea.
db_connect.php
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'nope';
$dbpasswd = 'canttellyouthis';
$database_name = 'forums';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
?>
register.php
<form name="register" method="post" action="join.php">
Username: <input type="text" name="username" maxlength="20">
Password: <input type="password" name="password" maxlength="20">
<input type="submit" name="submit" value="Join">
</form>
join.php
<?PHP
include 'db_connect.php';
$username = $_POST['username'];
$password = $_POST['password'];
$today = date("m.d.y");
$time = date("h:i:s A");
echo $username . "</ br>" . $password . "</ br>" . $today . "</ br>" . $time . "</ br>";
$query = "INSERT INTO members (Username, Password, DATE, time) VALUES ('$username','$password','$today','$time');
mysql_query($query)
or die('User could not be added! ' . mysql_error());
echo "<a href='login.php'>Login</a>";
?>