0

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

2 Answers 2

2

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)";
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.