Some quick thoughts:

Is the $Namak variable being correctly passed to the query?

Have you tried to echo out the query just to see precisely what is being passed to 
MySQL?

On the first line of the query:

        $query  ="Insert into Kel (NIP,Id_kel,Nama,Status)";

You might need a space after ')' before passing it to MySQL.


Michael Egan

-----Original Message-----
From: Remon Redika [mailto:[EMAIL PROTECTED]]
Sent: 14 August 2002 01:23
To: [EMAIL PROTECTED]
Subject: [PHP] Variable 


this is the form
 -------------- insert.php ---------------- 

<tr>
     <td width="105">Nama Satu</td>
     <td width="289">
       <input type="text" name="namasa" size="40">
     </td>
   </tr>
     <td width="105">Nama Dua</td>
     <td width="289">
       <input type="text" name="namadu" size="40">
     </td>
   </tr>
     <td width="105">Nama Tiga</td>
     <td width="289">
       <input type="text" name="namati" size="40">
     </td>
   </tr>
 ----------------variable and my query ---------------------- 

$Namak = $namasa;
$Namak = $Namak.$namadu;
$Namak = $Namak.$namati; 

$query  ="Insert into Kel (NIP,Id_kel,Nama,Status)";
$query .="Values ('$NIP','$Id_kel','$Namak','$Status')"; 

the problem is my query cant execute the variable $Namak
i got failed message from mysql query 

help!!!! 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to