u214 Posted May 5, 2011 Share Posted May 5, 2011 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. Quote Link to comment Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 yeah you could pass the info through the url, or use databases, your way works Quote Link to comment Share on other sites More sharing options...
spiderwell Posted May 5, 2011 Share Posted May 5, 2011 hope this is a query string typo www.test.com/image.php?Style=2?Username=TEST edit:stupid autolinker Quote Link to comment Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 u214, url should be www.test.com/image.php?Style=2&Username=TEST i assume that it was just a typo Quote Link to comment Share on other sites More sharing options...
u214 Posted May 5, 2011 Author Share Posted May 5, 2011 Yes. Works now! Thanks y'all!! Quote Link to comment Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 no problem glad we could help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.