Thread: MYSql Quering
View Single Post
Old 12-03-2002, 03:11 PM   PM User | #8
Golden_Eagle
Regular Coder

 
Join Date: Jul 2002
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Golden_Eagle is an unknown quantity at this point
Quote:
Originally posted by mat
o.k so you want to have a sort of universal password right? (one password for all)

some fonts are free to d/l but some require a pass, and that is just one universal pass yeah?

Almost!

The password for the font will be different in the field the query is looking for. (If possible)

This is what I came up with -

I have been looking at PHP for months now (about 5), but if seems that no matter how long I try. I cannot seem to get to grips with it!

This may seem like a bad way of showing an example.
But it's the best way I can do it, seeing as PHP is proving to be a little over my head!

HERE GOES!

//START WITH A MYSQL QUERY OF DATABASE
$password = $pafiledb_sql->query($db, "SELECT * FROM $db pafiledb_files WHERE file_password > ''", 1);


// IF PASSWORD FIELD HAS A WORD IN DATABASE
if $password == ("yes") {
// LOAD WORD FROM 'file_password' & LOAD SOMESORT OF FORM HERE ASKING FOR THE WORD IN FIELD
<FORM> BLAH BLAH (With just ONE textbox for password only (NO USER) & a submit button).</FORM>
}

// IF PASSWORD FIELD IN DATABASE IS EMPTY
if $password == ("none") {
// GO DIRECT TO NON-PROTECTED DOWNLOAD
}

//FORM PROCESSED
else {
$password == ("incorrect")
// JAVASCRIPT HISTORY(GO BACK -1) TO FILE DETAILS
}

//FORM PROCESSED (CORRECT PASSWORD)
else
}
if $password == ("correct")
// GO DIRECT TO PROTECTED DOWNLOAD
}

I hope this explains it a little more simpler.
And that is actually possible to do.

Thanks for helping.

Anyone know of any GOOD places to learn PHP & MySQL?

I can't stand reading books. I prefer to read online if possible. Although if book is the best option. So be it!
Golden_Eagle is offline   Reply With Quote