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

  • SEARCH
  • Home
  • 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 7801183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:52:01+00:00 2026-06-02T00:52:01+00:00

i am writing a unit converter php program. i have the set up of

  • 0

i am writing a unit converter php program. i have the set up of the page, but it seems like my php file is not being found. when i click the submit button i am brought a an error page. this is my html code.

<html>
<head>
</head>
<body>
<form action="hw7.php" method="post">
<h2>Convert length:</h2>
<p>Select conversion direction: <br />
<input type="radio" name="dir" value="1" 

checked="checked"/> Feet to meters<br />
<input type="radio" name="dir" value="2" /> Meters to feet<br 

/>
</p>

<p>Value to be converted: <br /><input type="text" 

name="cvalue" /></p>
<p><input type="submit" value="Convert" /></p>

 </form>
</body>
</html>

and here is my php file

<?php


$fTOm = $_POST["cvalue"] * 3.2808;
$mTOf = $_POST["cvalue"] / 3.2808;


echo "Result: ";
if ($POST[ 'dir'] == "1") <?php echo "$_POST["cvalue"]; ?> feet = <?php echo "fTOm"; ?> meters;


?>
  • 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-02T00:52:03+00:00Added an answer on June 2, 2026 at 12:52 am

    Your PHP script is likely causing a server error due to improper coding. Check your server logs for PHP related errors, and possibly turn on error_reporting for PHP.

    Within your PHP script, you have a statement of:

    if ($POST[ 'dir'] == "1") <?php echo "$_POST["cvalue"]; ?> feet = <?php echo "fTOm"; ?> meters;
    

    Since you’re already in a PHP script, why are you using the <?php echo inline an if statement?? Correct this issue and try running the script by directly calling it.

    Change the if line to :

    if ($POST[ 'dir'] == "1") {
      echo $_POST["cvalue"] . "feet , " .  $fTOm . " meters";
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing unit tests for a project (written in PHP, using PHPUnit) that have
I'm writing a unit test for a custom subclass of org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<T> and I need
I have been writing unit tests using NUnit and Moq with my Silverlight code
I am writing unit for a class which looks like following using nunit and
I’ve been writing unit tests in strongly typed languages and I have a fair
I'm writing unit tests with NUnit and the TestDriven.NET plugin. I'd like to provide
I am writing unit tests for a spring mvc 3.1 application that is not
I have recently begun writing unit tests (using GoogleTest ) for a C++ project.
I'm writing unit-tests for an app that uses a database, and I'd like to
I am writing unit tests for some of my code and have run into

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.