Variables Help in PHP -


question answer: https://stackoverflow.com/a/16721000/2217905

<?php if(isset($_post["act"])) { $uname = $_post['username']; //username $uname = str_replace(array('!','"','£','$','%','%','^','&','*','(',')','-','+','=','\\','/','[',']','{','}',';',':','@','#','~','<',',','>','.','?','|',' '), '', $uname);    // set variables , values want propogated through url  $variable['1'] = $_post['username'];  // set base of dynamic link  $link = "http://yunodev.com/skinstealer.php";   // add on question mark link, identify variables being set $link .= "?";  // lets add on our first variable link $link .= $variable['1'];    } ?> <!-- page skinstealer.php --> <html> <head> <title>minecraft skin stealer - image view</title> </head> <body> <img src="http://s3.amazonaws.com/minecraftskins/<?php echo $uname; ?>.png"  width="800" height="400" alt="error"> <p><b>image scaled 800x400pixels. smaller, , no blur when downloaded.</b></p> <p><a href="http://s3.amazonaws.com/minecraftskins/<?php echo $uname; ?>.png">download skin</a></p>a 

this code have right now, want when user goes link: http://example.com/skinstealer.php?id=laim shows skin. if makes sense.

never done variables before new me.

edit after george comment

currently (if echo) http://example.com/skinstealer.php?laim if go link, shows error image. can upload live demo if needed.

got it, finally. (well got other day forgot update question others have problem.)

code remove:

<?php if(isset($_post["act"])) {  // set variables , values want propogated through url  $variable['1'] = $_post['username'];  // set base of dynamic link  $link = "http://yunodev.com/skinstealer.php";   // add on question mark link, identify variables being set $link .= "?";  // lets add on our first variable link $link .= $variable['1'];    } <!-- remove 

you change 'post' 'get', example here: http://yunodev.com/download/minecraft/ (v5)


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -