Xyphon Posted January 24, 2009 Share Posted January 24, 2009 My error_report() isnt working so I dont know the error.. I looked through looked like nothing was wrong.. <?PHP error_reporting(E_ALL); ini_set('display_errors','On'); includejavascript:document.forms['EditForm'].screen.value=3;document.forms['EditForm'].submit();('Connect.php'); include('top.php'); $ID= $_COOKIE['UserID']; $Chuunin_Result= mysql_query("SELECT * FROM Chuunin_Exams WHERE ID='$ID'"); $Chuunin_Rows= mysql_fetch_array($Chuunin_Result); if(!isset($ID)) { echo "Sorry, you must be logged in to view this page."; include('bottom.php'); exit; } $ID= mysql_real_escape_string($ID); $Chuunin1= $Chuunin_Rows['Chuunin_1']; $Chuunin2= $Chuunin_Rows['Chuunin_2']; $Chuunin3= $Chuunin_Rows['Chuunin_3']; $Submit1= $_POST['Submit1']; $Submit2= $_POST['Submit2']; $Submit3= $_POST['Submit3']; if($Chuunin1=="") { if(!isset($Submit1) { echo "Hello. these are the Chuunin Exams. You must battle 3 people to pass the exams. The recommended level is 20 for these exams."; echo "<form method='POST'><input type='submit' name='Submit 1' value='First Battle!'></form>"; } else { mysql_query("DELETE FROM Battle_Information WHERE ID='$ID'"); $Enemy_ID="0"; $Enemy_ID= mysql_real_escape_string($Enemy_ID); $Enemy_Name="Chuunin Enemy 1"; $Enemy_Name= mysql_real_escape_string($Enemy_Name); $Enemy_Element="Fire"; $Enemy_Element= mysql_real_escape_string($Enemy_Element); $Enemy_Weapon="Kunai"; $Enemy_Weapon= mysql_real_escape_string($Enemy_Weapon); $Enemy_Taijutsu="Punch"; $Enemy_Taijutsu= mysql_real_escape_string($Enemy_Taijutsu); $Enemy_Ninjutsu="Fire Ball Jutsu"; $Enemy_Ninjutsu= mysql_real_escape_string($Enemy_Ninjutsu); $Enemy_Genjutsu="Substitute"; $Enemy_Genjutsu= mysql_real_escape_string($Enemy_Genjutsu); $Enemy_Clan="None"; $Enemy_Clan= mysql_real_escape_string($Enemy_Clan); $Enemy_Chakra="27"; $Enemy_Chakra= mysql_real_escape_string($Enemy_Chakra); $Enemy_HP="2219"; $Enemy_HP= mysql_real_escape_string($Enemy_HP); $Enemy_Level="18"; $Enemy_Level= mysql_real_escape_string($Enemy_Level); $Enemy_Ninjutsu_Power="0"; $Enemy_Ninjutsu_Power= mysql_real_escape_string($Enemy_Ninjutsu_Power); $Enemy_Genjutsu_Power="0"; $Enemy_Genjutsu_Power= mysql_real_escape_string($Enemy_Genjutsu_Power); $Enemy_Taijutsu_Power="0"; $Enemy_Taijutsu_Power= mysql_real_escape_string($Enemy_Taijutsu_Power); $Enemy_Weapon_Power="2219"; $Enemy_Weapon_Power= mysql_real_escape_string($Enemy_Weapon_Power); mysql_query("INSERT INTO Battle_Information (Enemy_ID, Enemy_Name, Enemy_Element, Enemy_Weapon, Enemy_Taijutsu, Enemy_Ninjutsu, Enemy_Genjutsu, Enemy_Clan, Enemy_HP, Enemy_Max_HP, Enemy_Chakra, Enemy_Max_Chakra, Enemy_Level, Enemy_Ninjutsu_Power, Enemy_Taijutsu_Power, Enemy_Genjutsu_Power, Enemy_Power, ID) VALUES('$Enemy_ID', '$Enemy_Name', '$Enemy_Element', '$Enemy_Weapon', '$Enemy_Taijutsu', '$Enemy_Ninjutsu', '$Enemy_Genjutsu', '$Enemy_Clan', '$Enemy_HP', '$Enemy_HP', '$Enemy_Chakra', '$Enemy_Chakra', '$Enemy_Level', '$Enemy_Ninjutsu_Power', '$Enemy_Taijutsu_Power', '$Enemy_Genjutsu_Power', '$Enemy_Weapon_Power', '$ID')") or die(mysql_error()); header ('Location: battle.php'); } } include('bottom.php'); ?> whats going on here? Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/ Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 what is the problem? Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745112 Share on other sites More sharing options...
uniflare Posted January 24, 2009 Share Posted January 24, 2009 includejavascript:document.forms['EditForm'].screen.value=3;document.forms['EditForm'].submit();('Connect.php'); this line? i dont get it, what do you want to include? or do ou mean to echo the javascript? EDIT: I see: change it to this: include('Connect.php'); Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745113 Share on other sites More sharing options...
Xyphon Posted January 24, 2009 Author Share Posted January 24, 2009 Ehh!! That wasnt there about 20 seconds ago!!! I think its a hacker!!! Before hand it was already include('Connect.php'); The problem is it displays nothing. Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745118 Share on other sites More sharing options...
Philip Posted January 24, 2009 Share Posted January 24, 2009 <?php error_reporting(E_ALL); ini_set('display_errors','On'); include('Connect.php'); include('top.php'); $ID= $_COOKIE['UserID']; // CHECK ID echo $ID; // ADDED MYSQL_ERRORS $Chuunin_Result= mysql_query("SELECT * FROM Chuunin_Exams WHERE ID='$ID'") or die(mysql_error()); $Chuunin_Rows= mysql_fetch_array($Chuunin_Result); if(!isset($ID)) { echo "Sorry, you must be logged in to view this page."; include('bottom.php'); exit; } $ID= mysql_real_escape_string($ID); $Chuunin1= $Chuunin_Rows['Chuunin_1']; $Chuunin2= $Chuunin_Rows['Chuunin_2']; $Chuunin3= $Chuunin_Rows['Chuunin_3']; $Submit1= $_POST['Submit1']; $Submit2= $_POST['Submit2']; $Submit3= $_POST['Submit3']; if($Chuunin1=="") { if(!isset($Submit1) { echo "Hello. these are the Chuunin Exams. You must battle 3 people to pass the exams. The recommended level is 20 for these exams."; echo "<form method='POST'><input type='submit' name='Submit 1' value='First Battle!'></form>"; } else { mysql_query("DELETE FROM Battle_Information WHERE ID='$ID'") or die(mysql_error()); $Enemy_ID="0"; $Enemy_ID= mysql_real_escape_string($Enemy_ID); $Enemy_Name="Chuunin Enemy 1"; $Enemy_Name= mysql_real_escape_string($Enemy_Name); $Enemy_Element="Fire"; $Enemy_Element= mysql_real_escape_string($Enemy_Element); $Enemy_Weapon="Kunai"; $Enemy_Weapon= mysql_real_escape_string($Enemy_Weapon); $Enemy_Taijutsu="Punch"; $Enemy_Taijutsu= mysql_real_escape_string($Enemy_Taijutsu); $Enemy_Ninjutsu="Fire Ball Jutsu"; $Enemy_Ninjutsu= mysql_real_escape_string($Enemy_Ninjutsu); $Enemy_Genjutsu="Substitute"; $Enemy_Genjutsu= mysql_real_escape_string($Enemy_Genjutsu); $Enemy_Clan="None"; $Enemy_Clan= mysql_real_escape_string($Enemy_Clan); $Enemy_Chakra="27"; $Enemy_Chakra= mysql_real_escape_string($Enemy_Chakra); $Enemy_HP="2219"; $Enemy_HP= mysql_real_escape_string($Enemy_HP); $Enemy_Level="18"; $Enemy_Level= mysql_real_escape_string($Enemy_Level); $Enemy_Ninjutsu_Power="0"; $Enemy_Ninjutsu_Power= mysql_real_escape_string($Enemy_Ninjutsu_Power); $Enemy_Genjutsu_Power="0"; $Enemy_Genjutsu_Power= mysql_real_escape_string($Enemy_Genjutsu_Power); $Enemy_Taijutsu_Power="0"; $Enemy_Taijutsu_Power= mysql_real_escape_string($Enemy_Taijutsu_Power); $Enemy_Weapon_Power="2219"; $Enemy_Weapon_Power= mysql_real_escape_string($Enemy_Weapon_Power); mysql_query("INSERT INTO Battle_Information (Enemy_ID, Enemy_Name, Enemy_Element, Enemy_Weapon, Enemy_Taijutsu, Enemy_Ninjutsu, Enemy_Genjutsu, Enemy_Clan, Enemy_HP, Enemy_Max_HP, Enemy_Chakra, Enemy_Max_Chakra, Enemy_Level, Enemy_Ninjutsu_Power, Enemy_Taijutsu_Power, Enemy_Genjutsu_Power, Enemy_Power, ID) VALUES('$Enemy_ID', '$Enemy_Name', '$Enemy_Element', '$Enemy_Weapon', '$Enemy_Taijutsu', '$Enemy_Ninjutsu', '$Enemy_Genjutsu', '$Enemy_Clan', '$Enemy_HP', '$Enemy_HP', '$Enemy_Chakra', '$Enemy_Chakra', '$Enemy_Level', '$Enemy_Ninjutsu_Power', '$Enemy_Taijutsu_Power', '$Enemy_Genjutsu_Power', '$Enemy_Weapon_Power', '$ID')") or die(mysql_error()); header ('Location: battle.php'); } } include('bottom.php'); ?> Does that return anything? Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745121 Share on other sites More sharing options...
Xyphon Posted January 24, 2009 Author Share Posted January 24, 2009 No.. It's a white page, as if there was an error, but with the error_reporter it deosnt display the error.. Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745123 Share on other sites More sharing options...
Philip Posted January 24, 2009 Share Posted January 24, 2009 Change: // CHECK ID echo $ID; to: // CHECK ID echo 'ID is: ',$ID; Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745124 Share on other sites More sharing options...
Xyphon Posted January 24, 2009 Author Share Posted January 24, 2009 No difference Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745125 Share on other sites More sharing options...
Philip Posted January 24, 2009 Share Posted January 24, 2009 Could anything in the other two scripts cause it to die/exit? include('Connect.php'); include('top.php'); Check it by changing: error_reporting(E_ALL); ini_set('display_errors','On'); to: error_reporting(E_ALL); ini_set('display_errors','On'); echo 'test'; Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745126 Share on other sites More sharing options...
Xyphon Posted January 24, 2009 Author Share Posted January 24, 2009 Still nothing. Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745127 Share on other sites More sharing options...
Xyphon Posted January 24, 2009 Author Share Posted January 24, 2009 bump Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745280 Share on other sites More sharing options...
uniflare Posted January 24, 2009 Share Posted January 24, 2009 ok since you cannot use error_reporting (really bad sign of webhost, i can PM you a much better free webhost ive used before); you are guna have to debug it yourself, use the exit() function. first, put exit("DOES THIS OUTPUT"); at the very top of the page. if it shows then move it down a line, if not then you know its what ever is including that file, or a misconfiguration. keep moving it down a line until it does not show, then whatever is between the line it did show on, and the line it didn't is the problem. hope this helps, Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745397 Share on other sites More sharing options...
justinh Posted January 24, 2009 Share Posted January 24, 2009 I don't know if this would help you or not, but you should look into XAMPP. I've been using it for about 5 months now and I love it. Easy installer, installs apache, mysql, and php on your computer. Therefore you don't have to upload anything. Just save your files in the xampp/htdocs/ folder, and your good to go. Does anyone else use XAMPP? What is everyone's thoughts on it? Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745404 Share on other sites More sharing options...
uniflare Posted January 24, 2009 Share Posted January 24, 2009 Maybe make a new topic for that, but i've used WAMP before. but to be honest i like installing it all seperately, for me - it feels like i understand more and can control more of the individual servers. Quote Link to comment https://forums.phpfreaks.com/topic/142224-whats-wrong-here/#findComment-745408 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.