INSERT into table(...... not working suddenly

A

Anonymous

Guest
Help my insert into mysql not working.

table name = user_profile
id
login_name
pword
card_type
name_oncard
card_no
cvv2
expiry

error: "Unknown field name "balong"......

Code:
<?
include("cn.php");
//$name = $_POST['name'];
//$pword = $_POST['pword'];
//$card_type = $_POST['card_type'];
//$name_oncard = $_POST['name_oncard'];
//$card_no = $_POST['card_no'];
//$cvv2 = $_POST['cvv2'];
//$expiry = $_POST['expiry'];
$insert = "insert into user_profile(id,login_name,pword,card_type,name_oncard,card_no,cvv2,expiry) values ('',$login_name,$pword,$card_type,$name_oncard,$card_no,$cvv2,$expiry)";
?>
 
Have you changed your PHP version ?
Seems that before you were using register_globals = On and now it's Off.
So... un-comment that lines.
 
balong3030 said:
error: "Unknown field name "balong"......
Code:
$insert = "
INSERT INTO user_profile
    (id,login_name,pword,card_type,name_oncard,card_no,cvv2,expiry) 
VALUES 
    ('',$login_name,$pword,$card_type,$name_oncard,$card_no,$cvv2,$expiry)";
It seems to me that some of values you entered are strings, hence, must be enclosed inside single qoutes.
Which of them are strings?
 
Back
Top