Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Append variable at end of URL - PHP

I want to append the variable $name to the URL http://google.com/script.php so that I can call the variable in another script.

How do I modify the following code without having those syntax errors?

Thanks.

Codes:

$name = $_GET['smsname'];
$call = $client->account->calls->create('+103632', $number,                                             
        'http://google.com/script.php'
    );
like image 522
user1581579 Avatar asked Apr 23 '13 16:04

user1581579


1 Answers

Append it like so

$name = $_GET['smsname'];
$call = $client->account->calls->create('+103632', $number,                                             
        'http://google.com/script.php?name='.$name
    );

And in the next page you can get it using $_GET['name']

like image 99
raidenace Avatar answered Sep 27 '22 22:09

raidenace