Bertuliinii Posted January 17, 2008 Report Share Posted January 17, 2008 <? $playername = $_POST['playername']; $xp = $_POST['xp']; $ip = $_SERVER['REMOTE_ADDR']; $id = "6"; include('config.php'); $check = mysql_query("SELECT username FROM war3users WHERE username='$playername'"); $register = "INSERT INTO war3users ( playername, xp) VALUES('$playername', '$xp')"; mysql_query($register) or die(mysql_error()); mysql_close(); echo "COMPLETED!"; //header('location: index.php'); ?> Kas sajaa kodaa nepareizs ? Kad meegjinu pieregistreet man paraada Duplicate entry for '0' for key 1 Link to comment Share on other sites More sharing options...
Kavacky Posted January 18, 2008 Report Share Posted January 18, 2008 Tajā kodā, ko tu parādīji, viss ir pareizs. Link to comment Share on other sites More sharing options...
sroupe Posted January 18, 2008 Report Share Posted January 18, 2008 jā drīzāk pie pašas formas kkādus šitus būsi pielīmējis, jo kā redzu arī šajā pašā kodā kkādi nevajadzīgi šiti stāv prost nodefinēti, bet nekur netiek izvadīti Link to comment Share on other sites More sharing options...
*jancis38* Posted January 18, 2008 Report Share Posted January 18, 2008 varbūt kko db esi nojājis? Link to comment Share on other sites More sharing options...
Bertuliinii Posted January 18, 2008 Author Report Share Posted January 18, 2008 Formas(form) skripts ! <html> <head> <title>Expirience registration</title> </head> <body> <center> <form method="post" action="add.php"> <table border="1"> <tr><td>Niks</td><td><input type="text" name="playername"></td></tr> <tr><td>XP</td><td><input type="text" name="xp"></td></tr> <tr><td></td><td><input type="submit" value="register"></td></tr> </table> </form> </center> </body> </html> Link to comment Share on other sites More sharing options...
sroupe Posted January 18, 2008 Report Share Posted January 18, 2008 exportee war3users db, un ieposto, ieksh formas viss norm Link to comment Share on other sites More sharing options...
Bertuliinii Posted January 18, 2008 Author Report Share Posted January 18, 2008 Es nemaaku , Pirmo reizi skriptu taisu ! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now