Jump to content

hotdog1983

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hotdog1983's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you for the replies. I'll go look into table linking. Both of you recommended keeping all the pageview data instread of deleting them, I was just worried if it's going to slow down the server when the database gets big. But it's better if I can keep them. @The Little Guy, I don't understand that method. If I make 3 columns like that, would I be able to put more than 1 data into the page column? Sorry if I got it wrong.
  2. Hi, I have a mysql table like this ----------------------------------------------- UserID Email Joined Country ----------------------------------------------- Justin [email protected] 110815 USA ----------------------------------------------- What I want to achieve is to keep the 5 recent pages viewed by each user. For example, --------------------------------------------------------------------------------------------------- UserID Email Joined Country Act5 Act4 Act3 Act2 Act1 --------------------------------------------------------------------------------------------------- Justin [email protected] 110815 USA 8.php 6.php 5.php 3.php 1.php --------------------------------------------------------------------------------------------------- So only the 5 recent pages are inserted and when the user views the 6th page, the oldest record gets dropped and the 4 last pages moves to the right by 1 column. --------------------------------------------------------------------------------------------------- UserID Email Joined Country Act5 Act4 Act3 Act2 Act1 --------------------------------------------------------------------------------------------------- Justin [email protected] 110815 USA 8.php 6.php 5.php 3.php --------------------------------------------------------------------------------------------------- And then the last viewed page gets inserted. --------------------------------------------------------------------------------------------------- UserID Email Joined Country Act5 Act4 Act3 Act2 Act1 --------------------------------------------------------------------------------------------------- Justin [email protected] 110815 USA 11.php 8.php 6.php 5.php 3.php --------------------------------------------------------------------------------------------------- I know how to use php to take the page name value to mysql query but I don't know how to use the SQL commands to do this. Does anyone know how to do this? or is there a better way to do it? Some help would be great, thank you.
  3. Thanks for your reply. I'm in a hurry to finish a site and I actually got that code from watching a Youtube PHP tutorial clip. I thought that the code itself must be correct. After struggling for a few hours, I've come up with this. $query = mysql_query("SELECT * FROM users WHERE username='$username' and password='$password'"); It works as I wished and I hope this one is properly coded. Please advise me if it's not. Thank you!
  4. Thank you for your answer. No, I'm getting wrong password error. When the username and password in the database are abc and abc I can login with abc/abc but not with ABC/abc, abc/ABC, or ABC/ABC.
  5. Hi, I'm making a login page and I want to allow users type in case-insensitive username and password. I'm using utf8_general_ci collation. Here's my PHP code. $username= $_POST['username']; $password = $_POST['password']; if ($email&&$password){ $connect = mysql_connect("localhost","root","") or die("Couldn't connect to the database"); mysql_select_db("nemo") or die("Couldn't find the database."); $query = mysql_query("SELECT * FROM users WHERE username='$username'"); $numrows = mysql_num_rows($query); if ($numrows!=0) { while ($row = mysql_fetch_assoc($query)) { $dbusername= $row["username"]; $dbpassword = $row["password"]; } if ($username==$dbusername&&$password==$dbpassword) { echo "Logged in"; } else echo "Wrong password." } else die("Username not found."); } else die("Enter your username and password."); After doing some search, I found that collation ending with ci means case insensitive. But I can't log in with ABC if the username in database is abc. I know I can use strtolower to make everything to lower case but I'm really curious why this happens. Thank you.
  6. This is a bit off topic but I'm asking in this board because there are lots of computer geniuses here. I'm trying to get a direct link to a media file on a media storage site. On this website, instead of letting me download the file on the browser directly, it lets me install a small pop-up downloader program (ActiveX maybe?) and download files though it. I tried URL snooper and Wireshare but still could not get any links. URL snooper gives me something like this. http://www.nuripop.com/contents/contents_chk.php?dmethod=C&idx=437304 http://www.nuripop.com/contents/contents_download_start.php?dmethod=C&idx=437304&downkind=0 http://216.151.177.131/function.fopen http://nuripop.com/fs_prg/activex/XBoomUpDown_axn71106.cab#version=1,1,0,6 Is there any way that I can find the link? I'm pretty sure that there must be a link since it comes into my computer. Thank you very 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.