Мой код
$data = array('promoCode' => $_POST["00"]);
$data_string = json_encode($data);
$url="http://website.com/promotions/(here)" . $name;
$auth_code = $_POST["auth"];
$name = $_POST["voucher"];
$ch = curl_init(); ;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_POST, count($data_string));
curl_setopt($ch, CURLOPT_POSTFIELDS, ($data_string));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: ' . $auth_code,
'Connection: close'
));
Я хочу добавить строку после косой черты /
из http://website.com/promotions/
Мне нужно добавить ее как $name = $_POST["voucher"];
, чтобы соединить ее сHTML-ввод.