1

Please help me to solve this.

I am trying to insert a variable inside the link

the $keyword variable stands for keywords to search in a specific website here is my code:

$keyword =$_COOKIE['keyword'];
$digikeyurl = 'http://www.digikey.com/product-search/en/capacitors?keywords="'.$keyword. '"';

it doesn't have any error but my problem is, it is not executing properly.

thanks and more power!

Myrts Grc
  • 53
  • 5

4 Answers4

0

try this:

$digikeyurl = 'http://www.digikey.com/product-search/en/capacitors?keywords='.$keyword;
Dinesh
  • 4,066
  • 5
  • 21
  • 35
0

Try this code

$keyword =$_COOKIE['keyword'];

    $digikeyurl = 'http://www.digikey.com/product-search/en/capacitors?keywords='.$keyword;

And get that variable using $_GET['keywords']

Dhinju Divakaran
  • 893
  • 1
  • 8
  • 11
0

Try this

 echo "<script language='javascript'>location.href='http://www.digikey.com/product-search/en/capacitors?keywords='.$keyword. '"'</script>";
0

Try this code

$keyword =$_COOKIE['keyword'];
$digikeyurl = "http://www.digikey.com/product-search/en/capacitors?keywords=$keyword";
Syed mohamed aladeen
  • 6,507
  • 4
  • 32
  • 59