Jump to content

URL help


u214

Recommended Posts

Hello guys, I have this images where it displays info according to your nickname.

 

Now, let's say my current url for an image is: www.test.com/image.php?Username=TEST

That would of display an image with that name. I got that part ok.

 

Now my question is, how to make different image styles?

 

I was thinking something like this: www.test.com/image.php?Style=2?Username=TEST

"Style=2" being the second choice.

 

My current code is like this:

 

$_GET['Username']; // This to get the name after Username..

//How to make it different styles?
//This is what I tried, but didn't worked:
$istyle = $_GET['Style'];
if(istyle == 1)
{
    $username = $_GET['Username'];

   // Display the image with THAT style ( Style 1 )
}
else if($istyle == 2)
{
    $username = $_GET['Username'];

    // Display the image with the second style
}
... and so on

 

I currently have that, and this would be the url: www.test.com/image.php?Style=2?Username=TEST

That works correctly, but somehow it's not catching the "Username=TEST" part, so the image does not display the name.

Link to comment
https://forums.phpfreaks.com/topic/235654-url-help/
Share on other sites

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.