deathstrike369 Posted June 12, 2011 Share Posted June 12, 2011 ok so im working on this calculator for some friends to help them in the game we all play, i got a simple html one working but i want to switch it to php. the problem i have is im getting a syntax error and i cannot figure out what it is <?php $sector= $_POST ["AttackingSector"]; $council= $_POST ["AttackingCouncil"]; $playtype= $_POST ["attpt"]; $system= $_POST ["psatt"]; $titan= $_POST ["atttitan"]; $bot= $_POST ["bot"]; $power= $_POST ["zeorpower"]; $attalert= $_POST ["alert"]; $attres= $_POST ["attres"]; $oversend= $_POST ["oversend"]; $bonus= $_POST ($sector * $council * $playtype * $system * $titan * $bot * $power * $attalert * $attres); $defsec= $_POST ["defensivesector"]; $defcouncil= $_POST["DefensiveCouncil"]; $defpt= $_POST ["defpt"]; $defsystem= $_POST ["psdef"]; $deftitan= $_POST ["deftitan"]; $defalert= $_POST ["defalert"]; $defres= $_POST ["defres"]; $defbonus= $defsec * $defcouncil * $defpt * $defsystem * $deftitan * $defalert * $defres * $oversend; $attwith= $bonus / $defbonus; $python= $_POST ["python"]; $lance= $_POST ["lance"]; $pheonix= $_POST ["phenix"]; $tweet= $_POST ["tweet"]; $superator= $_POST ["super"]; $indie= $_POST ["indie"]; $turret= $_POST ["turrets"]; $ship= $_POST ["fightertype"]; $shipp= $python * 10; $shipl= $lance * 2; $shipP = $pheonix * 5; $shipt= $tweet * 4; $ships= $superator * 11; $shipi= $indie * 20; $shiptu= ($turret * 6); $shipcountotal= $shipp + $shipl + $shipP + $shipt + $ships + $shipi + $shiptu; $number= $shipcountotal / $ship $sendammount ?/> Quote Link to comment https://forums.phpfreaks.com/topic/239116-need-some-help-with-this-simple-calculator/ Share on other sites More sharing options...
mikesta707 Posted June 12, 2011 Share Posted June 12, 2011 you are missing 2 line ending semi colons on your last two lines. and the ending php tag is ?> not ?/> $number= $shipcountotal / $ship; $sendammount; ?> Quote Link to comment https://forums.phpfreaks.com/topic/239116-need-some-help-with-this-simple-calculator/#findComment-1228571 Share on other sites More sharing options...
deathstrike369 Posted June 12, 2011 Author Share Posted June 12, 2011 sigh... its always a semicolon... Thanks a lot man Quote Link to comment https://forums.phpfreaks.com/topic/239116-need-some-help-with-this-simple-calculator/#findComment-1228573 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.