cry of war Posted July 25, 2007 Share Posted July 25, 2007 I get another blank page <?php if (!isset($_POST['add'])){ $finish = 0; $urlnum = 0; $url = "A"; ?> <html> <head> <title>SGWRAIDER</title> </head> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> PLEASE CLICK INSIDE OF THE SGW SPY LOG AREA AND PRESS CTRL+A THEN CTRL+C THEN CLICK IN THE TEXT AREA BELOW WHERE IT SAYS "INSERT HERE". <textarea rows="20" cols="20" name= "info">INSERT HERE</textarea><br /> ENTER ID: <INPUT TYPE="TEXT" name="id" value="INPUT ID HERE"><br /> <input type="submit" value="add" name="add"><input type="submit" value="submit" name="submit"> </form> <?php } elseif {isset($_POST['submit'])} { for($urlnum = 0; $urlnum = $finish; $urlnum++) { echo "$$url.$urlnum\n"; } } elseif {isset($_POST['add'])}{ $finish++; $urlnum++; $info = $_POST['info']; $info2 = $_POST['info']; $id = $_POST['id']; $find = array('Mercenaries', 'Jaffa Army', 'Super Soldiers', 'Drones', 'Clones', 'bot', 'Units', 'Human Form troop7', 'Soldier', 'NID Agent', 'Army', ' ', ','); $replace = array('troop1','troop2','troop3','troop4','troop5','troop6','troop7','troop8','troop9','troop10','troop11', ' ', ''); $info = str_replace($find, $replace, $info); $info = explode(" ", $info); $find2 = array( ' ', ','); $replace2 = array(' ', ''); $info2 = str_replace($find2, $replace2, $info2); preg_match_all('/.+ [0-9]+/', $info2, $a); foreach ($a[0] as $k => $v) { preg_match_all('/([^0-9]+) ([0-9 ]+)/', $v, $b); $c[$b[1][0]] = explode(' ',$b[2][0]); } //print_r($c); //$fild_for_sum = array('bot', 'Units', 'Human Form Units','Covert Operatives:','Anti-Covert Operatives:'); $fild_for_sum = array('Mercenaries', 'Soldier', 'NID Agent','Covert Operatives:','Anti-Covert Operatives:'); $u = array(''); foreach ($fild_for_sum as $k) $u = array_merge($u, $c[$k]); for ($i = 1; $i < 12; $i++) { $n = 'unit'.$i; $$n = $u[$i]; } $AT = $c['Attack Turns:'][0]; $unitp = $c['Unit Production:'][0]; $armysize= ($unit1 + $unit2 + $unit3 + $unit4 + $unit5 + $unit7 + $unit8 + $unit9 + $unit10 + $unit11); if ($info[82]== "troop7") { $race = '~'; } else if ($info[82] == "troop2") { $race = '~~'; } else if ($info[82] == "troop4") { $race = '~~~'; } else if ($info[82] == "troop9") { $race = '~~~~'; } else if ($info[82] == "troop11") { $race = '****'; } else { $race = '????'; } if ($AT <= 2500) { $active = 'ACTIVE'; } else { $active = ''; } if ($active=='ACTIVE') { if ($urlnum == "") { $urlnum = 0; $finish = 0; $$url.$urlnum="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info[16]($unitp ~ $unit6)</a>$race<br />"; } else { $urlnum = $urlnum++; $finish = $finish++; $$url.$urlnum="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info[16]($unitp ~ $unit6)</a>$race<br />"; } } else { if ($urlnum == "") { $urlnum = 0; $finish = 0; $$url.$urlnum="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info[16]($armysize ~ $unitp ~ $unit6)</a>$race<br />"; } else { $urlnum = $urlnum++; $finish = $finish++; $$url.$urlnum="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info[16]($armysize ~ $unitp ~ $unit6)</a>$race<br />"; } } ?> <html> <head> <title>SGWRAIDER2</title> </head> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> PLEASE CLICK INSIDE OF THE SGW SPY LOG AREA AND PRESS CTRL+A THEN CTRL+C THEN CLICK IN THE TEXT AREA BELOW WHERE IT SAYS "INSERT HERE". <textarea rows="20" cols="20" name= "info">INSERT HERE</textarea><br /> ENTER ID: <INPUT TYPE="TEXT" name="id" value="INPUT ID HERE"><br /> <input type="submit" value="add" name="add"><input type="submit" value="submit" name="submit"> </form> <?php } else { echo "How did you get here"; } echo "</body>"; echo "</html>"; ?> Quote Link to comment Share on other sites More sharing options...
Caesar Posted July 25, 2007 Share Posted July 25, 2007 diaplay_errors = 'On', is you friend. Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 25, 2007 Share Posted July 25, 2007 elseif {isset($_POST['submit'])} you need parentheses, not braces: elseif (isset($_POST['submit'])) you should really be turning error reporting on and crank the notice level if you're going to be debugging, instead of having to come here everytime: ini_set('display_errors', TRUE); error_reporting(E_ALL); (at the top of your page) Quote Link to comment Share on other sites More sharing options...
trq Posted July 25, 2007 Share Posted July 25, 2007 Should be... ini_set('display_errors', '1'); error_reporting(E_ALL); not... ini_set('display_errors', TRUE); error_reporting(E_ALL); ini_set expects two strings. Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 25, 2007 Share Posted July 25, 2007 my bad. thanks thorpe. Quote Link to comment Share on other sites More sharing options...
cry of war Posted July 25, 2007 Author Share Posted July 25, 2007 ok where should i put said lines???? Should be... ini_set('display_errors', '1'); error_reporting(E_ALL); not... ini_set('display_errors', TRUE); error_reporting(E_ALL); ini_set expects two strings. oh ok never mind 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.