Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:03:25+00:00 2026-05-23T15:03:25+00:00

I have some grid which use form edit. But after edit success then page

  • 0

I have some grid which use form edit. But after edit success then page reload the data in grid back to the beginning. Its mean that edit process is failed.

I have confused how to post this all variable into process page, because i’m use switch-case for this php page. I put some hidden action inside the form:

jqgrid script.

<form id="editdefdata" class="editable">
<input id="action" name="action" value="changedefdata" type="hidden" />
<button id="defupdate"><span>Update </span></button>
</form>

this the data will be post to process page:

Problem_date:2011-06-10
Line:FA 14
Shift:N
Model:KD-R321EUD
Serial_number:116V4262
DIC:IQC
Def_class:B
Symptom:CD eject shifting
Cause:Under investigate
Symgrup:Function
Modgrup:KD
oper:edit
def_id:15

and this is the process or php page:

$dbc=mysql_connect(_SRV,_ACCID,_PWD) or die(_ERROR15.": ".mysql_error());
$db=mysql_select_db("qdbase",$dbc) or die(_ERROR17.": ".mysql_error());

switch(postVar('action')) {
      case 'oper':
                edit(postVar('def_id'),postVar('DIC'),postVar('Def_class'),postVar('Symptom'),postVar('Cause'));
                break;
        case 'deldefdata':
                //postVar blabla....
                break;
       }

function edit($def_id,$DIC,$Def_class,$Symptom,$Cause){
        $defID = mysql_real_escape_string($def_id);
        $DIC = mysql_real_escape_string($DIC);
        $Defclass = mysql_real_escape_string($Def_class);
        $Symp = mysql_real_escape_string($Symptom);
        $Cause = mysql_real_escape_string($Cause);
        $DIC=strtoupper($DIC);
        $Defclass=strtoupper($Defclass);

        $sql = "UPDATE oqc_defect SET DIC = '".$DIC."', Def_class = '".$Defclass."', ";
        $sql.= "Symptom = '".$Symp."', Cause = '".$Cause."' ";
        $sql.= "WHERE def_id = ".$defID;

echo $sql;
$result=mysql_query($sql) or die(_ERROR26.": ".mysql_error());
//echo $result;
mysql_close($dbc);
}

Could you tell me the correct answer for this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:03:25+00:00Added an answer on May 23, 2026 at 3:03 pm

    I have found the answer by my self.it’s make me so glad, I’m going mad for 1 week because of this problem. All ways I have tried but for this day I have found the real answer.

    first

    If you want to post some parameters you must be check the parameter’s name that will be post to server.On this case, make sure that your colModel's name same with your php file (_POST,postVar, or REQUEST).

    second

    change the prmNames make same with your current parameter operation.
    In this case, I need to change like:

    prmNames: { oper:'action', editoper:'edit', id:'def_id'}
    

    that’s the root cause of my problem.That’s why the script confuse during identifying some variable. The parameter below is the correct result:

    Problem_date:2011-06-10
    Line:FA 14
    Shift:N
    Model:KD-R321EUD
    Serial_number:116V4262
    DIC:IQC
    Def_class:B
    Symptom:CD eject shifting
    Cause:Under investigate
    Symgrup:Function
    Modgrup:KD
    action:edit
    def_id:15
    
    switch(postVar('action')) {
          case 'edit':
                    edit(postVar('def_id'),postVar('DIC'),postVar('Def_class'),postVar('Symptom'),postVar('Cause'));
                    break;
            case 'deldefdata':
                    //postVar blabla....
                    break;
           }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some filter and one grid.And grid have some buttons like modify/edit.I am
There have been some similar questions asked regarding Grid views, but none have been
I have some link elements which are dynamically added and hidden from the page.
I have some problems getting the custom formated JSON data into a dijit.form.FilteringSelect. It
I have a Linq query that returns an anonymous type, which I then use
Let's say I have some grid that looks like this _ _ _ _
I have a grid of some width and height, where each cell can be
I have a grid of rectangular cells covering a plane sitting at some distance
So I have a large grid of 289 rectangles (17x17) and I need some
We have a Telerik Grid (i.e. enhanced version of ASP.Net vanilla grid). On some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.