cry of war Posted July 21, 2007 Share Posted July 21, 2007 is there something wrong with this because the page wont display when i added some stuff into this if (isset($_POST['add'])){ $info = $_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); $info2 = explode(" ", $info); $armynouu = array(is_int('$info[79]'), is_int('$info[80]'), is_int('$info[81]'), is_int('$info[83]'), is_int('$info[84]'), is_int('$info[87]'), is_int('$info[88]'), is_int('$info[89]'), is_int('$info[109]'), is_int('$info[115]')); $armynouu2 = array_sum($armynouu); if ($info[82]=="troop7") { $race = '~'; } elseif($info[82]=="troop2") { $race = '~~'; } elseif($info[82]=="troop4") { $race = '~~~'; } elseif($info[82]=="troop9") { $race = '~~~~'; } elseif($info[82]=="troop11") { $race = '****'; } else { $race = '????'; } if ($info[118] << 200) { $active = 'ACTIVE'; } else { $active = ''; } if ($active=="ACTIVE") { if ($urlnum== "null"){ $urlnum=0 $finish=0 } else { $urlnum = $urlnum++; $finish = $finish++; } $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info2[16]($info2[121])</a>$race<br />"; } elseif ($urlnum==null){ $urlnum=0 $finish=0 } else { $urlnum = $urlnum++; $finish = $finish++; } $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$info2[16]($armynouu2 ~ $info2[121])</a>$race<br />"; } Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 21, 2007 Share Posted July 21, 2007 First off, whats the problem? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 21, 2007 Share Posted July 21, 2007 With a quick look, you were missing semi-colons on four lines. Try this code: <?php if (isset($_POST['add'])) { $info = $_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); $info2 = explode(" ", $info); $armynouu = array(is_int('$info[79]'), is_int('$info[80]'), is_int('$info[81]'), is_int('$info[83]'), is_int('$info[84]'), is_int('$info[87]'), is_int('$info[88]'), is_int('$info[89]'), is_int('$info[109]'), is_int('$info[115]')); $armynouu2 = array_sum($armynouu); 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 ($info[118] << 200) { $active = 'ACTIVE'; } else { $active = ''; } if ($active=="ACTIVE") { if ($urlnum== "null") { $urlnum=0; $finish=0; } else { $urlnum = $urlnum++; $finish = $finish++; } $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info2[16]($info2[121])</a>$race<br />"; } else if ($urlnum==null) { $urlnum=0; $finish=0; } else { $urlnum = $urlnum++; $finish = $finish++; } $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$info2[16]($armynouu2 ~ $info2[121])</a>$race<br />"; } ?> I checked it on my own server, and it didn't give off any syntax errors like it was. Quote Link to comment Share on other sites More sharing options...
cry of war Posted July 21, 2007 Author Share Posted July 21, 2007 When I go to test the page the page wont display and its not giving me any error reports which isnt helping any but that is the section of code i was editing before my page stopped displaying Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 21, 2007 Share Posted July 21, 2007 Well, for anything to show up at all, this line has to be true: if (isset($_POST['add'])) { Are you using the form to go along with the code? Without the form, nothing is going to work. Also, that script has absolutely no output to the screen...so what do you expect to show up? Quote Link to comment Share on other sites More sharing options...
cry of war Posted July 22, 2007 Author Share Posted July 22, 2007 this is the total code: <?php if (isset($_POST['add'])) { $info = $_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); $info2 = explode(" ", $info); $armynouu = array(is_int('$info[79]'), is_int('$info[80]'), is_int('$info[81]'), is_int('$info[83]'), is_int('$info[84]'), is_int('$info[87]'), is_int('$info[88]'), is_int('$info[89]'), is_int('$info[109]'), is_int('$info[115]')); $armynouu2 = array_sum($armynouu); 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 ($info[118] <= '200') { $active = 'ACTIVE'; } else { $active = ''; } if ($active=="ACTIVE") { if ($urlnum== "null") { $urlnum = $urlnum++; $finish = $finish++; $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info2[16]($info2[121])</a>$race<br />"; } else { $urlnum = $urlnum++; $finish = $finish++; $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info2[16]($info2[121])</a>$race<br />"; } } else { if ($urlnum==null) { $urlnum = $urlnum++; $finish = $finish++; $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$active $info2[16]($info2[121])</a>$race<br />"; } else { $urlnum = $urlnum++; $finish = $finish++; $url[$urlnum]="$race<a href=http://www.stargatewars.com/stats.php?id=$id target=_blank>$info2[16]($armynouu2 ~ $info2[121])</a>$race<br />"; } } ?> <html> <head> <title>Personal INFO</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" wrap="physical">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'])) { ?> <html> <head> <title>Personal INFO</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" wrap="physical">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 { for($urlnum = 0; $urlnum <= $finish; $urlnum++) { echo $url[$urlnum]; } } ?> What I gave you before was the part of the code that i had edited before it started to mess up 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.