Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Reqest simple edit records PHP Example
08/12/2009
05:13
Avatar
hksatay
New Member
Members
Forum Posts: 2
Member Since:
07/12/2009
sp_UserOfflineSmall Offline

Hi all, i am completely new on jqGrid, but it is so powerful. do anyone can show me a simple edit / add records example php?

How jqgrid can get the server response or how php handle the post data? 

Thx! 

08/12/2009
18:28
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

09/12/2009
05:56
Avatar
hksatay
New Member
Members
Forum Posts: 2
Member Since:
07/12/2009
sp_UserOfflineSmall Offline

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~

13/12/2009
09:03
Avatar
linoj
Member
Members
Forum Posts: 18
Member Since:
06/12/2009
sp_UserOfflineSmall Offline

i have the same question. thanks.

13/12/2009
18:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

13/01/2010
15:23
Avatar
candra
Guest
Guests

Dear all,

Can anyone help me to give a PHP source code example- how to save/edit record to mysql database, pls?

I need a guidance- how to transfer javascript value to PHP

Regards,

Candra

13/01/2010
16:17
Avatar
newperson
Member
Members
Forum Posts: 27
Member Since:
28/12/2009
sp_UserOfflineSmall Offline

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);

?>

15/01/2010
13:30
Avatar
Candra
Guest
Guests

To newperson,

Thx for your example code

regards,

Candra

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information