Jump to content


  • Posts

  • Joined

  • Last visited

About ChidoriSoul

  • Birthday 08/20/1980

Previous Fields

  • Languages
    HTML, Javascript, PHP, AJAX, jQuery, SQL, and Python

Contact Methods

  • Website URL
  • ICQ

ChidoriSoul's Achievements


Member (2/7)



  1. I'm not like super bad as having no experience at all, I do have some experience using Javascript for Proxy Blocking, javascript stopping, etc. I just didn't know how to "move" an image/slide an image across a div/background image.
  2. Thats the thing, I'm pretty basic with Javascript, I was just hoping someone will give me something to start with, as I have previously stated, I am bad at Javascript.
  3. So, as of now, I'm trying to make a Javascript map so that a character image can be placed on it, and the person who is controlling the character can use their arrow keys to navigate through the map. I've heard this can be done, but if at any possibilty, is it possible to make it so that some parts of the "map" image can not be put on, like a house or something.
  4. EDIT: Nevermind, I fixed it.
  5. Well, accoreding to JSG's advice, it was true, in the net tab, the page was loading twice. Now, I have no idea how to fix this, anyone have any ideas?
  6. Its nothing to do with the database, as I empty the users table before each test, but the error I previously stated was that:It inserts the user, but then says that the name is already in use. What my main concern is how to got through the scan, inserted, but then went through again, giving the error.
  7. I did what you said, boen_robot, but it still says that the name is in use. $q1 = mysql_query("SELECT * FROM `users` WHERE `name`='$User'");$c1 = mysql_num_rows($q1);$query3 = mysql_query ("SELECT * FROM `users` WHERE `email`='$Email'");$result3 = mysql_num_rows($query3);if($c1 >= 1) {echo "This name is already in use.";}elseif($result3 >= 1) {echo "This email is already in use.";} I think it may be something with my AJAX :/
  8. No, either of your methods did not work, and I do the ".$var." because I was taught to "escape" the variable to make it function easier in queries and echos.
  9. Alright, so I'm doing a pure dynamic AJAX site, and i've been on a register script for 2 days now, and for some reason, something about it makes it weird.The Script: <?phpsession_start();require('require/connect.php');require('require/clean_code.php');$name = safe($_GET['user']);if(isset($_GET['user'])) {$pass = safe($_GET['pass']);$email = safe($_GET['email']);$gender = safe($_GET['gender']);$class = safe($_GET['type']);if($name=='') {echo "Please enter a name.";}elseif($pass=='') {echo "Please enter a password.";}elseif($email=='') {echo "Please enter an email.";}elseif($gender != "Male" && $gender != "Female") {echo "Please choose a legit gender.";}elseif($class != "Warrior" && $class != "Mage") {echo "Please choose a legit class.";}else {$q = mysql_query("SELECT * FROM `users` WHERE `name`='".$name."'");$c = mysql_num_rows($q);$q1 = mysql_query("SELECT * FROM `users` WHERE `email`='".$email."'");$c2 = mysql_num_rows($q1);if($c > '0') {echo "This name is already in use.";}elseif($c1 > '0') {echo "This email is already in use.";}else {$pass2 = sha1($pass);mysql_query("INSERT INTO `users` (`name`, `pass`, `email`, `type`, `gender`) VALUES ('".$name."', '".$pass2."', '".$email."', '".$class."', '".$gender."')") or die(mysql_error());echo "You have successfuly registered, ".$name.".";}}}else {?><head><script type='text/javascript' src='require/jquery.js'></script><script type='text/javascript' src='require/main.js'></script><script type='text/javascript'>function function1() {var user = window.document.reg.user.value;var pass = window.document.reg.password.value;var email = window.document.reg.email.value;var gender = window.document.reg.gender.value;var class = window.document.reg.class.value;var url = "reg.php?user=" + user + "&pass=" + pass + "&email=" + email + "&gender=" + gender + "&type=" + class + "";loadlink(url);}</script></head>TestRegister<form name='reg' onsubmit='return function1();'><table width='98%' style='border: 1px solid black;' valign='top' align='center'><tr><td width='30%' style='border: 1px solid black;'>Username</td><td width='70%' style='border: 1px solid black;'><input type="text" name="user"></td></tr><tr><td width='30%' style='border: 1px solid black;'>Password</td><td width='70%' style='border: 1px solid black;'><input type="password" name="password"></td></tr><tr><td width='30%' style='border: 1px solid black;'>Email</td><td width='70%' style='border: 1px solid black;'><input type="text" name="email"></td></tr><tr><td width='30%' style='border: 1px solid black;'>Gender</td><td width='70%' style='border: 1px solid black;'><select name="gender"><option value="Male">Male</option><option value="Female">Female</option></select></td></tr><tr><td width='30%' style='border: 1px solid black;'>Class</td><td width='70%' style='border: 1px solid black;'><select name="class"><option value="Warrior">Path Of Swordsmen</option><option value="Mage">Guidance Of Magician</option></select></td></tr><tr><td width='30%' colspan='2' style='border: 1px solid black;'><input type='submit' name='submit' value='Register!' onclick='function1();'></td></tr></table></form><?php}?> If you tried this, it would be successful, but it would say that the username is already registered, so it really lies. Can someone point out the error on this AJAX/PHP?
  10. Never mind, it was one of my codes that was redirecting.
  11. There is no way, you have to hold the user information somewhere to tell your site which user is which, but don't use cookies, they are very easily hackable and can lead to scammers getting account information without passwords, which is why I say use sessions.:]
  12. So, I have my site.It recently got hacked so it redirects to the index page no matter which page you go toI finally sorted all of that out, and it took me like 2.5 hours.I then realized that I had not put session_start() on my starting template page.I put it there and update, and it comes back, so I remove it, and the site is perfectly fine, so has anyone else had a problem like this, and does anyone know how to fix it?My site is here.
  13. So the better way would to be to use both?
  14. Just making some security for my site, and wondering which way is better, htmlspecialchars or mysql_real_escape_string, or both?
  15. Ok, thank you, the error is now gone, but what I am really looking for is how to get the ending there so it gives each user a specific profile.
  • Create New...