
-----------------------------------
TheLastFall
Thu Oct 26, 2006 6:55 pm

Saving PHP Data
-----------------------------------
Okay, obviously I need help. I need to know how to save a Username and Password and I need to be able to read it and see it it is correct. I'm probably going to get flamed for this topic. I've just recently started to learn PHP so I'm new to it. I have learned how to get a name and password but not how to save it.
So far this is how I get the Username and Password:




Username:
  

  Password:
  
 


 
 


Am I going to be needing arrays in this because I've read them over and I do not understand how to do anything.
This is what my arrays look like:




range(0,count($cred) - 1) returns an array containing 0,1,2,3,4...all the way to original array length -1

$cred[] just adds a new element to the existing array. you could write this as $cred[count($cred)]

-----------------------------------
TheLastFall
Fri Oct 27, 2006 5:31 pm


-----------------------------------
Okay, Octopi I've tried your code and I have a slight problem with it. Okay, say I want to have one page that you enter your username and password and if its right you want it to go to another page and if it's wrong you want it to say "Invalid username/password" above the check box.
How could I mod this so it would be like that.


Username:
 
 Password:
 




