kritik
kritik

Reputation: 1

php db programming

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

Answers (2)

Gary Tsui
Gary Tsui

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

Awais Qarni
Awais Qarni

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

Related Questions