PHP Form

Posted on 2009-04-27
Last Modified: 2012-05-06
I'm very new to PHP so I'm looking for hints/ sample of how I can do the following

I need a simple front end where I would enter two variables in a form which will output the formatted results like below

The formatted text will look like this and the whitespace will need to be taken into account

Place configuration as follows

Question by:wayboo
    LVL 39

    Accepted Solution

    Not sure if I understaood the requirements, but try this:
    <html><head><title>front end</title>
    <input type="text" name="variable1" />
    </label><br />
    <input type="text" name="variables" />
    </label><br />
    <input type="submit" />
    if(isset($_REQUEST['variable1'])) {
      echo "<pre>Place configuration as follows

    Open in new window

    LVL 39

    Expert Comment

    by:Roger Baklund
    There should be an ending </pre> tag:
    echo "<pre>Place configuration as follows

    Open in new window


    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now