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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gbruit
Forum Newbie
Posts: 4
Joined: Wed Nov 26, 2003 8:15 pm

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

Post 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
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post by mikusan »

Code: Select all

echo $GET['result'];
will return oke
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

gbruit
Forum Newbie
Posts: 4
Joined: Wed Nov 26, 2003 8:15 pm

Post 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
gobo
Forum Newbie
Posts: 9
Joined: Sun Dec 28, 2003 5:29 pm

errors?

Post 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?
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post 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.
Post Reply