Jump to content

Toy

Members
  • Posts

    98
  • Joined

  • Last visited

Everything posted by Toy

  1. Toy

    stuck!!!

    Yes, I have a connection to the database put thanks for your input, I'll try it out. :-)
  2. Toy

    stuck!!!

    I'm sorry, I don't want to be annoying or anything but you guys see what it's supposed to do right? I just want someone to try and clean it up as it doesn't seem the work, it doesn't perform what it should. :S, sorry again, it's just, >.<.
  3. Toy

    stuck!!!

    <?php if(!isset($_SESSION['logged_in'])) { $_SESSION['logged_in'] = false; } if($_SESSION['logged_in'] == false) { if($_SERVER["REQUEST_METHOD"] == "POST") { $username=mysql_real_escape_string($_POST['username']); $password=mysql_real_escape_string($_POST['password']); $password2=md5($password); $sql = "SELECT * FROM users WHERE username='$username' and password='$password2'"; $result = mysql_query($sql); $count = mysql_num_rows($result); if($count==1){ $_SESSION['logged_in'] = true; echo '<meta http-equiv="Refresh" content="0; url=profile"> '; } else { echo 'Sorry! Incorrect...'; } } } else { echo 'Hello '.$result[username].'The stuff you want to see! '; } ?> I basicly just wanna make the user login and then show "hello, whatever your username is, the stuff you want to see", you get it. but something allways goes wrong, could someone help me with the code :s
  4. Toy

    hey guys!

    okay, sorry dawg, currently trying out my own method to do this and so far everything is doing great, just need help with a short line; if value exists in table proceed loading the page, if it doesn't redirect to choosen page. having kidna trouble doing this, sorry I'm not that great. $_GET['code'] = $invite; if(mysql_num_rows(mysql_query("SELECT invite FROM invite WHERE invite = '$invite'"))){ echo 'awesome!'; } else { echo 'asdasdasdasd'; } doesn't seem to work
  5. I don't know if this is the right section or whatever, sorry! But I would like to make a fairly simple private invite system, does anyone know of some not to hard tutorials on this matter? Sorry, tried Googling but I really wasn't able to find much...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.