Well it seems that my databases are slightly buggy. I've tried everything to resolve the problems but now i do what seems best in these situation, come here for help The login system for this is actually fully working so i'm hoping to sort the database out now.
So let me explain. I have this script which is the registration form for my site:
<center><font color="#707070">
<?php
echo"Thank you $loginname for registering on StaticFire.
An email has been sent too $email which contains your account information.
You may now use the login to the left.";
?>
</font></center>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
require 'footer.php';
?>
...ok so the problems with that are as follows:
-The id doesn't insert
-The create date doesn't either
-Neither does the warn
Oh and everyones warn level is 0 (untill i warn them )
...finally we have the actual database which shows all the members:
mysql_connect('mysql10.streamline.net',$username,$password);
@mysql_select_db($database) or die("Unable to select database");
$query="CREATE TABLE members(
id INT NOT NULL AUTO_INCREMENT,
loginname VARCHAR(20) NOT NULL,
createdate DATE NOT NULL,
password CHAR(255) NOT NULL,
name VARCHAR(40),
age INT(2),
location VARCHAR(40),
description CHAR(255),
email VARCHAR(40) NOT NULL,
warn INT
..I'm not actually going to show peoples passwords, it just shows everything at the moment for testing purposes.
Well that's just about it. I thank anyone in advance who takes the time to help with that. I know there's quite a bit there but i think it's just minor errors.
// Get posted data and turn them into variables
// Also dont replace existing variables (for extra security)
// $<field name> = <field value> ;
extract($_POST, EXTR_SKIP) ;
// Insert member
$sql = "INSERT members SET loginname='".mysql_real_escape_string($loginname)."', createdate='".mysql_real_escape_string($createdate)."'" ;
/* PUT IN THE REST OF THE FIELDS INTO THIS QUERY */
if (!mysql_query ($sql))
{
echo mysql_error() ;
exit ;
}
Hope that helps
Tell us if theres any errors.
Also the id field is a auto increment so you dont need to enter anything in it.
mysql_connect('mysql10.streamline.net',$username,$password); @mysql_select_db($database) or die("Unable to select database");
$query="CREATE TABLE members(
id INT NOT NULL AUTO_INCREMENT, loginname VARCHAR(20) NOT NULL, createdate DATE NOT NULL, password CHAR(255) NOT NULL, name VARCHAR(40), age INT(2), location VARCHAR(40), description CHAR(255), email VARCHAR(40) NOT NULL, warn INT