srinivasa Posted May 5, 2010 Report Share Posted May 5, 2010 i want to write a generic class say it should contain name,comments and also name field should take only 20 chars and comment field should take 40 chars and also neccessay validation must be done for example name should take only alphabetic chars .....comments should allow only some of the special chars...etc please guide me how to do it. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted May 5, 2010 Report Share Posted May 5, 2010 I mean this politely... but we are not here to write all your code for you. As one of the few that reply in the PHP forum here, I simply don't have time to write everyone's code for them, especially if it involves something that I don't know much about and would have to do research/experimentation to figure out. Nearly all of your posts are "I want to do ___, tell me how to do it." We are happy to help, but please start by doing a little research (Google is your friend), getting as far as you can, and showing us what you have done so far. What have you done so far on this? Quote Link to comment Share on other sites More sharing options...
is_numeric Posted May 5, 2010 Report Share Posted May 5, 2010 If you understand OO PHP then you will know not to code anything which will render your efforts bespoke getters and setters and an interface will be your best way here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.