Jump to content

Recommended Posts

The thing is I need to write a single script that allows the traveler to calculate how long it will take to travel a specified number of miles based on speed, number of stops, and weather conditions. I need to include code that requires the user to enter numeric values for miles and number of stops. I need to use a radio button that allows users to select good or bad weather. The predetermined miles per hour is 50mph. This is what I have so far, now I am stumped.

 

<form action="passenger_train.php" method="post">

 

        Speed: <input type="radio" name="speed[]" value="50mph" /> 50 Mph

        <br />

        <p>Weather Conditions:</p>

          <input type="radio" name="weather[]" value="wet" /> Wet

          <input type="radio" name="weather[]" value="dry" /> Dry

          <br />

        Miles: <input type="text" name="miles" size="5" />

        <br />

        Stops: <input type="text" name="stops" size="5" />

        <br />

     

          <input type="submit" name="submit" value="Calculate" />

    </form>

 

<?php

for($i = 0, $x = $nums['x_val'];

 

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.