[PHP] An important, urgent question about classes?

2002-01-15 Thread Sait Karalar








  Hi all,
  
  I need to learn something about classes in PHP, that I could not 
  understand what's going on really!?
  
  For the following sample, what kind of class i need to create? how 
  can i use?
  
  For example,
  I have X students X: from 1 to infinity... 
  With respect to student ID of them,
  
  And for each students, I have name,surname,addr,phone,email 
   etc.. informations of them
  
  I want to create a class, such that, i can input info of students, 
  for each student.
  And for example, when I did this for 10 students, 
  
  I want to register with "session_register" and add/remove/change 
  registered informarmations.
  
  I tried to do,
  
  but I could not understand the uses of classes clearly, so I could 
  not do...
  
  Thus soem body write me small code which includes a sample class 
  and
  
  adding/changing/deleting records for one student inside.
  
  Can I register a valuable which is a class? $mydata = new 
  Students(); session_register("mydata"); ? is possible?
  
  Do we have any restriction about registering a variable with respect 
  to its type?
  
  thanx... best regards...





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Re: [PHP] An important, urgent question about classes?

2002-01-15 Thread [EMAIL PROTECTED]


If you can't figure how to make your class work, send us your code so far, we'll tell 
what's wrong.

For an example class just look at the manual.

For more info on OO programming in PHP go to one of the many tutorial sites, for 
example http://phpbuilder.com .


You can register any type of variable, if you don't know for sure, why not make a 
simple test ?
Bet the answer can be found easily under session_register()  in the manual. 
Make sure the class declaration is available (included) before you do session_start().

bvr.


--Original Message Text---
From: Sait Karalar
Date: Tue, 15 Jan 2002 10:12:21 +0200 (GTB Standard Time)

FLAVOR00-NONE--- ; Hi all,
 
I need to learn something about classes in PHP, that I could not understand what's 
going on really!?
 
For the following sample, what kind of class i need to create? how can i use?
 
For example,
I have X students X: from 1 to infinity... 
With respect to student ID of them,
 
And for each students, I have  name,surname,addr,phone,email  etc.. informations 
of them
 
I want to create a class, such that, i can input info of students, for each student.
And for example, when I did this for 10 students, 
 
I want to register with session_register and add/remove/change registered 
informarmations.
 
I tried to do,
 
but I could not understand the uses of classes clearly, so I could not do...
 
Thus soem body write me small code which includes a sample class and
 
adding/changing/deleting records for one student inside.
 
Can I register a valuable which is a class?  $mydata = new Students();   
session_register(mydata); ? is possible?
 
Do we have any restriction about registering a variable with respect to its type?
 
thanx... best regards...

  IncrediMail - Email has finally evolved - Click Here