Jump to content

How to turn form data into strings?


zartzar

Recommended Posts

Depending on how the form is processed either

 

$forminputname = $_GET['forminputname']; // OR
$form2inputname = $_POST['form2inputname'];

 

D'oh! Thats so obvious :palmface:. Still i cant get it to work. Whats wrong with my code?:

 

print "<tr> <td>Race Distance:</td> <td> {$_POST['distance']} </td> </tr>";

print "<tr> <td>Race Time:</td> <td> {$_POST['H']} Hours, {$_POST['M']} Min </td> </tr>";

print "<tr> <td>Your average speed should be:</td> <td> $average </td> </tr>";

 

$H=$_POST['H'];

$M=$_POST['M'];

$distance=$_POST['distance'];

$average=$H+($M/60)/$distance;

 

it just prints nothing for $average

 

?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.