idire Posted October 6, 2008 Share Posted October 6, 2008 I'm trying to make a script which gets information from a parser, but the GET value on the parser gets two underscores added to it. Why? This is the code: Page 1: echo '<br><br>'.$temp.'<br><br>'; $link = 'http://www.rstracking.com/parser.php?change='.$temp; echo '<br>'.$link.'<br><br>'; $file = file_get_contents($link); echo '<br>File contents: '.$file.'<br>'; Page 2 (parser) $username = $_GET['change']; $sql = mysql_query("SELECT * FROM `change` WHERE username = '$username' LIMIT 0,1"); if(mysql_num_rows($sql) == '0') { //echo 'Sorry, this user is not signed up'; echo 'Username1: '.$username; } Output: (on page1) idire_2005 http://www.rstracking.com/parser.php?change=idire_2005 File contents: Username1: idire_2005__ Link to comment https://forums.phpfreaks.com/topic/127176-where-is-the-extra-__-coming-from/ Share on other sites More sharing options...
Psycho Posted October 6, 2008 Share Posted October 6, 2008 Where is $temp defined in the first script? Link to comment https://forums.phpfreaks.com/topic/127176-where-is-the-extra-__-coming-from/#findComment-657899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.