Reputation: 1
how to insert multiple values in single row of database using php? For example the table contains name,email,address line1,address line2,note. The Database table contains name,email,address,note. i.e for a single user address line 1,address line 2 should come under address .Please help me find out
Upvotes: 0
Views: 483
Reputation: 1755
You appned your address line1, and address line2 together using string concatenation; though i m not sure if that's the best way you want.
[1] http://www.phpf1.com/tutorial/php-string-concatenation.html
Upvotes: 0
Reputation: 18006
You can concate address one and address two like this
$address=$addressline1.$addressline2; $q="insert into table (name,email,address,note) values($name,$email,$address,$note)";
Upvotes: 2