Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8802437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:05:31+00:00 2026-06-14T01:05:31+00:00

First of all, I am not en expert at programming, so please explain things

  • 0

First of all, I am not en expert at programming, so please explain things a bit if you can so I can understand them better. I am trying to make a calculator that will have some fields the user can fill out, and will display the last output. Basically this:

Variable boxes
“Go” button
Results display here after Go is pressed.

And the user can change the boxes and click go again to refresh with the new results.

I do not want to use Java for this if at all possible. Please help me with an HTML/PHP solution.

I have this page nammed “isset.php”

<?php 
session_start(); 
error_reporting(E_ALL);
ini_set('display_errors', '1');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>

<?php
     if(isset($_POST['submit']))
        {
        $a = $_POST['a'];
        $b = $_POST['b']; 
        $sf = $a-(2*$b);
        echo "<br><br>Safety Factor is ";
        echo $sf;
        } 
     else {
        echo "Your results will display here after you use the calculator.";
          }
 ?>

 <br>Calculator
 <form name="submit" method="post" action="isset.php">
 <table width="450px">
     <td valign="center">
     <label for="a">a</label></td>
        <td valign="center">
        <input type="text" name="a" value="45"></td></tr>
     <td valign="center">
     <label for="b">b</label></td>
        <td valign="center">
        <input type="text" name="b" value="16"></td></tr>         
 <tr><td colspan="2" style="text-align:center">
 <input type="submit" value="Calculate!">
 </td></tr></table>
 </form>        

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:05:32+00:00Added an answer on June 14, 2026 at 1:05 am

    Change <input type="submit" value="Calculate!"> to <input name="submit" type="submit" value="Calculate!">

    The reason your code is not working is because you’re checking to see if the post data contains the key submit but you haven’t defined it within your form (you do this by adding a name attribute).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I'm not a javascript expert. I'm going crazy on trying to
First off: I am not an expert, so please excuse any mistakes I make
First of all: This question is not directly programming related. However, the problem only
First of all i don't know whether the title is relevant or not (please
First off, I am not a Unix expert by any stretch, so please forgive
I'm not an expert and don't want to make a mistake, so please forgive
First of all: I am not able to find out the proper Title of
first of all: this is not the same as this . The ModelBackend has
First of all I'm not sure this is even possible, however I need to
First of all I am not a designer. so this question is may be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.