I created a simple web page for business clients that works with the MySQL database, used mainly by our B2C Prestashop online store. We use shared hosting. This site is mainly based on jQuery jTable (jtable.org) and is intended to display the current approximate supply of products.
I used jQuery jTable 'starter pack' and created a simple interface for our partners. It looks something like the jTable tutorial:
$(document).ready(function () {
$('#PeopleTableContainer').jtable({
title: 'Product Availability',
actions: {
listAction: 'someconfigfile.php?action=list',
},
fields: {
column1: {
title: 'column1',
width: '70%',
key: true
},
column2: {
title: 'column2',
width: '30%'
}
}
});
$('#PeopleTableContainer').jtable('load');
});
Since I want to show the data that I have in the MySQL database, I have prepared the user for read-only, and I use his credentials to access the database. As can be seen from the jQuery script, I access the database through someconfigfile.php and a "list".
someconfigfile.php MySQL, SQL- . , , - someconfigfile.php , public_html. , HTML, PHP CSS front-end, public_html.
:
- -, public_html? - jQuery jTable .
- SQL Injection, mysql_fetch_assoc ($ result), json_encode ()? .
: , , jTable CRUD- Read. "", "" "" .