The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
user authentication
ok so I'm still pretty fresh to php and MySQL, but I want to do a few things and I'm a little uncertain of a few things so firstly
In this little piece of script, when the database is queired, does username and password need to match for a value other than 0 to be stored in $num.... Also I see the variable $valid all over the plave in tutorials. I've seen it equal tons of things among which are.....good, ok, bad, valid, no. So my second question-isthe variable $valid a special variable or do people just use it and assign whatever values they want for easy use later on....what would be the benifit of this? Thanks PHP Code:
Also...does anyone know what PHP Code:
|
#2
|
|||
|
|||
When mysql returns the number of rows, if the username and password both match there will be 1 row. Otherwise no results are returned so the result is 0 So yes, the username and password need to match for 1 to be returned.
$valid is just a variable people use, nothing special about it, it's just convenient. The last piece of code you have there is the HTML meta tag which redirects (or refreshes) a page. The one you have above waits 1 second (CONTENT=\"1\") then redirects the user to index.php in case you're wondering about the backslashes \ they are there to 'escape' the quote marks " which would confuse PHP (as it's being echo'd out). It looks like this once it's been echo'd: <META HTTP-EQUIV="Refresh" CONTENT="1; URL=index.php"> |
#3
|
||||
|
||||
cheers....I thought as much but I wasn't certain thanks for the help
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|