Forum


18:28

Moderators
30/10/2007

Hello,
Welcome.
Also if you download the demo you can see how this is organized and the PHP code too.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
05:56

07/12/2009

Hi Tony,
Thanks for ur reply, in fact, i download the demo file from the link: http://www.trirand.com/jqgrid/.....demo36.zip
and lookup a php file: editing.php
I found that it didn't really show how jqGrid handle the server responses if update / delete the records successfully or failure
Can u elaborate it more about that?
Thanks~
18:12

Moderators
30/10/2007

Hello,
Thank you for this, but this is just examples. Since jqGrid is independend from the server side language it is out of the docs to provide such examples and tuturials for PHP. What would the say people using JSP, ASP and other?
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
16:17

28/12/2009

I think what you are asking is a sample editurl php script so that fields you enter in editable fields are saved onto the database.
Good news is that it is simple and I also downloaded the demos you did and noticed that there is no php code to do this for you in the examples so I will give you what I made up, and you can adjust as necessary. I am new to php so what I created is by no means secure so I wouldn't recommend using it in a production/public environment in other words use at own risk.
editurl: 'someurl.php',
<?php
include("dbconfig.php");
//This contains the unique record to update
$id = $_POST['id'];
//This contains the data that will update the db
$Notes = $_POST['Notes'];
// connect to the database
$db = mysql_connect($dbhost, $dbuser, $dbpassword)
or die("Connection Error: " . mysql_error());
mysql_select_db($database) or die("Error conecting to db.");
mysql_query("UPDATE store_item_monitor SET store_item_monitor.notes='$Notes' where store_item_monitor.record=$id")
or die(mysql_error());
mysql_close($db);
?>
Most Users Ever Online: 715
Currently Online:
64 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66