» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAX

   by loud canvas media

Quick Links:

Quick Examples:

File Upload Example

Consider the following table:

	CREATE TABLE tblMyMp3CollectionDemo(
	fldFilename VARCHAR(150),
	fldTitle VARCHAR(60),
	fldArtist VARCHAR(60),
	fldGenre VARCHAR(40)

File uploading for this demo has been disabled due to repeated hacking attempts.

asdaxdaav (edit delete) adcadad xaaxaada Trance
1stblues.mp3 (edit delete) Title of a blues song Bluesband with a name Blues
Add File wfwer dfsfds Rock
Add File fsdf fsdf Euro Pop
Add File kalimba kalimba Rock
u3_track_04.mp3 (edit delete) Fields of Silver U3 Pop
12312 (edit delete) 123123 123123 Rock
steay (edit delete) syeay vaeyea Country
Add File test test Euro Pop
aeete (edit delete) ateeyety aeaqey Rock
Add File prueb prueba Rock
greerge (edit delete) bhdsfb jbdsf Pop
Add File teste br Rock
Add File wida sakur  -- 
steay (edit delete) ayeae aye Pop

Class Implementation:

#required file and class
require_once ('preheader.php');
include_once ('ajaxCRUD.class.php')

#this one line of code is how you implement the class
$tblDemo = new ajaxCRUD("MP3 File",
     "tblMyMp3CollectionDemo", "pkMP3ID");

$tblDemo->setFileUpload("fldFilename", "uploads/");

$allowable_vals = array("Rock", "Euro Pop", "Trance", "HipHop");
$tblDemo->defineAllowableValues("fldGenre", $allowable_vals);

#actually show to the table

View Example by Itself

Click here to view example outside of the template.

Recent Feedback

"OMG! This is just what I was looking for. Thanks so much. This is amazing!" - Posted by Simone on Friday Jul 11th, 2008 at 4:34pm

"Sorry all -- had to disable uploading due to hacking attempts. Feel free to try out on your own server though!" - Posted by Sean Dempsey on Sunday Sep 14th, 2008 at 7:23pm

"comment2, " - Posted by jonn2 on Sunday Nov 9th, 2008 at 6:21am

"awesome it is best
working fine
" - Posted by fakhru on Tuesday Dec 16th, 2008 at 5:28am

"ajaxCRUD.class.php on line 1238" - Posted by Juan Carlos on Monday Jan 19th, 2009 at 4:32pm

"just what i looked for..." - Posted by Sergey on Wednesday Mar 25th, 2009 at 11:02am

"I can`t wait to give this a try." - Posted by Fortin on Thursday Mar 26th, 2009 at 3:58pm

"I can`t wait to give this a try." - Posted by Fortin on Thursday Mar 26th, 2009 at 3:59pm

"Great Stuff !!

You Are Wonderful People

" - Posted by Mark on Wednesday Oct 27th, 2010 at 10:23am

"There is a bug in the fileupload() when you try to upload big size file it just don`t upload and throw error " There was an error uploading your file (or none was selected)."...

Guy`s any one face the same error like i faced

" - Posted by Alex on Monday Aug 1st, 2011 at 12:53pm

Leave a Comment

Your Name      
Your Email   


"Excellent!! Very Nice and simple!"

What is a business/commercial website?

A commercial website is one created for a business, for which purpose is generating revenue or cash flow of any type (and that isn't under a non-profit organization). So if you're selling a product, selling advertisement, selling a service, or just marketing a commercial business, your site is commercial. A company website is also commercial even if it doesn't sell anything, as it's purpose is to front a commercial company.