Forum

July 12th, 2025
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
unable to post data from edit form to DB..
04/03/2010
20:49
Avatar
kelso
Member
Members
Forum Posts: 11
Member Since:
02/03/2010
sp_UserOfflineSmall Offline

Because im unable to post the data here in a readable format, refer to this post for code.

http://stackoverflow.com/quest.....a-troubles

I for the life of me can not get the form data to submit to the db. As long as reloadaftersubmit is false, it shows on the grid, but any reload of the form or grid erases my changes. Im using the navigator add/edit method. This is idealy what I want to use, but finding a "good" working example is hard to come by. your examples on the page have gotten me to where I am now, but when it comes to posting the data, noobs like me are completely lost.

Ive been working on this all week, and made absolutley no progress, and am at my wits end, please assist!

05/03/2010
10:36
Avatar
dams
Lyon in France
Member
Members
Forum Posts: 11
Member Since:
04/03/2010
sp_UserOfflineSmall Offline

Hello ,

View my sample code for update product in database with edit form : ( my little experiance and my english ... Smile )

.HTML :

var gridimgpath = 'js/themes/start/images/'
jQuery(document).ready(function(){
jQuery("#s1list").jqGrid({
 sortable: true,
    url:'data/devis_detail_view.php?q=1&NumFactures=<?php echo $NumFactures_Factures?>',
 datatype: "json",
    colNames:['Actions','Interne','Produit','Reference', 'Libeller',  'Commentaire', 'Quantite', 'Remise','Prix unitaire','Prix total'],
    colModel:[
  {name:'act',index:'act', width:15,sortable:false,align:"center"},
  {name:'id',index:'id', width:20,align:"center",hidden:true},
        {name:'id_produit',index:'id_produit', width:20,align:"center"},
        {name:'Reference',index:'Reference', width:45,align:"center"},
  {name:'Libeller',index:'Libeller', width:45,align:"center"},
  {name:'commentaire',index:'commentaire', width:50, align:"center",editable: true,edittype:"textarea", editoptions:{rows:"5",cols:"30"}},
        {name:'quantite',index:'quantite', width:30, align:"center",editable:true},
        {name:'Remise',index:'id_remise', width:20, align:"center",editable:true},  
  {name:'prix',index:'prix', width:20,align:"center",editable:true,editoptions:{size:5}},
  {name:'$total',index:'$total', width:20,align:"center"},
    ],
    rowNum:25,
    mtype: "POST",
    rowList:[25,50,75],
    imgpath: gridimgpath,
    pager: jQuery('#s1pager'),
    sortname: 'id_produit',
    viewrecords: true,
 toolbar : [true,"top"],
 cellEdit: false,
 cellsubmit: 'remote',
 cellurl:'data/devis_update.php',
 editurl: 'data/devis_update.php',
 reloadAfterSubmit:true,
 autowidth: true,
 forceFit : true,
 sortorder: "asc", 
 gridview : true,
 userDataOnFooter : true,
 footerrow : true, 
 altRows : false,
    caption:"Détails des Produits",

 devis_update.php :

<php require_once('../Connections/gesy.php'); ?>
<?php
include('protect.php');
$id=$_POST[id];
$quantite=$_POST[quantite];
$commentaire=$_POST[commentaire];
$remise=$_POST[Remise];
$prix=$_POST[prix];
print_r($_POST);
mysql_select_db($database_gesy, $gesy);
$modifier="UPDATE factures_produits SET  quantite='$quantite', id_remise='$remise', prix='$prix', commentaire='$commentaire' WHERE id='$id';";
$execute=mysql_query($modifier) or die(mysql_error());
?>

Best regards ,

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
40 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