Combine two php values

Hi All,

Im trying to combine two post values.

value 1 = ".$_POST['value1'];
value 2 = ".$_POST['value2'];

how do I combine them below in the sample below.

$url.="&valuetitle=".$_POST['value1'];  ".$_POST['value2'];

Open in new window

TBerripubAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

N-WCommented:
Try:
$url .= "&valuetitle=" . $_POST["value1"] . $_POST["value2"];

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TBerripubAuthor Commented:
ok thanks.

testing now.
0
Loganathan NatarajanLAMP DeveloperCommented:
Make sure you encode and decode while you passing with URL address. It is safe always.

Like below,

$url .= "&valuetitle=" . $_POST["value1"] . $_POST["value2"];

<a href="index.php?url=<? echo urlencode($url); ?>"></a>

Open in new window

0
Ray PaseurCommented:
When you say combine, if you're looking to concatenate two string variables, you use the dot (period) as the concatenation operator.
http://php.net/manual/en/language.operators.string.php

Some good "getting started" resources are available in this article.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.