Gayner Posted December 13, 2009 Share Posted December 13, 2009 <?php header('Content-Type: text/xml; charset=UTF-8'); echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <gt> <status><![CDATA['.$_GET['status'].']]></status> </gt>'; mysql_query("UPDATE users SET status = '". mysql_real_escape_string($_GET["status"]) ."' WHERE id='{$_SESSION['user_id']}'"); ?> error: XML Parsing Error: junk after document element Location: http://localhost/rofl.php Line Number 2, Column 1:<b>Notice</b>: Undefined index: status in <b>C:\wamp\www\rofl.php</b> on line <b>5</b><br /> ^ help ? Link to comment https://forums.phpfreaks.com/topic/184948-junk-after-document/ Share on other sites More sharing options...
ngreenwood6 Posted December 13, 2009 Share Posted December 13, 2009 worked for me when i did test.php?status=1 Link to comment https://forums.phpfreaks.com/topic/184948-junk-after-document/#findComment-976354 Share on other sites More sharing options...
oni-kun Posted December 13, 2009 Share Posted December 13, 2009 worked for me when i did test.php?status=1 This is right. OP, You've simply not added an if(isset($_GET['status'])) { do this; } // else { die('Status not set'); } Link to comment https://forums.phpfreaks.com/topic/184948-junk-after-document/#findComment-976356 Share on other sites More sharing options...
Gayner Posted December 13, 2009 Author Share Posted December 13, 2009 my bad, thx Link to comment https://forums.phpfreaks.com/topic/184948-junk-after-document/#findComment-976375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.