Search the Community

Showing results for tags 'oop'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 6 results

  1. Hi can someone explain how to create a mysql database in php using OOP prepared statements. I know how to do it with mysqli but I want to know if it can be done with placeholders and oop. a good and clear tut about is okay, but please provide a clear tut about using placeholders and prepared regarding CREATING a new database.
  2. I don't seem to get my head around the reason why the following returns TypeError: Object.values is not a function var input = '[a docs/my_pdf.pdf|here§my_class#my_id][img imgs/myimg.jpg|Alt title][g Artificial Languages][lang]HTML, CSS, Sass, SMACSS, SVG[y]7[/y][/lang][/g][p]Yes[/p]'; var RegEx = { 'tagClass': { '\§\s*(.+?)\s*[\§\|\]\#]': ' class="$1"' }, 'tagId': { '\#\s*(.+?)\s*[\§\|\]\#]': ' id="$1"' }, 'tagAlt': { '\[img.+?\|\s*(.+?)\s*[\§\|\]\#]': ' alt="$1"' }, 'tagTitle': { '\[a.+?\|\s*(.+?)\s*[\§\|\]\#]': ' title="$1"' }, 'tagSrc': { '\[img\s*(.+?)\s*[\§\|\]\#]': ' src="$1"' }, 'tagHref': { '\[a\s*(.+?)\s*[\§\|\]\#]': ' href="$1"' }, 'tagAngleBrackets': { '\[(\/?)(.+?(?=[\]]))\]?': '<$1$2>' } }; for (var tag in RegEx) { input.replace(new RegExp(Object.keys(RegEx[tag])[0], 'g'), Object.values(RegEx[tag])[0]); }
  3. http://www.comptechdoc.org/independent/web/cgi/javamanual/javaobjheir.htmlaccording to the web page give above JavaScript Dom object navigator have mime type object plugin object window object but in your site in this pagehttp://www.w3schools.com/jsref/obj_navigator.asp there is no those objects under navigator object.i want know is it mistake ormy referenced above web page(http://www.comptechdoc.org/independent/web/cgi/javamanual/javaobjheir.html) is wrong
  4. Hi everyone, I have something like more advanced problem, so I hope someone will help. No need for looking for variables and functions matches, I have good editor, and if there is any, it is because I am translating code to english. Here I have class DBobject, which contains all common database methods, but my focus is on two: public static function find_by_sql($sql) { global $pdo; // pdo connection works fine $query = $pdo->query($sql); $object_array = array(); while($row = $query->fetchAll()) { $object_array[] = static::instantiate($row); } return $object_array; } public static function instantiate($row) { $class = get_called_class(); $object = new $class; // because it can be used for users, pages... I don't wont to repeat my code foreach ($row as $attribute => $value) { $object->$attribute = $value; } return $object; } It is parent class of many classes, and I am looking in the class Comments protected static $table_name='komentari';protected static $db_fields=array(// all of my fields are here);public $id;public $user_id;// and all of database fields as variables And now, when I want to call it... $comment = Comment::find_by_sql(// here I select user based upon id); // this should return object with attributes from my database (because I returned object in instantiate function), am I right?echo $comment->content; // I exept here to echo lorem ipsum dolor sit amet.... And I get error that I called attribute of non-object $comment, aldo I returned the object in instantiate method
  5. Hello..I suggest that w3schools has a lesson concerning OOP in PHP..Coz i think it is also important in PHP programming
  6. I have been given a flash website to amend. It has a home page and videos page already done. I have to add a links page, books page and a social page with a twitter feed. It all has to be done using OOP in separate As files. Can anybody give me some guidelines on how to do this correctly? Thanks Guys