form validation

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

18-Aug-17 02:32
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”><br>
<input type=”text”name=”width”><br>
<input type=”submit”>

$adjusted_width=$width – 64;
$height=”$height”;
Echo” <p>Sides (2) $height x 570<br>
Top (1) $adjusted_width x 570<br>
Base (1) $adjusted_width x 570 </p>”;

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” <p>Sides (2) $height x 570<br>
Top (1) $adjusted_width x 570<br>
Base (1) $adjusted_width x 570 </p>”;
?>

nothing works
thanks
Michael

--
m chambers
18-Aug-17 21:32
And the actual PHP code you are using is, ... ...????


AND define "nothing works"

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
18-Aug-17 21:39
Oh! and, how exactly does 500 - 64 = 464????????????????


"if i type in 720 for height and 500 for width" .... ....


... ...
"
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)
"

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
19-Aug-17 01:47
Apologies my brain mashed with figures its the width - 36

--
m chambers
25-Aug-17 14:30
Although it is somehow difficult task but I will try to solve the issue.
25-Aug-17 15:38
Hi there,

really sorry my head mashed with figures.

I have managed to get this working but i am now stuck on this. If someone types in 600 in the width i want the php if statement to say " is this a oven housing unit. Then two check boxes. Yes and no if yes this statement if no this statement.

Thanks

--
m chambers

 
New posts
Old posts

Follow Elated