500 internal server error at form connection

Posted by klox on Stack Overflow See other posts from Stack Overflow or by klox
Published on 2010-06-15T08:57:02Z Indexed on 2010/06/15 9:02 UTC
Read the original article Hit count: 214

Filed under:
|
|

hi..all..i've a problem i can't connect to database what's wrong with my code?this is my code:

  $("#mod").change(function() {
                                 var barcode;
                                 barCode=$("#mod").val();
                                 var data=barCode.split(" ");
                                 $("#mod").val(data[0]);
                                 $("#seri").val(data[1]);
                                 var str=data[0];
                                 var matches=str.match(/(EE|[EJU]).*(D)/i);

                                 $.ajax({
                                          type:"post",
                                                        url:"process1.php",                                                                      data:"value="+matches+"action=tunermatches",
                                                        cache:false,
                                                        async:false,
                                                        success: function(res){
                                                                                 $('#rslt').replaceWith(
                                                                                        "<div id='value'><h6>Tuner range is" + res + " .</h6></div>"
                                                                                );
                                                                                }
                                                        });
                                        });

and this is my process file:

switch(postVar('action')) {
 case 'tunermatches' :
                tunermatches(postVar('tuner'));
                break;
function tunermatches($tuner)){
        $Tuner=mysql_real_escape_string($tuner);
  $sql= "SELECT remark FROM settingdata WHERE itemname="Tuner_range" AND itemdata="$Tunermatches";
  $res=mysql_query($sql);
  $dat=mysql_fetch_array($res,MYSQL_NUM);
        if($dat[0]>0) {
                        echo $dat[0];
                        }
mysql_close($dbc);
}

© Stack Overflow or respective owner

Related posts about php

Related posts about jQuery