user556147
user556147

Reputation: 1

trying to pass header into php file not working

I begin with vars.php:

<?php
include('goo.php');
$googl = new goo_gl('http://myurl.info?=sdfdsfs'.uniqid());
$url1 = $googl->result();
$link=$url1; 
$message=$msgarray[rand(0,count($msgarray)-1)];
$picture="http://img6.imageshack.us/img6/4540/7.jpg"; 
?>

I want to feel http://mmyurl.info?=sdfdsfs'.uniqid() into the goo.gl api to spit out a shortened url

and then use this information in vars.php which is in the header''

this info is then used on another page where $link is called, but i can never get it to work properly

Upvotes: 0

Views: 49

Answers (1)

Sarfraz
Sarfraz

Reputation: 382696

You should give a query string variable a name first:

$googl = new goo_gl('http://myurl.info?myvar=sdfdsfs'.uniqid());

Now you can access value of myvar via $_GET['myvar'].

Upvotes: 1

Related Questions