File Upload Example
Consider the following table:
CREATE TABLE tblMyMp3CollectionDemo( pkMP3ID INT PRIMARY KEY AUTO_INCREMENT, fldFilename VARCHAR(150), fldTitle VARCHAR(60), fldArtist VARCHAR(60), fldGenre VARCHAR(40) );
| fldFilename | fldTitle | fldArtist | fldGenre | Action |
|---|---|---|---|---|
| dTjdNQKi | Mr. | 1 | HipHop | |
| -- | (select 198766*667891 from DUAL) | -- | Euro Pop | |
| dTjdNQKi | -- | (select 198766*667891 from DUAL) | HipHop | |
| (select 198766*667891 from DUAL) | Mr. | -- | HipHop | |
| dTjdNQKi | Mr. | 1 | Country | |
| -- | Mr. | -- | HipHop | |
| -- | -- | 1-1; waitfor delay '0:0:15' -- | HipHop | |
| -- | -- | -- | HipHop | |
| -- | -- | -- | HipHop | |
| -- | -- | -- | HipHop |
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->omitPrimaryKey();
$tblDemo->setFileUpload("fldFilename", "uploads/");
$allowable_vals = array("Rock", "Euro Pop", "Trance", "HipHop");
$tblDemo->defineAllowableValues("fldGenre", $allowable_vals);
#actually show to the table
$tblDemo->showTable();
View Example by Itself
Click here to view example outside of the template.

Recent Feedback
working fine
thanks" - Posted by fakhru on Tuesday Dec 16th, 2008 at 5:28am
You Are Wonderful People
Thanks" - Posted by Mark on Wednesday Oct 27th, 2010 at 10:23am
Guy`s any one face the same error like i faced
--Alex" - Posted by Alex on Monday Aug 1st, 2011 at 12:53pm