sigmon Posted April 4, 2006 Share Posted April 4, 2006 Hi,I have a calculator on my site that adds up depending on the data passed over from the previous pageI have just installed a new email script as other one went up the shoot so I have had to change from<?php echo $_POST["email"]; ?>to<?php print "$email";?>If i use the old version the data doesnt show, the calculator I'm using is<?php$_POST['Adults'] = '2';$start = 80;$end = 0;unset($end);if("$kids" == '4'){ $end = $start + 17;}else{ $end = $start + 0;}if($_POST['wintersports'] == '7'){ $end = $end + 25; }elseif($_POST['wintersports'] == '14'){$end = $end + 45;}else{ $end = $end + 0;}if($_POST['Age'] == '18-70'){ $end = $end + 0; }elseif($_POST['Age'] == '71+'){$end = $end + 85;}else{ $end = $end + 0;}if(!isset($end)){ $end = $start;} echo '£'.$end; ?>How can i make the calculator work again ???Many thanksSigmon Quote Link to comment Share on other sites More sharing options...
djnrempel Posted April 4, 2006 Share Posted April 4, 2006 I would guess that the new script is sending variables via GET instead of POST.Try altering the other variables the same way, eg. removing the $_POST['variable'] and just expressing them as $variable. Alternately, try substituting the $_POST with either $_GET, or $_REQUEST (which will catch both GET and POST data).The first option should work, since the fact that $email works the same as $_POST['email'] suggests that register_globals is enabled. Quote Link to comment Share on other sites More sharing options...
sigmon Posted April 4, 2006 Author Share Posted April 4, 2006 YOU ARE AWESOME $Adults - worked :)TAHNKS Sigmon 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.