PHP Form to Variable.


Posted on 16th Feb 2014 07:03 pm 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">)
Did you know?Explore Trending and Topic pages for more stories like this.

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
No comments posted yet

Your Answer:

Login to answer
174 Like 34 Dislike
Previous forums Next forums
Other forums

reading partial code from external site
Hi,

I am trying to write a script for my website to get an article from an external website.

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?

If it found public_html perform <?php incl

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

Sendmail.php - heading error following check_input
Hi,

I would greatly appreciate some help? I am brand new to PHP and have been searching and e

php forms and database navigatio
Hello,
I'm new to php and i'd like to post the following.
I have written code to get records f

php is not recognized as an internal or external command
Hello,

I am trying to bake the code in CakePHP through my console.
I have changed my Path

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash