form validation

i have a small company that makes kitchen units i am wanting to design a page where by i input 2 variables a height and width when submitted the results show in an i frame and generate a cutting list but the width is - 64. For example if i type in 720 for height and 500 for width i want the results to show :

2 sides 720 x 560
1 base 520 x 464 (which is the width -64)
1 top 150 x 464 (which is the width -64)
1 shelf 440 x 464 (which is the width -64)
1 back 702 x 464 (which is the width -64)

the height is a set figure but the width is always - 64.

I have been given some coding from a forum but it doesn’t work.
Here is the coding i was told to use :

<input type=”text”name=”height”>

<input type=”text”name=”width”>

$adjusted_width=$width – 64;
$height=”$height”;
Echo”

Sides (2) $height x 570

Top (1) $adjusted_width x 570

Base (1) $adjusted_width x 570

”;

i dont know how to code this into my webpage i have managed to do the form

in the form i put action as process . php

i tried to do a process.php page

<?php $adjusted_width=$width – 64; $height=”$height”; Echo”

Sides (2) $height x 570
Top (1) $adjusted_width x 570
Base (1) $adjusted_width x 570

”; ?>

nothing works
thanks
Michael

From what I read of your post the math doesn’t seem right to me.

2 sides 720 x 560
1 base 520 x 464 (which is the width -64) <---- That isn’t the width - 64
1 top 150 x 464 (which is the width -64)
1 shelf 440 x 464 (which is the width -64)
1 back 702 x 464 (which is the width -64)

Utmost apologies my brain is mashed with figures its the total minus 36 really sorry.

Sponsor our Newsletter | Privacy Policy | Terms of Service