Search results

  1. as4s1n

    Ajax confused

    Thanks it works perfectly now ^.^ i have one more question... about the (===). i never use it right for some reason, is it just like the = & == or is there some special condition you have to do b4 it works?
  2. as4s1n

    Ajax confused

    Hmm, i've never heard of mysql_real_escape_string(); and i've never used the strictly equal to (===) successfully b4 o.O and apparently thats not the problem o.O i think it might be my js function checkUsername() { request = createRequest(); if(request == null) { alert("unable to...
  3. as4s1n

    Ajax confused

    so something like... $username = $_REQUEST['username']; $query = "SELECT * from users where login = '$username'"; $result = mysql_query($query); if(mysql_num_rows($result) == '0'){ echo "Available"; } else { echo "Unavailable"; }
  4. as4s1n

    MySql server name?

    Yea, i had the same trouble too when i first joined
  5. as4s1n

    MySql server name?

    The host name is localhost i.e. $con = mysql_connect('localhost','username','password');
  6. as4s1n

    Ajax confused

    I'm experimenting a little bit with Ajax and i'm trying to get an asynchronous login that checks the name when the user leaves the field (onblur). I'm totally lost, the ajax is fine but i'm trying to get the php page with the usernames on it working... $query = "SELECT login from users"...
  7. as4s1n

    Upload path for images

    oh sorry, if(!empty($image)){ $target = DC_UPLOADPATH . $image; } else { $target = ''; } i define the uploadpath in this if/else statement to check if there was an image or not Anyway... Whenever i test the send in and i go to my next page to send it in, it always turns up blank...
  8. as4s1n

    Upload path for images

    well the define() is basically an array, a long way to put $var i define('variable','value'); then i refrence it in any other statement echo "uploadpath: ".variable." ";
  9. as4s1n

    Upload path for images

    Well the way i learned how to do it was define('DC_UPLOADPATH','foldername'); if(move_uploaded_file($_FILES['screenshot']['tmp_name'], $target)){} but thats just how i learned it.
  10. as4s1n

    Upload path for images

    Ok, so i'm hosting a site contest to get a new banner for my site, cuz i want to get the people involved. I'm using define('DC_UPLOADPATH','images/Banner_contest'); what would be the correct upload path if i want to put it in images/Banner_Contest folder?
  11. as4s1n

    How do i connect to MySQL?

    I'm having a little trouble connecting to my MySQL database, i'm not sure what the server name is if i connect from the public_html folder. And am i supposed to use my login from this site as my username or one i create in my database?
Top