elliott1
New Member
- Messages
- 31
- Reaction score
- 0
- Points
- 0
i have created a script to create users see below , it runs fine and says it has registed but when going in the table it adds the username and password but its just blank:dunno:
Thanks :biggrin:
EDIT: When i changed the table it says :
ALTER TABLE `Members` ADD UNIQUE (
`ID`
)
I dont think i have done that right , thanks
Edit:
any one ????????????????????:biggrin:
PHP:
<?php
include ("config.php");
////////////////////////////////////////
////// DONOT EDIT BELOW /////////
///////////////////////////////////////
//
// Connect to server and select databse.
mysql_connect("$server", "$db_user", "$db_pass")or die("cannot connect");
mysql_select_db("$mysql_database")or die("cannot select DB");
// select the database or table?
mysql_select_db("elliott1_Members")
or die ("Could not select database because ".mysql_error());
// insert the data
$insert = mysql_query("insert into $table values ('ID INT', '".$_POST['Username']."',
'".$_POST['Password']."')")
or die("Could not insert data because ".mysql_error());
// print a success message
echo "Your user account has been created!<br>";
echo "Now you can <a href=main_login.html>log in</a>";
?>
EDIT: When i changed the table it says :
ALTER TABLE `Members` ADD UNIQUE (
`ID`
)
I dont think i have done that right , thanks
Edit:
any one ????????????????????:biggrin:
Last edited by a moderator: