Forum


20:06

02/03/2010

I basically want to click add, and a server action will insert a blank row to mysql (which automatically assigns an ID). I need this to be based on a TID variable which I pass from the url:'server.php?tid=5' in the jqgrid JS. There might be another way to mark such a variable but im still very new to jquery/etc..
I have another script that when a record is inserted based on the TID, it automatically assigns a new VLAN and IP to this particular user (code already works on my old framework, just looking to make a newer better working framework).
I've figured out the select boxes for editing a user and what not, but am unsure of the code used when clicking the add button..
{name:'dataul', index:'dataul', width : 55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},{name:'datadl',index:'datadl', width:55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},
00:20

02/03/2010

I guess im just confused about the edit code.. I have in the main page editurl: editsu.php, which is below. However, when i execute a change, it doesnt do anything with this file. I added the die command to verify.
require 'base.php';
die("Success!!");
$operation = $_POST['oper'];
if ($operation == "edit") { qquery("UPDATE customers SET vlan = '".$_POST['vlan']."', datadl = '".$_POST['datadl']."', dataul = '".$_POST['dataul']."', servicetype = '".$_POST['servicetype']."', voicelines = '".$_POST['voicelines']."', freqname = '".$_POST['freqname']."', radioname = '".$_POST['radioname']."', serial = '".$_POST['serial']."', mac = '".$_POST['mac']."' WHERE id = '".$_POST['id']."'") or die(mysql_error());
} elseif ($operation == "add") { qquery("INSERT INTO customers(uname, fname, mname, lname, email, pass, cnumber, level, status) VALUES ('$uname', '$fname', '$mname', '$lname', '$email','$pass', '$cnumber','$level', 2)"); }
13:27

Moderators
30/10/2007

Hello,
Please use FireBug and see what is happen when you post the data. Is the url correct - I mean do you have set the correct path to it?
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.
Most Users Ever Online: 715
Currently Online:
58 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