Page 1 of 1

www.url.php?result=ok where can i put that ?

Posted: Thu Nov 27, 2003 10:03 am
by gbruit
I've got a request (a back-URL from a form) from a server.It sent the string: http://www.url.com/test.php?result=oke
Can i use a VAR $result or something like that? ie how can i put the oke in my site?
tnx gb

Posted: Thu Nov 27, 2003 10:24 am
by mikusan

Code: Select all

echo $GET['result'];
will return oke

Posted: Thu Nov 27, 2003 10:40 am
by m3mn0n

Posted: Thu Nov 27, 2003 8:32 pm
by gbruit
tnx!
But instead of $GET i used $_GET (see manual)


(I started with PHP 2 days ago -5 years too late- and already in love now.)
gb

errors?

Posted: Sun Dec 28, 2003 5:29 pm
by gobo
Could you emphasize on how to handle errors with this?

im building myself a mysql search script to get used to mysql and php, and i have -

echo $_GET['q'];

so page.php?q=jimbo

will echo jimbo on the page, but if it is just page.php, an error appears telling you that q contains nothing, any way of getting rid of this error?

Posted: Sun Dec 28, 2003 7:24 pm
by DuFF
Something like

Code: Select all

<?php
if (isset($_GET['q']))  //check to see if q is set
{
  echo $_GET['q'];
}
?>
will do the trick.