Hello,
For quite some time, I have been using functions to validate form input and access the databse. I have recently started using OOP, which is far faster and better when it comes to programming (performance aside).
My question:
How do I access the database within a specific validation class.
Example:
class validateLogin {
// Class properties
public $value;
public $msg;
public $valid = 0;
// Access database and do some stuff to check
}
I added in the "public" to show how I would get values into the class from the public variable scope. Would I do the same for the database? A problem would arise because I use a database class to access mysql. Can I have a class within another class? I could use a normal function and basic coding, but I like php classes. Thank you
Multi-user card game
I'm writing a batch of games and such. Lottery is finished, Poker,blackjack,etc are next. They will be multi-user. I've got the multi-deck shoe and dealing table done and other parts rough coded. What
Newb advice
Hi all,I'm a flash front end designer and I've taken on a project that needs some back end php.It's not completely greek to me as I write actionscript in flash which is an OO language.However... I
How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them
Extract text from string
Hi folks,I have a string that looks like this:aaaaaaaaaa: bbbbbbbbbb (ccccccccc) dddddddddddddddddddddeeeeeeeeeeeeeeeeeeeee(format can't be changed - lengths of strings will vary) and I need to
ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because the PNG image has text effects. I have an image of every letter I just don't know if this is possible
PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg" id="doLogin3" value="Login">ON FIREFOX it works finebut on
wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PHP script call exec to some mp3 encoder on my host's server. I am using a GoDaddy shared Linux
textfield unchanged
hi,i want my form to know whether its textbox is unchange or not.if($textbox == 'unchanged'){ //do this}else{ //do this}ive been searching all day , but cant find the exact solutions...
import table with dependency
Hi
Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i would like to update a particular field in my db.however no matter how hard i try to the code seem to