Jump to content

guitarist809

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

guitarist809's Achievements

Member

Member (2/5)

0

Reputation

  1. lol, bump is a statment that means "My topic is falling in the list of other topics, i wanna make it first again" bump also like "Bump, its at the top now "
  2. I'm just trying to do something similar to what PhpBB does (with theyre "Keep me logged in forever" option). And this site isn't public, its for my family and i know that we all accept cookies on our pc's (so that's not much of an issue)
  3. JavaScript Cookies ?? But I would Suggest You Dont Use Cookies Use Sessions Its Much more Simple and also more secure. I did use sessions, but they would self-terminate when I closed out of my browser. With cookies you can set a delete time. /* set the cache expire to 30 minutes */ session_cache_expire(30); $cache_expire = session_cache_expire(); you can change the max lifetime for a session with the function ini_set(). <?php ini_set("session.gc_maxlifetime", "18000"); ?> That code did'nt do anything As soon as I exit my browser and start it up again i still have to re-authenticate
  4. Still does nothing. I think that setcookie() isnt doing anything becides returning true...
  5. JavaScript Cookies ?? But I would Suggest You Dont Use Cookies Use Sessions Its Much more Simple and also more secure. I did use sessions, but they would self-terminate when I closed out of my browser. With cookies you can set a delete time.
  6. Basically it goes as follows: login.php => input username/password into a form. Submit form login.php => Make sure username/password is valid w/ mysql database. if it is, set two cookies (username and password) and do header('location: main.php'); main.php => check cookies ($_COOKIE['username'], $_COOKIE['password']) - make sure those are set. (They wern't so I did a print_r to see what was in $_COOKIE, but nothing was there... main.php => if no cookies are set (or cookies contain invalid information)... header('location: login.php'); Hope that helps with my prob...
  7. Yea I saw that. I refreshed the page w/o the setcookie function and still didn't see the cookies =\. Just the PHPSESSID...
  8. Hello, I'm trying to set two cookies on my site, containing a username and password so I can retrieve them for later use This function doesn't set any cookies i give it function session_init($username, $password) { setcookie("tripdb_username", $rs['username'], time()+3600); setcookie("tripdb_password", $rs['password'], time()+3600); echo "cookies set!"; echo "<pre>"; print_r($_COOKIE); I'm using the print_r to show all cookies, all it shows is a PHPSESSID Why isn't this working?
  9. Wow! I guess your "Super Guru" title is correct. Thx for the help ^^ [solved]
  10. Hello, I've got about 45 php files in about 4 different directories. The way I've always counted the lines of code I've written is by opening every file up and going to the very last line and adding it to a sum of all the other files. Is there a way to calculate this in PHP (like go into every directory, upload every file, and count the lines that way)? I don't want to use a program that's already made (im trying to display the lines of code on a statistics page on my site) Any help will be greatly appreciated, Thanks, Matt N
  11. well yea, i was doing pseuidocode basically I'm trying to update every row's comments with replacing all <br>'s with \n's
  12. Hello everybody. I'm trying to do a "mass update" in a table of mine the structures is as follows id, name_id, location_id, comments. Before, i used to have to manually enter <BR> for a newline (in the comments), but i just found about nl2br(). Is there a query i can do to update all the text in the comments field (for every row) to replace any <br>'s with \n's? UPDATE table SET comments=REPLACE('<br>', '\n') WHERE 1 Thats what I'm trying to do... Any help would be greatly appreciated, Thanks, -Matt
×
×
  • 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.