Jump to content

site-spin

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

site-spin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks! I have already assigned an auto incremented id in the table and I've been looking at pagination. Can you recommend any tutorials or docs that show how to set this up?
  2. Thanks Jeffro. I'll check those out.
  3. This is my login code that is connected to my login form. <?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 database"); $query = mysql_query("SELECT * FROM users WHERE username='$username' "); $numrows = mysql_num_rows($query); if ($numrows!=0) { //code to login while ($row = mysql_fetch_assoc($query)) { $dbusername = $row['username']; $dbpassword = $row['password']; } //check to see if they match! if ($username==$dbusername&&$password==$dbpassword) { $_SESSION['username']=$username; } else echo "Incorrect password!"; } else die("That user doesn't exist!"); } else die("Please enter a username and password!"); ?> Setting it up on one page should work. I just haven't yet learned how to do that.
  4. That makes sense. Thanks. I'm new to php and still learning the best way to these things. Do you know of any resources that have tutorials or documentation on that process?
  5. @XYPH That is a viable option too. I'm just not sure how to do that either. I'm building a site for a photographer who wants his clients to be able to log in and only view photos from their session. I'm trying to figure out the best way to do this.
  6. I have created a login form on my site that directs you to a page, but how can I assign specific pages to each user. For example: when Client1 logs in they go to page A and when Client2 logs in they go to page B. I appreciate any help I can get. Thanks.
×
×
  • 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.