Jump to content

passingTime

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

passingTime's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm looking at the premade login script u sent me. It's using keys which i haven't learned to do yet... Way more secure than what i would have made. Gonna send you my email, hope you can still it to me
  2. I'm fine with building a secure form. I just want to remove the login form if someone is logged in. Like on this forum for example, the login is at the top left but once u log in it's replaced with something else.
  3. Everything is still very simple. Right now i'm just using this: <?php session_start (); $username = $_POST['username']; $password = $_POST['password']; if ($username && $password){ $connect = mysql_connect("localhost","root","") or die ("Couldn't connect!"); mysql_select_db("phplogin") or die ("Couldn't find the DB"); $query = mysql_query ("SELECT username && password FROM users WHERE username='$username'"); echo "hello"; } else echo "no username";
  4. Ok So i have a simple login i'm testing with. Which simple is: <form action='login.php' method='post'> <input type="text" name="username" /><br> <input type="password" name="password" /><br> <input type="submit" value="Log in" /> </form> I want this only to show if the user is logged in. If not I want something else shown. Not sure how to do this though. So it'll end up as something like (i think): if(isset($_SESSION['username'])) { echo "welcome"; } else *display the login form* Not sure how to do this though :s
  5. Hi everyone, I've gotten a login setup on a site and it displays somewhere on every page. What i am trying to do is when someone logins I would like it to be switched to a little control panel showing your name and other things that i am able to setup. I'm just not sure how to switch them, maybe this will help you get an idea of what i mean: if (logged in) { show control panel } else show login Must i use javascript for this?
  6. Oh wait i made a mistake somewhere else but yeh that does actually work lol.
  7. Ok thanks i think i'll look into PHP and SQL a little more...
  8. Not something you solve i'm just asking if you can use OR statements and if so how.
  9. It works without the OR statement but i'm not sure how to use OR statements like this. So is that how you usually do it?
  10. Hello, Is there anyway to filter a recordset using an OR statement? for example: "SELECT * FROM DB1 WHERE example = %s" can i make it so it filters by 2? So something like: "SELECT * FROM DB1 WHERE example = %s or example2 = %s"
  11. Helo, I am trying to send 2 values from a form textfield into one SQL table field. So in the text field i insert A and B and both are sent to the field as different values. If this is not possible I would love to know a better way of doing it :S Thank you
×
×
  • 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.