You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

register.php 1.1 KiB

10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
1234567891011121314151617181920212223242526272829
  1. <?php
  2. include "header.php";
  3. connecte("ecomonde");
  4. $pseudo=$_POST['pseudo'];
  5. $pass=sha1($_POST['password']);
  6. $email=$_POST['email'];
  7. $hash=md5($email);
  8. $check_email=requete1l("SELECT * FROM membres WHERE email='$email'");
  9. if ($check_email) {
  10. header("location:index.php?msg=2");
  11. }
  12. else {
  13. $sql="INSERT INTO membres VALUES(NULL,'$pseudo','$pass','$email')";
  14. mysql_query($sql) or die("ERREUR !");
  15. mkdir("medias/".$hash."/");
  16. mkdir("medias/".$hash."/enemy/");
  17. copy("medias/default/index.php", "medias/".$hash."/index.php");
  18. copy("medias/default/player.xml", "medias/".$hash."/player.xml");
  19. copy("medias/default/enemy.xml", "medias/".$hash."/enemy/enemy.xml");
  20. copy("medias/default/map.jpg", "medias/".$hash."/map.jpg");
  21. copy("medias/default/soft.mp3", "medias/".$hash."/soft.mp3");
  22. copy("medias/default/tonic.mp3", "medias/".$hash."/tonic.mp3");
  23. copy("medias/default/hard.mp3", "medias/".$hash."/hard.mp3");
  24. copy("medias/default/light.mp3", "medias/".$hash."/light.mp3");
  25. copy("medias/default/dark.mp3", "medias/".$hash."/dark.mp3");
  26. header("location:index.php?msg=1");
  27. }
  28. ?>