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
How to add advertisment on top of videos
Hello,I was told that i should find the answer for this problem in this forums.I searched a lot but i couldnt find the solution .What i need to do is to add ads on top of the videos i have
Auto-populating dropdowns and multiple forms.
Here's what I have so far:First drop down = select a state (works)This populates the second drop down (works)Second drop down = select a city (works)This populates the third drop down with local
Count on multidimensional array
Hi, i got an array as below:Array( => Array ( [2009-12-08] => 1 ) [1] => Array ( [2009-12-07] => 1 ) [2]
Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...On first.php I have one input field NAME, and on posting the form it moves to "second.php" showing the entered value of input field using $_POST,
My query is being run with no results.
I have this.Code: function DropUser($duser_id, $user_email, $user_username) { if(isset($_SESSION['admin_username']) && isset($_SESSION['admin_id']) &&
Just cannot get 'area' to submit to db using same php code as already used
Basically all i have done is just modified some code and added an area section.The form is allready submitting other things like location price etc.And i have simply added a field in db called area
List/Menu Box
On an edit page when you want something to select what a user has previously selected from the database, how would you do this for a List/Menu box? The only way I know how is Code: <?php echo
How to file_get_contents when login required?
Hello!I am trying to read data from a page that you have to be logged into to view, I am trying to use file_get_contents to do this, I have read that I need to use cURL, Is that true?Also, as Another
Save remote XML to local website folder
Hi, I hope you can help me out. I would like to be able to pull an XML file from another site and then store it in a local folder on my site. That way, I would only need to pull the xml file once in
CURL question
i am wondering if it's possible to use multi curl with login something likelogin once to website and after that use multi curl to download several pagesthank you