Jump to content

Warning in Insert Data To DB


msafvati

Recommended Posts

hi

i have a problem!!!

when i insert Data To DB PHP Compiler Show me a warning.

please guide me for this warning

 

Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in E:\MAS\Prj2\Local path\MASRegCod\MASReg.php on line 119

 

Script is :

<?php
$connectionstring = odbc_connect("User", "", ""); 
$query ="insert into tblReguser values(";
$query = $query."'".$_GET['txt1']."',"; 
$query = $query."'".$_GET['txt2']."',"; 
$query = $query."'".$_GET['txt3']."',"; 
$query = $query."'".$_GET['txt4']."',"; 
$query = $query."'".$_GET['txt5']."',"; 
$query = $query."'".$_GET['txt6']."',";
$query = $query."'".$_GET['txt7']."',";
$query = $query."'".$_GET['txt8']."',";
$query = $query."'".$_GET['txt9']."',";
$query = $query."'".$_GET['txt10']."',"; 
$query = $query."'".$_GET['txt11']."',";
$query = $query."'".$_GET['txt12']."',";
$query = $query."'".$_GET['txt13']."',";
$query = $query."'".$_GET['txt14']."',)";
#echo  $query;

$result = odbc_do($connectionstring, $query);
if ($Result == 1)
echo "ÔãÇ ÈÇ ãæÝÞíÊ ÏÑ ÓíÓÊã ßÇÑíÇÈí ßÔæÑí ËÈÊ ÔÏíÏ " ;
odbc_close($connectionstring); 
?>

line 119 : $result = odbc_do($connectionstring, $query);

Thank you..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.