Consider the following table:
CREATE TABLE tblFriend ( pkFriendID int(11) PRIMARY KEY AUTO_INCREMENT, fldName varchar(25), fldAddress varchar(30), fldCity varchar(20), fldState char(2), fldZip varchar(5), fldPhone varchar(15), fldEmail varchar(35), fldDateMet date, );
Name | Phone | Zip | Date We Met | Action |
---|---|---|---|---|
-- Saving... | -- Saving... | -- Saving... | 2024-10-23 Saving... | |
-- Saving... | -- Saving... | -- Saving... | 0000-00-00 Saving... | |
-- Saving... | -- Saving... | -- Saving... | 0000-00-00 Saving... | |
-- Saving... | -- Saving... | -- Saving... | 0000-00-00 Saving... | |
222 Saving... | (222) 222-2222 Saving... | 99999 Saving... | 0000-00-00 Saving... | |
4444 Saving... | -- Saving... | -- Saving... | 2024-07-02 Saving... | |
ANA MARIA Saving... | (888) 888-8888 Saving... | 99999 Saving... | 2024-09-23 Saving... | |
asd Saving... | (111) 111-1111 Saving... | 11111 Saving... | 2024-08-31 Saving... | |
BtPQubBX Saving... | 555-666-0606 Saving... | 98999 Saving... | 0000-00-00 Saving... | |
test Saving... | (000) 000-0000 Saving... | 55555 Saving... | 2024-06-02 Saving... |
---your class.php---
#required file and class
require_once ('preheader.php');
include_once ('ajaxCRUD.class.php')
#create an instance of the class
$tblFriend = new ajaxCRUD("Friend", "tblFriend", "pkFriendID");
//if we only want to show a few of the fields in the table
$tblFriend->showOnly("fldName, fldPhone, fldZip, fldDateMet");
#set the number of rows to display (per page)
$tblFriend->setLimit(10);
#set a filter box at the top of the table
$tblFriend->addAjaxFilterBox('fldName', 20);
#modify field with class
#for masking and for adding calendar widget
$tblFriend->modifyFieldWithClass("fldDateMet", "datepicker");
$tblFriend->modifyFieldWithClass("fldZip", "zip");
$tblFriend->modifyFieldWithClass("fldPhone", "phone");
#show CSV export button
$tblFriend->showCSVExportOption();
#order the table by any field you want
$tblFriend->addOrderBy("ORDER BY fldName");
$tblFriend->showTable();
---validation.js---
// mask some fields with desired input mask
$("input.phone").mask("(999) 999-9999");
$("input.zip").mask("99999");
//put a date picker on a field
$( ".datepicker" ).datepicker({
dateFormat: 'yy-mm-dd',
showOn: "button",
buttonImage: "includes/images/calendar.gif",
buttonImageOnly: true,
onClose: function(){
this.focus();
//$(this).submit();
}
});
Click here to view example outside of the template.
Plan to use ajaxCRUD™ on a business/commercial website? You must purchase a license.
You are allowed to use this product or part(s) of it on a single web site only, belonging to either you or your client. You have to purchase the same product again if you want to use the same product in connection with another or other projects.
Any analysis of the program, embedded data or license files by any means and by any entity whether human or otherwise and including but without limitation to discover details of internal operation, to reverse engineer, to de-compile object code, or to modify for the purposes of modifying behavior is forbidden.
Any analysis of encoded files by any means and by any entity whether human or otherwise and including but without limitation to discover details of file format or modification for the purposes of modifying behavior or scope of their usage is forbidden.
All imagery and fonts used in this product are an integral part of the product. You can use images and fonts only as a part of the web site you build using this product. You can use imagery and fonts to develop one project only. Any kind of separate usage or distribution is strictly prohibited.
You are authorized to make necessary modifications to this product to fit your purposes in accordance with this license.
The product is property of Tania Alekova. You shall not offer this product or part(s) of it, modified or unmodified, for redistribution or resale of any kind. You shall not sub-license, assign, or transfer this product or part(s) of it to any entity.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
If your organization makes a profit, you are a for-profit company. A commercial site 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 commercial even if it doesn't sell anything on the site, as it's purpose is to market/promote a commercial company.
$/mo
Buy NowThe Unlimited License permits you or your company to use ajaxCRUD™ on any/all commercial websites you develop now or in the future.
For any questions please contact us..
$ (one-time)
Buy Now