Jump to content

Simple question looking for a quick simple solution - if statement not executing


jdock1

Recommended Posts

This is pissing me off. Im trying to make it so when a button is clicked it displays phpinfo.

 

I dont understand what Im doing wrong here. It should be working. First, heres my code.

 

<?php
$phpinf= phpinfo();
if (@$_GET['submit'] == "phpinfo")
{
echo "$phpinf";
}
?>

 

At first I didn't create a variable for it, and had simply

echo "phpinfo()"

 

That worked, however instead of displaying the actual php info function it just echoed the text phpinfo(), lol.

 

So I figured this would solve that problem. But no, of course, php has to screw me again!

 

Im sure there is a simple solution to this please help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.