• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

GET Query String

Hi,
I don't get what I've done wrong here...I'm trying to pass a variable from send.html to receive.php using query strings. Here;s my code

//send.html
<a href="http://www.mydomain.com/receive.php?email='abc@abc.com'">Click here to send</a>

//receive.php
<?
$email=$GET['email'];
echo "HI ".$email;
?>
Why is $email not being displayed?
0
skylabel
Asked:
skylabel
  • 2
3 Solutions
 
RoonaanCommented:
Try removing the single quotes. Although that might not be the problem.

You can debug by using
print_r($_GET);

-r-
0
 
Richard QuadlingSenior Software DeveloperCommented:
Hi skylabel,


You've missed the _ in $_GET. You have $GET.

Regards,

Richard Quadling.
0
 
Michael701Commented:
you must also urlencode( ) the email address, @ is not allowed in url data

Michael
0
 
Richard QuadlingSenior Software DeveloperCommented:
1 line and SO many errors! Doesn't bode well does it!

My crappy weekend is spilling out onto the net! Oh joy!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now