<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: JdGrid - Using PHP and MySQL database HELP Please.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Candra on JdGrid - Using PHP and MySQL database HELP Please.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please#p13968</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please#p13968</guid>
        	        	<description><![CDATA[<p>Dear pupian,</p>
<p>I have try your php file. it works on add dan edit function but niether does delete function. could anyone help me please?</p>
</p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">&#60;?</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">include(&#39;config/connect.php&#39;); //connections</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">$id = $_POST[&#39;id&#39;]; //row id. this is the id of the selected row</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">if ($operation == "del")</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">{</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">$result = mysqli_query($link, "UPDATE table SET del = 2 WHERE id = &#39;$id&#39;"); //which syntax should I use?</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">$result = mysqli_query($link, "DELETE FROM table WHERE id = &#39;$id&#39;"); //which syntax should I use?</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">//both of them do not work</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">}</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">mysqli_close($link); </span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Times New Roman;">?&#62;</span></p>
<p>Regards,</p>
</p>
<p>Candra</p>
]]></description>
        	        	<pubDate>Sat, 16 Jan 2010 09:48:26 +0200</pubDate>
        </item>
        <item>
        	<title>pupian on JdGrid - Using PHP and MySQL database HELP Please.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please#p11180</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please#p11180</guid>
        	        	<description><![CDATA[<p>php file name: edit_user.php</p>
<p><span class="S1">&#60;?</span></p>
<p><span><span class="S2">include</span><span class="S3">(</span><span class="S4">&#39;../connections/theConnection.php&#39;</span><span class="S3">); //connections</span><br /><span class="S5">$newid</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;id&#39;</span><span class="S3">]; //row id. this is the id of the selected row</span><br /><span class="S5">$uname</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;uname&#39;</span><span class="S3">]; //some variable</span><br /><span class="S5">$pass</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S7">md5</span><span class="S3">(</span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;pass&#39;</span><span class="S3">]); </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$email</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;email&#39;</span><span class="S3">]; </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$fname</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;fname&#39;</span><span class="S3">]; </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$mname</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;mname&#39;</span><span class="S3">]; </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$lname</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;lname&#39;</span><span class="S3">]; </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$cnumber</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;cnumber&#39;</span><span class="S3">]; </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$level</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;level&#39;</span><span class="S3">]; </span></span><span><span class="S3">//some variable</span></span><span><br /><span class="S5">$operation</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S5">$_POST</span><span class="S3">[</span><span class="S4">&#39;oper&#39;</span><span class="S3">]; </span></span><span><span class="S3">//can be &#8220;add&#8221; &#8220;edit&#8221; &#8220;del&#8221;</span></span></p>
<p><span></span></p>
<p><span class="S8">if</span><span class="S6"> </span><span class="S3">(</span><span class="S5">$operation</span><span class="S6"> </span><span class="S3">==</span><span class="S6"> </span><span class="S9">&#8220;edit&#8221;</span><span class="S3">)</span><br /><span class="S3">{</span><br /><span class="S5">$result</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S7">mysql_query</span><span class="S3">(</span><span class="S9">&#8220;UPDATE user_tbl SET uname = &#39;</span><span class="S10">$uname</span><span class="S9">&#39;, fname = &#39;</span><span class="S10">$fname</span><span class="S9">&#39;, mname = &#39;</span><span class="S10">$mname</span><span class="S9">&#39;, lname = &#39;</span><span class="S10">$lname</span><span class="S9">&#39;, email = &#39;</span><span class="S10">$email</span><span class="S9">&#39;, pass = &#39;</span><span class="S10">$pass</span><span class="S9">&#39;, cnumber = &#39;</span><span class="S10">$cnumber</span><span class="S9">&#39;, level = &#39;</span><span class="S10">$level</span><span class="S9">&#39; WHERE uid = &#39;</span><span class="S10">$newid</span><span class="S9">&#39;&#8221;</span><span class="S3">);</span><br /><span class="S3">}</span></p>
<p><span><span class="S6"> </span><span class="S8">else</span><span class="S6"> </span><span class="S8">if</span><span class="S6"> </span><span class="S3">(</span><span class="S5">$operation</span><span class="S6"> </span><span class="S3">==</span><span class="S6"> </span><span class="S9">&#8220;add&#8221;</span><span class="S3">)</span><span class="S6"> </span><span class="S3">{</span><br /><span class="S5">$result</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S7">mysql_query</span><span class="S3">(</span><span class="S9">&#8220;INSERT INTO user_tbl(uname, fname, mname, lname, email, pass, cnumber, level, status) VALUES (&#39;</span><span class="S10">$uname</span><span class="S9">&#39;, &#39;</span><span class="S10">$fname</span><span class="S9">&#39;, &#39;</span><span class="S10">$mname</span><span class="S9">&#39;, &#39;</span><span class="S10">$lname</span><span class="S9">&#39;, &#39;</span><span class="S10">$email</span><span class="S9">&#39;,&#39;</span><span class="S10">$pass</span><span class="S9">&#39;, &#39;</span><span class="S10">$cnumber</span><span class="S9">&#39;,&#39;</span><span class="S10">$level</span><span class="S9">&#39;, 2)&#8221;</span><span class="S3">);</span><span class="S6"> </span><br /><span class="S3">}</span><br /><span class="S8">else</span><span class="S6"> </span><span class="S8">if</span><span class="S3">(</span><span class="S5">$operation</span><span class="S6"> </span><span class="S3">==</span><span class="S6"> </span><span class="S9">&#8220;del&#8221;</span><span class="S3">)</span><br /><span class="S3">{</span><br /><span class="S5">$result</span><span class="S6"> </span><span class="S3">=</span><span class="S6"> </span><span class="S7">mysql_query</span><span class="S3">(</span><span class="S9">&#8220;UPDATE user_tbl SET del = 2 WHERE uid = &#39;</span><span class="S10">$newid</span><span class="S9">&#39;&#8221;</span><span class="S3">);</span><br /><span class="S3">}</span></span></p>
<p><span><span class="S7">mysql_close</span><span class="S3">(</span><span class="S5">$db</span><span class="S3">);</span><span class="S6"> </span><br /><span class="S11">?&#62;</span></span></p>
</p>
<p>the javascript required:</p>
<p><span><span class="S1">jQuery(&#8221;#btn_add_edit&#8221;).click(function(){</span><br /><span class="S2">var gr = jQuery(&#8221;#my_jqgrid&#8221;).getGridParam(&#39;selrow&#39;);</span><br /><span class="S2">if( gr != null ) {</span><br /><span class="S2">jQuery(&#8221;#my_jqgrid&#8221;).editGridRow(gr,{height:280,reloadAfterSubmit:true});</span><br /><span class="S2">}</span><br /><span class="S2">else {</span><br /><span class="S2">jQuery(&#8221;#my_jqgrid&#8221;).editGridRow(&#8221;new&#8221;,{height:280,reloadAfterSubmit:true});</span><br /><span class="S2">}</span><br /><span class="S2">});</span></span></p>
</p>
<p>the html required:</p>
<p>SPAN { font-family: &#8220;Courier New&#8221;; font-size: 10pt; color: #000000; background: #FFFFFF; }A { text-decoration: none; font-weight: bold; color:#000000;}.S1 { color: #009300; background: #FFF7F7; }.S2 { color: #00008B; background: #FFF7F7; }<span><span class="S1">&#60;button type=&#39;submit&#39; id=&#39;btn_add_edit&#39;</span><span class="S1">&#62;ADD/EDIT&#60;/button&#62;</span></span></p>
<p>____________________________________________________________________________</p>
<p>my simple&#160; example.. i use that in our school project. and works well.</p>
]]></description>
        	        	<pubDate>Wed, 28 Oct 2009 08:59:58 +0200</pubDate>
        </item>
        <item>
        	<title>ted_gr on JdGrid - Using PHP and MySQL database HELP Please.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please#p11157</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jdgrid-using-php-and-mysql-database-help-please#p11157</guid>
        	        	<description><![CDATA[<p>Hello to everyone,</p>
<p>I&#39;ve recently looked into JDGrid but had a seriously hard time understanding the help files and how to implement certain things, which I could really use some help with. You&#39;ll have to bear with me a bit because my Javascript/JQuery isn&#39;t very good, and unfortunately I don&#39;t have the free time to start learning it all from scratch. I am proficient in PHP/MySQL so don&#39;t think I&#39;m totally useless&#160; 😉</p>
<p>I have spent over 10 hours trying to make this work and I&#39;m frustrated and very tired. I&#39;ve gone over all the documents regarding this project and looked throught the forums in the hope that I will find answers, but I&#39;m either blind, or I just don&#39;t understand how and why its not working.</p>
<p>Let me get to the point:</p>
<p>I have successfully installed everything... and was able to make my datagrid show correctly with all the elements displaying, however I can&#39;t understand HOW THE HECK I can set up the <strong>EDIT</strong>, <strong>ADD</strong>, <strong>DELETE </strong>buttons to work, because I just cannot see WHERE I set the necessary values to be sent throught GET and how exactly it works.</p>
<p>The code so far:</p>
<p><strong>display page: country.php&#160;&#160; </strong>(the main page that displays the GRID)</p>
<p>&#60;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&#62;<br />&#60;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&#62;<br />&#60;head&#62;<br />&#60;title&#62;Country Management&#60;/title&#62;<br />&#60;meta http-equiv="content-type" content="text/html;charset=utf-8"&#62;<br />&#60;script type="text/javascript" src="script/jquery.js"&#62;&#60;/script&#62;<br />&#60;link type="text/css" href="script/jquery_ui/redmond/jquery-ui-css.css" rel="stylesheet" /&#62;<br />&#60;script type="text/javascript" src="script/jquery_ui/jquery-ui.min.js"&#62;&#60;/script&#62;<br />&#60;link type="text/css" href="script/jgrid/ui.jqgrid.css" rel="stylesheet" /&#62;<br />&#60;script type="text/javascript" src="script/jgrid/i18n/grid.locale-en.js"&#62;&#60;/script&#62;<br />&#60;script type="text/javascript" src="script/jgrid/jquery.jqGrid.min.js"&#62;&#60;/script&#62;</p>
<p>&#60;script type="text/javascript"&#62;<br />jQuery(document).ready(function(){ <br />&#160; jQuery("#list").jqGrid({<br />&#160;&#160;&#160; url:&#39;script/jgrid/country_loader.php?q=2&#39;,&#160;&#160; /* WHAT IS THIS q=2 FOR???? IT DOESN&#39;T MAKE SENSE */<br />&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160; mtype: &#39;GET&#39;,&#160;&#160;&#160; <br />&#160;&#160;&#160; colNames:[&#39;ID&#39;,&#39;Country Code&#39;, &#39;English&#39;,&#39;Greek&#39;],<br />&#160;&#160;&#160; colModel :[ <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;location_country_id&#39;, index:&#39;location_country_id&#39;, width:90, align:&#39;center&#39;, sortable:true, editable:false, hidden: false},<br />&#160;&#160;&#160; &#160; {name:&#39;location_country_tel_countrycode&#39;, index:&#39;location_country_tel_countrycode&#39;,  width:90,  align:&#39;center&#39;,  sortable:true, editable:true,  edittype:&#39;text&#39;}, &#160;&#160;&#160; &#160; <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;location_country_en&#39;, index:&#39;location_country_en&#39;, width:90, align:&#39;center&#39;, sortable:true, editable:true, edittype:&#39;text&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;location_country_gr&#39;, index:&#39;location_country_gr&#39;, width:90, align:&#39;center&#39;, sortable:true, editable:true, edittype:&#39;text&#39;}<br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; caption: &#39;Country Management&#39;,<br />&#160;&#160;&#160; editurl:"script/jgrid/country_save.php"&#160;&#160;&#160; /* IS THIS IT? BUT WHAT NEEDS TO GO HERE??&#160; */<br />&#160; });</p>
</p>
<p>&#160;/* do not confuse the "gr" in the functions below with any variables of mine. These were examples I found and used as is */<br />&#160; $("#bedata").click(function(){ <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; var gr = jQuery("#list").getGridParam(&#39;selrow&#39;); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; if( gr != null ) jQuery("#list").editGridRow(gr,{height:280,reloadAfterSubmit:true,closeAfterEdit:true}); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; else alert("Please Select Row"); }); <br />&#160; $("#dedata").click(function(){ <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; var gr = jQuery("#list").getGridParam(&#39;selrow&#39;); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; //getSelectedRow(); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; if( gr != null ) jQuery("#list").delGridRow(gr,{reloadAfterSubmit:true}); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; else alert("Please Select Row to delete!"); });</p>
<p>}); <br />&#60;/script&#62;<br />&#60;/head&#62;<br />&#60;body&#62;</p>
<p>&#60;table id="list" class="scroll" cellpadding="0" cellspacing="0"&#62;&#60;/table&#62; <br />&#60;div id="pager" class="scroll" style="text-align:center;"&#62;&#60;/div&#62; <br />&#60;input type="BUTTON" id="bedata" value="Edit Selected" /&#62; <br />&#60;input type="BUTTON" id="dedata" value="Delete Selected" /&#62; </p>
<p>&#60;/body&#62;<br />&#60;/html&#62;<br />-----------------------------------------------------------------------------------------------------------------------------------------------------------<br />The above information is to create countries in a database where the "location_country_id" is the primary key, "location_country_tel_countrycode" is an INT value, and the rest are the values for each language (varchar(255)).</p>
<p>-----------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<p><strong>The file: country_loader.php&#160;&#160; (I don&#39;t understand why this has to be a separate file but anyways)</strong></p>
<p>&#60;?php <br />//include the information needed for the connection to MySQL data base server. <br />// we store here username, database and password <br />include(&#39;include/config.php&#39;); /* database connection its all setup in here, no need for anything more here.&#160; */</p>
<p>$page = $_GET[&#39;page&#39;]; <br />&#160;<br />// get how many rows we want to have into the grid - rowNum parameter in the grid <br />$limit = $_GET[&#39;rows&#39;]; <br />&#160;<br />// get index row - i.e. user click to sort. At first time sortname parameter -<br />// after that the index from colModel <br />$sidx = $_GET[&#39;sidx&#39;]; <br />&#160;<br />// sorting order - at first time sortorder <br />$sord = $_GET[&#39;sord&#39;]; <br />&#160;<br />// if we not pass at first time index use the first column for the index or what you want<br />if(!$sidx) $sidx =1; </p>
<p>// calculate the number of rows for the query. We need this for paging the result <br />$result = mysql_query("SELECT COUNT(*) AS count FROM location_country"); <br />$row = mysql_fetch_array($result,MYSQL_ASSOC); <br />$count = $row[&#39;count&#39;]; <br />&#160;<br />// calculate the total pages for the query <br />if( $count &#62; 0 &#38;&#38; $limit &#62; 0) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />} else { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = 0; <br />} <br />&#160;<br />// if for some reasons the requested page is greater than the total <br />// set the requested page to total page <br />if ($page &#62; $total_pages) $page=$total_pages;<br />&#160;<br />// calculate the starting position of the rows <br />$start = $limit*$page - $limit;<br />&#160;<br />// if for some reasons start position is negative set it to 0 <br />// typical case is that the user type 0 for the requested page <br />if($start &#60;0) $start = 0; <br />&#160;<br />// the actual query for the grid data <br />$SQL = "SELECT * FROM location_country ORDER BY $sidx $sord LIMIT $start , $limit"; <br />$result = mysql_query( $SQL ) or die("Couldn&#39;t execute query.".mysql_error());</p>
<p>// we should set the appropriate header information. Do not forget this.<br />header("Content-type: text/xml;charset=utf-8");<br />&#160;<br />$s = "&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;";<br />$s .=&#160; "&#60;rows&#62;";<br />$s .= "&#60;page&#62;".$page."&#60;/page&#62;";<br />$s .= "&#60;total&#62;".$total_pages."&#60;/total&#62;";<br />$s .= "&#60;records&#62;".$count."&#60;/records&#62;";<br />&#160;<br />// be sure to put text data in CDATA<br />while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {<br />&#160;&#160;&#160; $s .= "&#60;row id=&#39;". $row[location_country_id]."&#39;&#62;"; <br />&#160;&#160;&#160; $s .= "&#60;cell&#62;". $row[location_country_id]."&#60;/cell&#62;";<br />&#160;&#160;&#160; $s .= "&#60;cell&#62;". $row[location_country_tel_countrycode]."&#60;/cell&#62;";<br />&#160;&#160;&#160; $s .= "&#60;cell&#62;&#60;![CDATA[". $row[location_country_en]."]]&#62;&#60;/cell&#62;"; <br />&#160;&#160;&#160; $s .= "&#60;cell&#62;&#60;![CDATA[". $row[location_country_gr]."]]&#62;&#60;/cell&#62;"; <br />&#160;&#160;&#160; $s .= "&#60;/row&#62;";<br />}<br />$s .= "&#60;/rows&#62;"; <br />&#160;<br />echo $s;<br />?&#62;</p>
<p>-----------------------------------------------------------------------------------------------------------------------------------------------</p>
<p>I don&#39;t understand where I set the variables to be passed using $_GET. For <strong>EDIT</strong>, I need to send all the variables to here: editurl:"script/jgrid/country_save.php". So, what do I have inside country_save.php??? I thought something like this was needed:</p>
<p>&#60;?php <br />include(&#39;include/config.php&#39;); /* database connection */</p>
<p>$SQL = "UPDATE location_country SET location_country_tel_countrycode = &#39;".$_GET[&#39;location_country_tel_countrycode&#39;]."&#39;, location_country_en = &#39;".$_GET[&#39;location_country_en&#39;]."&#39;, location_country_gr = &#39;".$_GET[&#39;location_country_gr&#39;]."&#39; WHERE&#160; location_country_id&#160; = &#39;".$_GET[&#39;location_country_id&#39;]."&#39; ";</p>
<p>$result = mysql_query( $SQL ) or die("Couldn&#39;t execute query.".mysql_error());&#160; <br />?&#62;</p>
<p>And even so I don&#39;t get how this would work since I haven&#39;t sent the variables to this page. As for the <strong>DELETE</strong> function, I assume I need to do the same as in the <strong>EDIT</strong>, ofcourse, I only need to send the ID to the correct page and execute the command.</p>
<p>If someone could send me a basic example of how to write the script correctly, I&#39;m sure I&#39;m only missing a few small lines of code (the part that sends the GET variables I assume) so that I can understand just how variables get send and processed. The examples I found: "http://trirand.com/jqgrid/jqgrid.html#" don&#39;t make sense to me.</p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 14:22:46 +0200</pubDate>
        </item>
</channel>
</rss>