PHP Form to Variable.

Posted on 16th Feb 2014 by admin

Hi! I have written a HTML-form code in DreamWeaver CS3 (in a PHP doc) and I really need it to work soon :/

I have a form:
(<form name="form1" action="" method="post">)

and inputs to it:

(<input name="name" type="text" maxlength="11" />)...

and I need that into a variable or what it's called...
So when I type "Hello World" in that textbox... It will type "Hello World" outside the form in Dynamic Text...

like:

<p><b><?php $name ?></b></p>

Then the text will be shown as (<p><b>Hello World</b></p>)

And in an IMG src-code it will get the image called "Hello World" in that folder:

<img src="img/<?php $name ?>.gif">

(If there WAS a picture called "Hello World.gif")

Hope you understand my explaination here

Other php-forum