Storing Classes
I have a script which calls up a class stored in a file FormatText.class . I don't want my .class files to be accessible if anyone types the URL of the class - I only want my class file accessible by a PHP script called by my server. I use
require_once "FormatText.class";o get the class. Where do people typically place the class files when designing software? Shoud I put it in the root folder?
I also have a text file I often call that contains sensitive database information. I placed that file in the main directory, (one up from the www directory). How safe is that file? Is that standard practice?
View Complete Forum Thread with Replies
Related Forum Messages:
Storing Classes In Text Files
is there a way to store class in a text file? and then recall thjem? and is there a better way to store variables and such than a text file, so its unreadable? what i mean abou my question is.. is it possible to make two classes: User1 and User2, and then recall them so you can get User1.password and User2.password, User1.ID, User2.ID, etc.
View Replies !
Static Classes Vs. Singleton Classes Vs. Globals
Sometimes I want to use certain data and functions anywhere in my code; for example, when writing logging routines. In PHP5 I could write a class with all static members and functions, a singleton class, or a regular class assigned to a global variable. What would be the advantages of each? In Java web-apps (or in non-web applications), these classes persist for much longer, so it's easier to see the reasons for using them. But in PHP, it seems like you could do pretty much the same thing with all three.
View Replies !
Classes Within Classes Scope Question
I have two classes, A and B. B is created as an object within A, but also needs to use a variable within A. How do you reference it? Example, class A { var somevar = "test"; A { $obj = new B (); } } class B { B { print ( * $somevar from the A class * ); } } The class B is trying to use the variable $somevar declared in class A. I just don't know how to use the variable.
View Replies !
Using Classes Inside Of Other Classes
I'm wondering how to use another class inside a preexisting class, without passing the constructor in the preexisting class an object from a file that contains a new declaration. IE: Instead of doing something like this...
View Replies !
Why Use Classes?
I feel that i mastered functions and now there is something called classes. What makes it superior to functions? Is it better to use them?
View Replies !
PDF , Classes, And PHP
I'm stuck at first base here. Currently working on turning a rather static PDF building script into a more modular, OO PHP app. I have scaled this example down to the bare bones, trying to see what the heck is going wrong. It recognizes that is should spawn a pdf file, but then there is just no data. Nothing, no error, no helper app. I'm only a week or so into PDFs and only a couple of days into OO with PHP, so I'm on the lookout for the obvious. I do have PHP/PDF apps that run fine off the same system. Here is the class: <? error_reporting(E_ERROR); /******************************************** pdfReport.class.php - description ********************************************/ /* common functions / classes */ //class used to build rectangles - how exciting (-: class pdfReport{ //define our common properties //page properties var $pdf; function createPDF() { header("Content-type: application/pdf"); header("Content-Dispositions: filename=report.pdf"); $this -> pdf = pdf_open(); pdf_begin_page($pdf, 612, 792); }//end function createPDF function closePDF() { pdf_close($pdf); }//end function pdf_close function buildText() { pdf_set_font($pdf, "Times-Roman", 15, "host"); pdf_show_xy($pdf, "Active Case Review Quarterly Report", 25, 780); pdf_set_font($pdf, "Times-Roman", 26, "host"); }//end function buildText }//end class ?> And here is the page where I call the class: <? include("test.class.php"); //error_reporting(E_ERROR); //create a report $quarterlyPDF = new pdfReport; $quarterlyPDF -> createPDF(); $quarterlyPDF -> buildText(); $quarterlyPDF -> closePDF(); //end pdf document ?> thanks much for any input.
View Replies !
Value Of PHP Classes?
So PHP classes are pretty cool. But what is the value they provide? I understand the value of OO, but in the PHP environment, every class you instantiate lives only in the span of that request. There is no concept of singleton classes, or classes that remain across requests. The notion of allocating new memory for every instance of a class for every request seems wasteful. Thoughts?
View Replies !
Why Uses Classes?
I've read a DevShed article about classes in PHP, but still can't see a practical application for them considering you can use functions throughout your script, or (such as classes) include classes for certain scripts. Can anyone tell me clearcut, what they are and why I'd use one, and in what instance?
View Replies !
Classes
I've been introduced to the concept of classes in PHP. Everyone says that they're the essence of object oriented programming and that they are extremely useful. Could someone give me an example of a good use of classes?
View Replies !
Classes - Why Would I Want To Use Classes In PHP?
okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the "normal" functions all the time. I have never even bothered working with classes, but now I would love to know what makes the classes so special......
View Replies !
DIR CLASSES Wth Is This?
ok, I have the following code: this file is called cont.php: <?php require_once(DIR_CLASSES . 'container/containerbase.php'); . . class Container extends Containerbase { . . . class def's . . } ?> Now nowhere in the containerbase.php file is the value DIR_CLASSES defined and its not some PHP global value. I also have no common.inc file that might define this value. Where/How do I define the DIR_CLASSES value?
View Replies !
Php Classes Within Classes?
I've been programming PHP for about 2 years and have dabbled with classes. I'm working on a project and can't seam to figure out how to use classes within classes. For example: --foo.class.php-- <? class Foo { var $test1; function Foo() { require_once('bar.class.php'); $test1=new Bar(); } function testFooBar() { return $this->test1->testBar(); } } ?> --bar.class.php-- <? class Bar { var $return; function Bar() { $this->return='FooBar Works!' } function testBar() { return $this->return; } } ?> --index.php-- <? require_once('foo.class.php'); $test = new Foo(); echo $test->testFooBar(); ?> index.php will disply a blank page instead of 'FooBar Works!'.
View Replies !
OOP PHP Classes
I was interested in looking at some php5 classes and objects that are object orientated to get an idea of what other people are doing. But more "real world" examples, more than "class FruitBowl" if you know what I mean by this. Does anyone have any links handy for something like this?
View Replies !
PHP Classes :: & ->
What is the difference between "::" and "->" when using classes? It always hard to find documentation for something that i only a symbol.
View Replies !
Use And Need Of Classes In PHP
I know what object oriented programming is - I know what classes are and how they work - I'm just trying to figure out when they should be used in PHP... I have two questions: 1-How do you keep your objects? For example if we had a shopping cart, would we create a new shopping cart object and everytime the user adds/removes items update that same object? and how would you keep that object's information as the user browses through the site? Would you use serialize/unserialize session variable functions? or is there a better way? 2- For example, if we have a website that has users why would we want to make a "Users" class containing all the user information? Can't we just insert/retrieve data directly from the database? and when we get the data from the database what exactly is the point of creating an object out of them when we can just print it out? I guess my question is why would having a Users class be useful in a php web application? (assume users have name, username, password, address, etc.)
View Replies !
Using Two Classes
Lets say I have one class that deals with the database (class called SQL), a class that manages the user authentication (class called User) and another class that does something like getting all the options from the database for a poll (class called Options). The class Options is extended by another class called Poll which is extended by the class called Gateway, like this: class SQL {} class User {} class Gateway {} class Poll extends Gateway {} class Options extends Poll {} $sql = new SQL; $sql->connect(); $user = new User; $user->authenticate(); $poll = new Options; As you see, SQL and User are in no way connected to the other classes, however sometimes I'd like to use SQL inside the Options class. Would it be better to use global inside one of Options' function, like this: class Options { public function __construct() { global $sql; $sql->query(); } } ...or would it be better to let Gateway extend Users and SQL, like this: class SQL {} class User extends SQL {} class Gateway extends User {} class Poll extends Gateway {} class Options extends Poll {} // etc...
View Replies !
When To Use Classes
I've been developing websites using PHP for several years now, yet have never used OOP concepts. I am familiar with them, but have never had a need for them in my projects. However, I am now interested in using them to expand my knowledge, but unsure when they are really needed. Lets say I have a MySQL database with a "customer" table that stores all their information such as name, address, phone number, etc. The web page will do basic queries on the customer info, inserts, updates, selects, and so forth. I'm trying to incorporate classes with this, yet it seems like it's a lot more work than if I were simply using function to perform the actions on the database. I did some browsing on the web and it doesn't seem like classes are really needed when your dealing with data from a database (other than possible a class to connect to the db). Is this true? Any examples maybe?
View Replies !
PHP Classes
Today I looked at the documentation for PHP classes and now I would like to rewrite a member system and content mangement system using classes. In the past Ive used classes in java, and PHP seems very similar other than some syntax stuff. My primary concern with using classes is that if I wanted to make each member an object would it be possible to store that object in a mysql database, or would I have to have a method within my class to get all the data from the object and put it into the database, and another to then later get the data from the database and construct the object.
View Replies !
'&' In Classes
I am fairly new to coding PHP in classes,I have come across some code an old employee has written with the 'and' symbol used throughout the code. could anyone elaborate on the use of this for me? e.g. function &generateDays($start_date, &$rs) { how does this differ from just: function generateDays($start_date, &$rs) { ??
View Replies !
PHP And Classes
Specefically, how do they work? php.net describes them as a collection of variables and functions working with these variables. So far I'm doing this with collections of function and include'' statements. For any given operation, a link will include a $_GET['thing'] variable. The index then have: if ((isset($_GET['thing'])) && ($_GET['thing'] == "linkname")) { include 'useful_pile_of_functions.php' } This method seems to me to be somewhat like using includes as classes, as the called file contains everything needed to support the users desired function. How is using classes better than this method?
View Replies !
Regarding Classes
What is a class. is it like a function? this has allways confused me as i am a newby to programming (since Basic in the 80's).
View Replies !
Using Css Classes
why can't i use css classes in an echo or print function? for example: Code: echo ("<center>"); echo ("<b>updated on $date</b><br><br>"); echo ("$entry<br><br>"); echo ("</center>"); prints the appropriated variables centered, bolded, etc. but when i try Code: echo ("<center>"); echo ("<b class="entryhead">updated on $date</b><br><br>"); echo ("$entry<br><br>"); echo ("</center>"); it returns a t_string error on that line. why can't i use css classes in my php code, is there a way to apply classes like that via php? if so how do i use them?
View Replies !
Classes In PHP
I want to use some classes in PHP and I haven't ever done it before and I have all these stupid questions that I don't know. They are questions that are too simple to be documented. Here is my class. class IP{ var $blah ="blah"; function getIP(){ echo $REMOTE_ADDR; } function michaelIs($str){ echo "Michael is $str"; } } then I do this.
View Replies !
Using Classes
I have a login class that has to connect to the database to verify a username and password. In this class I include and use my mySQL class. Is that ok coding practice? I am wondering because the login class cannot stand on it's own and is totaly dependent on my mySQL class to be able to work, but I cannot think of another way to do it, without totaly skipping my mySQL class and just directly accesing mySQL thru the mySQL API. Code:
View Replies !
Using Classes In PHP
I have looked over the PHP manual on version 5.0 and am pretty familiar with how classes work in PHP. I have a class in a file called MyClass.php(Or do you name it something else like .class?) that has a class in it with a few functions. PHP Code: <?php class myClass { Â Â Â private function __function1($property) { Â Â Â Â Â Â Â Â Â } private function __function2($property) { Â Â Â Â Â Â Â Â Â } } ?>
View Replies !
Problem With Classes..
Has anyone had problems with PHP returning two different results on different machines when using classes? Here's the scenario: On win2k/IIS/PHP 4.0.3, I set up a class like this: class myClass { var $thisVariable = "test"; function getVariable(){ $this->variable = $thisVariable; echo $this->variable } } When I instantiate it, it returns "test" but when I upload the file to my website server, which is Apache running PHP 4.0.2, it refuses to return anything.. but when I set it like this: class myClass { var $variable; function getVariable(){ $this->variable = "test"; echo $this->variable } } It works just fine. Any idea why?
View Replies !
Classes And Requires
I am wanting to include some common function into a class, these function are stored in include files, the thing is, PHP will not allow this, or i am doing something wrong. This is the code: PHP Code:
View Replies !
Classes In PHP - Question
//I've the class Application class Application... //I call show function from class Abstract ... $seller = new Seller... $seller->show(...) ... $customer = new Customer... $customer->show(...) //I've also the class Abstract - it implements some common code code for all classes Seller, Customer,... etc.. class Abstract... ... function show(...){ ... $form = new HTML_QuickForm... $this->List($form); } //here's Customer class - some special code for customer class customer extends Abstract function List($form){ $quickFormSelect = new HTML_QuickForm_select ... $form->addElement($quickFormSelect)); } of course, I can do it, using some "if's" i Abstract class, but the above code could simplify my application, unfortunately it doesn't work Any suggestions about this code? ps. the above code can looks like this: .... function Lista(){ ... $quickFormSelect = new HTML_QuickForm_select ... return $quickFormSelect; } //and then in Abstarct class $form->addElement($this->Lista()); but in this solution I can add only one $quickFormSelect do $form, how to add some more $quickFormSelect calling function List only one (like in my unfortunetly non working code - $this->List($form);)
View Replies !
One Must Use Globals In Ones Classes
I get the impression that most people who are using objects in their PHP projects are mixing them with procedural code. The design, I think, is one where the procedural code is the client code, and the classes are a library of utility code. As such, when I've asked about how to get globals into objects, I've been told that I should pass them in as the parameters to a method. Easy enough if you have some procedural code. This answer I've been given assumes that there is something outside of the object, some procedural code that can get hold of the global and then hand it to the object. However, am I wrong in saying that if you wanted to go pure OO, you'd have to grab the globals from inside of the objects? You could limit this to the constructor, and possibly you could limit to just a single master object that contained all other objects, but still, you'd have to do pull globals straight into the object, yes?
View Replies !
Extending Classes
I've created a database export class with extensions for exporting to csv, xls, html and xml. The file export.inc.php contains the 'export' class which deals with getting the data and storing the field names and row data in arrays - used for all exports. export_csv.inc.php include()s export.inc.php and contains 'export_csv' which extends the export class, formatting the field name and row arrays as a csv file and sending the file to the browser. There are other similar extensions for xls, html and xml. At the moment I have to do something like this to get my exported data: switch ($type) { case "csv": include("path/to/export_csv.inc.php"); $export = new export_csv(); break; case "xls": include("path/to/export_xls.inc.php"); $export = new export_xls(); break; ... } $export->get_data($dbhost,$dbname,$dbuser,$dbpass,$sql); $export->output(); That seems quite untidy and what I'd really like to do is this: include("path/to/export.inc.php"); $export = new export("csv"); $export->get_data($dbhost,$dbname,$dbuser,$dbpass,$sql); $export->output(); I know it must be possible because that's how ADODB selects its drivers, but I can't get my head round how it works. Any idea how I should go about organising my classes and their separate files? Has it got something to do with the 'factory method' that I've seen mentioned in a few places recently?
View Replies !
Friend Classes
Now that PHP5 has proper scoping for class properties and methods, I've been looking in vain for friend classes, or wondering if there's another way to achieve this effect: class A { protected var $v1; .... } class AHelper { .... function .... { .... $helper = new AHelper ( ... ); .... if ($helper->v1) ... } So A has a property which really is not supposed to be public, but AHelper (which does not inherit from A) has a special relationship with A and wants to be able to delve inside it. Note that just providing a public accessor won't help: it's logically the same as making the property public. C++ manages this by having 'friend classes' - classes which are allowed inside a class even though they are not derived from it. I suppose I could write a public accessor method which takes its caller as an argument and checks its type before it will go ahead and fetch the value; but that's inelegant, heavy, and only takes effect at run time. Has anybody got any better suggestions? [I see somebody asked the same question two weeks ago on faqts, but did not get an answer)
View Replies !
Php Nesting Classes
I have the following problem: For an application, I made 2 classes: Order and Ticket In the Order object I store an array with Ticket objects. so far so good, now I needed the Order object inside the Ticket class. So I stored a copy of the Order object inside the Ticket class. This is what we got until now: class Order { pubic tickets = array() } class Ticket { public Order = null } For both classes I made static methods: get_by_id() Now my question: What happens if i do: Ticket::get_by_id(5); A Ticket object will be created. Inside this Ticket object, an Order object will be created with the Order::get_by_id($this->orderid) method. This Order object will fill his $tickets array wilt the Ticket::get_by_id($ticketid) method. Those tickets will create new Order objects... So there will be a loop. How will php handle this? If this causes an error, is there another solution to fix this problem?
View Replies !
Classes, Don't Follow.
I have read alot of things on zend.com, php.net and other sites went to the wikibooks to try to understand how to use a class. I have this project I want to do that I am sure would work great with a class. I just don't grasp the whole concept, and how to do it. I want to make a Collectable Card Game Draft Engine...(if any of you play VS System, LOTR, Magic: The Gathering, you know what I am talking about.) It would be way to complicated for just typing in regular functions and calling em. So this is what I've seen That I don't understand. Say i have a database with cards that are common(c), uncommon(u), rare(r) from 3 sets alpha(a), beta(b), unlimited(u). I need to 1st create 24 packs that contain 11commons, 3uncommons, and 1rare each. Bam thats a class. would it look like this? Class CreateDraft{ var $set; var $rarity; function SelectRandomCard{ //connect to database in file header // $querycardbase = "SELECT * FROM `mtg_base` WHERE rarity = $rarity AND set = $set LIMIT $rarity_num";//rarity and rarity_num are related c=11,u=3,r=1, set dictates cards available. $querycardbase_result6 = @mysql_query ($querycardbase); while ($cardbaserow = @mysql_fetch_array ($querycardbase_result)) { $packarr = $cardbaserow[card_id] } function InsertPack{ $insertpack = "SQL STATEMENT INSERTING AN ARRAY";//I know, i know its late and I just want to understand. } }
View Replies !
Nested Classes In PHP?
I remember reading that both nested classes and namespaces would be available in PHP5. I know that namespaces got canceled (much sadness...), however, I *thought* that nested classes were still an option. However, I am coming up dry looking for information on how to do this, and the most recent references I am able to find to nested classes in PHP are dated 2003. And they all say the same thing: sorry, can't do that. So, it's not possible? Is that the end of the matter? Any suggestions for attempting to implement namespaces in PHP5? Some sort of hack or workaround?
View Replies !
Databases And Classes
I wrote this as a test to see how classes work with database connections. The first part of feedback (PART A) works, and it cycles through my list of users and displays them no problem, but it doesn't move onto the second loop. I expect it's something to do with the 'while' statement. Can anyone see what i'm doing wrong? PHP Code:
View Replies !
Working With Classes + Php
I'm pretty much a self taught php programmer that uses php mostly for database entry and listings. I would like to expand my talents and start working with classes. Is there a good tutorial out there on the web that a novice can understand. I currently wanting to add a password generator class to one of my existing webpages at my helpdesk. The class is located at PHPclasses.com (class.password.generator.php).
View Replies !
PHP5 And Classes
I've downloaded the FPDF class from www.fpdf.org as well as some of the scripts that are available. Each of these scripts use: class mine extends FPDF {} which is what you'd expect when extending out to a new class. What I want/would like to do is to include multiple scripts which extend the base class of FPDF. I've managed to daisy-chain these classes similar to: ------------------------------------------------------------------------- <?php class FPDF { function FPDF(){ echo "class FPDF<BR>";} function setSize(){ echo "setSize_FPDF()<BR>";} } class B extends FPDF { function B(){ echo "class B<BR>";} function setSize(){ echo "setSize_B()<BR>......";parent::setSize();} } class C extends B { function C(){ echo "class C<BR>";} function setLimit(){ echo "setLimit_C()<BR>";} } class D extends C { function D(){ echo "class D<BR>";} function PrintLine(){ echo "PrintLine_D()<BR>";} } class me extends D { function me(){ echo "class me<BR>";} function setSize() { echo "setSize_E()<BR> "; //--- this only gets the class B function parent::setSize(); } } //--- test code $x = new me(); $x->FPDF(); $x->PrintLine(); $x->setSize(); /* --- output class me class FPDF PrintLine_D() setSize_E() setSize_B() setSize_FPDF() */ ?>
View Replies !
Im Trying To Understand Php Classes
Im tring to learn about classes with php. I've read alot of posts here and look at other peoples code. So I appied all the absorbed to this. Im tring to build a Shopping cart. not for live use but just to learn about classes and get better at php. Anyway, i put this code together and can't get it to work. it may be comletely wrong and if it is please direct me to a good tutorial. But at the risk of looking like a complete ass. here is my code. please be kind. A page calls a page with this code; (showCart.php) <?php require( 'ShoppingCenter.php' ); $item = new ShoppingCenter( $itemArray ); $item->addToCart(); $itemList = getUnkownKeyValues( $item->getFileName() ); ?> This is the ShoppingCenter class: note that the inifunc.php is code i writen/found to write out to a file. (ShoppingCenter.php) <?php include( 'inifunc.php' ); class ShoppingCenter { var $fileName = "tfsmc.txt"; var $iArray; var $qty = 0, $itemNumber = 0, $itemCost = 0, $totalCost = 0, $itemDescription = ""; function getFileName() { return $fileName; } function ShoppingCenter( $itemArray ) { $this->iArray = $itemArray; $this->itemNumber = $itemArray[0]; $this->itemDescription = $itemArray[1]; $this->itemCost = $itemArray[2]; $this->qty = $itemArray[3]; $totalCost = $qty * $itemCost; $totalCost = number_format($totalCost, 2, '.', ''); $this->iArray[2] = $totalCost; } function addToCart() { if( !ifSectionExisits( $itemNumber ) ) { foreach( $iArray as $key => $value ) { write_key($this->itemNumber, $key, $value, $this->file_name); } } } } ?> After the ShoppingCenter is called the showCart.php "SHOULD" display what was writen to the file: (showCart.php) <?php for($i = 0;$i<count($itemList);$i++) { foreach($itemList[$i] as $key => $value) { if( $key == "removed")break; echo "<td>$value</td>"; if( $key == "totalCost" )echo"<td><div align='center'><input type='submit' name='Submit' value='Remove'></div></td></tr>"; } } ?>
View Replies !
Using Multiple Classes Together
I've seen a lot of introductory OOP tutorials for PHP, but I've never seen a tutorial on how to write 2 or 3 classes with interdependencies (e.g. class 1 depends on class 2 and 3, and class 3 depends on class 2) and cleanly tie them together. This is mostly what's keeping me from using an OO approach in PHP. I found it a lot easier to stick with functions and require_once() files. Any variables that need to be accessible to multiple function libraries are made global. It gets kind of messy, and I recently saw that associative arrays are a performance hog (3x slower). So, another reason to move to objects. Does anyone have a tutorial like this in the works, or is there one out there already? I've been waiting for one for a while, but everyone keeps putting out "beginner" OOP tutorials that aren't of much help anymore.
View Replies !
Programming And Classes
I want to automate my site, providing sports news and info. I cover pro, and high school sports, but need to allow for college, rec and youth sports as well. I want to set this up as a database, or series of databases, with me also learning some PHP to tweak things as they go.
View Replies !
Object Classes
I need to know how to keep instance of class. For example. I created object: $myObj = new Person(); and then someone wants to go to the links page, and I want to keep data which are created in myObj, for exmaple $myObj->age; $myObj->name; etc. etc. I thought about $serMyObj = serialize($myObj) and the put $serMyObj data through POST, GET, or sth like that, and then GET it, but what if the portal is big and i want to keep 50 objects in one session ?? put data to the database and after that get it and every time someone is redirecting to the another page, get form database ...
View Replies !
Image Classes
I've been searching PHPClasses sites for my little project that seems so hard to finish. I have a list of photos with some description in MySQL DB: image_code text[16] image_description memo[256] image_location text[128] image_note text[128] Say my image is in c:wwwsitenameimages<image_code>.jpg Is there a simple image browser that can display all the information, thumbnails, and display the image when clicking the thumbnails? Perhaps I need an easy forms template for browsing the thumbnail images and a forms to display the full image with the information nice and neat.
View Replies !
Classes And Reference In Php 4.x
class test() { function bob() { $this->var = '' outsidefunc($this); // why is $this->var still '' ?? in php 5 it's 'not empty' } } outsidefunc(&$test) { $test->var = 'not empty' } how can I fix / get around problem?
View Replies !
Breadcrumb Classes.
I am looking for a breadcrumb class in PHP that does not rely on the directory structure to build the trail. I have been using Richard Baskettes - http://www.baskettcase.com/classes/breadcrumb/ - breadcrumb classes and they are great... BUT. I have a site that is being built using templates and the directory hierarchy can not be used to create the trail. if you read this post in alt.lang.php.
View Replies !
Classes And Require ?
I have a big class in one php file. I would like to divide it to many smaller files. But when i try: <?php class IndexController extends Zend_Controller_Action { require_once('IndexController_common.php'); require_once('IndexController_client_car.php'); i receive parse error: "Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting T_FUNCTION in /mnt/hda5/www/zend/dg/car/application/controllers/IndexController.php on line 6" When i move require_once outside class definition everything works fine. But i need require inside of class because in thouse files are functions which are the member of that class. How can i do it ?
View Replies !
PHP Character Classes
i'm quite new to php but i can do some of the basics like: initial and response pages and entering data into MySQL database, the problem is i got stuck when i was about to validate the form entries, i want to do it using ereg and eregi but i'm having a hard time looking for an in-depth reference for character classes and their brief descriptions and how to use them.
View Replies !
Classes And Mysql_insert_id()
I am trying to use the mysql_insert_id() function, however I am using a class to do all my database connections and queries. I am not sure what to use as the link identifier source. Here's the code I have now, which produces an error: PHP Code:
View Replies !
|