I'm trying to pass the return value of a php function through query string but its not working. Please look into the code below:
Here I'm trying to replace $myvar in the query string.
<button onClick="parent.location='http://www.example.com&id=$myvar'">Design Your product</button>
The php function to retrieve $myvar is given below:
<?php
$myvar=Design();
function Design()
{
// my function code
return $result;
}