Jump to content

laron

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

laron's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just wondering if there is an easy way to do this. I'm trying to find the "true" boolean in a table column (there will only be one), trigger it to false and trigger the next row's same column to true, while grabing that newly triggered column row's id. Example: Table Users id name phone special 1 name1 1234 false 2 name2 1235 false 3 name3 1236 true 4 name4 1237 false 5 name5 1238 false So... I need to find the row that has has the "special" field set to true, change it to false, change the next row's "special" field to true and get that row's id to store into a variable. If this makes sense, what is the easiest way to do this (after a successful connect to the database). If it doesnt, what more information do you need?
  2. hey, i'm wondering how I can pull a specific query from a mysql database and store it in a php variable. how can i go about doing this? thanks.
  3. i have a logout link on my (portal page, once your logged in) to a php script with the following code: (this should destroy the sessions and log them out) <?php session_start(); session_destroy(); header("Location: http://site/login/index.php"); ?> and when after it directs you back to the login page, all you have to do is hit the back button on your browser and it will bring you back to the portal you were just at(logged in). is something going wrong with the sessions being destroyed? or is this what is sapposed to happen?
  4. thank you, thats what i needed
  5. say a nonmember knows a page with in the site that should be restricted ex. main.php and they enter that in as the url ex. www.site.com/main.php what restricts them from viewing it?
  6. and how is that going to restrict nonmembers
  7. i only want to do that on the first page, and then check for the session on the rest... right?
  8. hello, I need a little advice or help using sessions.(I am trying to create a login page.) Anyway to my understanding(correct me if im wrong) we create a session with session_start(); that session id is stored on the server for later use,(unless the window is closed) and obiously end a session with session_destroy(); My question is when I am checking the database for the user's username and password, and the info is correct I want to start a session(right?). When I start a session are there any parameters that I can set with in session_start() that I would check later to grant access to a "members" page? If so how can I check if that session has been started. thanks Aswell, when I check for a session that has been started, I will grant them access, else send them to a login page, right.?
  9. nevermind, figured it out... thanks for the code(i made some errors changing it to fit my database) thanks and solved
  10. Hey, quick question(hopefully), how can i check for duplicates in a database. For instance, checking for already registered users, etc. thanks
  11. i would increase your understanding of html, since you'll be creating form's and what not. and then just search google for php tutorials, or even better read the tutorials here on phpfreaks. understand the concept of object orientated programming, and how everything works together using variables, sending data from html forms etc. just keep reading, and learning.
  12. what is the php function to store it as a timestamp in mysql? what ill the "outcome" looklike, and how will i check it. what kind of variable is the timestamp stored as, int? i guess i dont understand what the timestamp will output to be ex.20070429 and check it if date_now>20080429? or... (stupid q?)
×
×
  • 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.