There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
There seems to be an issue with the first instruction in HTML Form Handling in PHP - Request Superglobals. I am using print_r($var) to print the following superglobals:
$_REQUEST
$_GET
$_POST
I am passing in the above superglobals as arguments for print_r() in the designated spaces with the PHP tag, but it keeps asking if I used print_r() to print the $_REQUEST array. Maybe I am doing it wrong, but I can’t figure out any other possible solutions.
So I had the same issue you did. I messed around for a while with no success, then I thought it might be possible that the PHP statement needed to be made all on the one line, (like the example below). That worked.
<?php print_r($var) ?>
I’m posting this for anyone in the future who gets stuck on this.
Yes seems like it. It doesn’t work for me too until I have to remove the comment and write the php statement in one line for each. No idea why does it have to be this way.
I had this same error, all my code was correct, but when comparing my code with the solution, the side with my code was still displaying “#Print REQUEST data here” instead of what i’d written.
Refreshed the page a few times and pasted the same code back in and it worked after a couple of tries
Was there a previous lesson where print_r was covered? I feel like I might have skipped over something. I just completed the intro course and started in on this one. It was not clear what I was supposed to do until I came here and saw the answer.