Jump to content

Server Not Acting Right


phpQuestioner

Recommended Posts

All of a sudden today; my web host's server started acting strange. I have a time in one of my pages, like this:

 

$rightnow = date("g:i a");
echo $_GET['rightnow']

 

This will not even display this time.

 

So I just tried this:

 

$rightnow = date("g:i a");
echo "$rightnow";

 

It displayed the time like this; but it was way off and every time I reload the page; the minutes would either go way up or way down.

 

So I just tried to define a basic variable and use $_GET to display in page; like this:

 

$welcome = "Hello";
echo $_GET['welcome']

 

It would not display anything.

 

Does any one know why this might be happening? Has my server been hacked or just my filemanger?

Link to comment
https://forums.phpfreaks.com/topic/40009-server-not-acting-right/
Share on other sites

$_GET variables are variables listed in the address bar.  When you call the $_GET['welcome'] it is looking in the address bar.  leave your code how it is for a second and type this at the end of your address bar:

?welcome=Testing

 

see what that did?

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.