No errors on that line. Post lines before and after this line.
I promise no-one will steal your code... And if they do, then you can just be glad you are contributing to this little community. Just like you want someone to do for yourself.
No errors on that line. Post lines before and after this line.
I promise no-one will steal your code... And if they do, then you can just be glad you are contributing to this little community. Just like you want someone to do for yourself.
BTW, no reason to double post.
PHP Code:
<?php
// Check if he wants to register:
if (!empty($_POST[username]))
{
// Check if passwords match.
if ($_POST[password] != $_POST[password2])
exit("Error - Passwords don't match. Please go back and try again.");
// Assign some variables.
$date = mktime("d - m - Y");
$ip = $_SERVER[REMOTE_ADDR];
require_once("connect.php");
// Register him.
$query = mysql_query("INSERT INTO members
(username, firstname, lastname, password, date, ip)
VALUES ('$_POST[username]','$_POST[firstname]','$_POST[lastname]','$_POST[password]','$date','$ip')")
or die ("Error - Couldn't register user.");