Linked Questions

Popular Questions

passing a value from get to a url

Asked by At

How do I pass the value from the variable $name1 (Let's say its bobsmith) to replace janedoe

<?php

$name1 = $_GET["name"];

$curl = curl_init();
$user = "user1";
$password = "pass1";
curl_setopt_array($curl, array(
CURLOPT_URL =>'https://betawebservices.whatever.com/login/service/v4/SchemaData/INDIVIDUAL- 
ACTIVITIES-University/USERNAME:janedoe/',

I was hoping that I could say

<?php

$name1 = $_GET["name"];

$curl = curl_init();
$user = "user1";
$password = "pass1";
curl_setopt_array($curl, array(
CURLOPT_URL=>'https://betawebservices.whatever.com/login/service/v4/SchemaData/INDIVIDUAL- ACTIVITIES-University/USERNAME:$name1/',

...but that doesnt work. Thanks

Related Questions