Jump to content

Is there a way to do this?


damdempsel

Recommended Posts

You hit the nail on the head "get" data.

 

$username = isset($_GET['username'])?$_GET['username']:'';
echo $username;

 

isset tests if the data has been set, if not the ? and : (ternary operator) is like a short if else, if it was set set $username to the get data, else set it to blank to avoid errors further down the line.

 

Hope that helps ya.

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.