** "Clevertext" AJAX Textbox Readme File **
** Gary Hockin - gary --at-- garyhockin --dot-- co --dot-- uk **
** June 2006 **
Include the class.clevertext.php file using the normal method:
Create a new instance of the clevertext class:
$ct = new clevertext;
Then, initialise the class using the init method, passing the path:
Next, create a clevertext textbox by using the textbox function:
$ct->textbox(fieldname, fieldvalue, table name, primary key, primary key value);
You'll need to edit clevertext.php to connect to your database or to include your globals, but essentially thats all there is to it.
Obviously this is a hugely simplified version as the original used the PEAR db_data_objects classes to handle the database calls, and did some data validation (hence the "error" part of the xml generated). Want some more info? EMail me at the above address.
Please note this is cleaned down to the barest form to get people to understand how it works. There is NO input validation at all included. I HIGHLY RECOMMEND that you add at least a htmlentities value in the "clevertext.php".
I have added the htmlentities in myself just in case stupid people do stupid things with the class.