basic php form question

Posted on 2007-09-28
Last Modified: 2013-12-13
I need some help with the following code.

the current code makes the "frontpage.php" appear if the checkbox "frontpage" is checked. This works fine

if(isset($frontpage)) {include ('includes/frontpage.php');}

but How do I do a similar example if I want a value to be shown from another file if the checkbox is checked.

config file
$information = "This is the information I need";

<input name="frontpage" type="checkbox" value="frontpage">

process page.
if(isset($frontpage)) echo" $information";
Question by:Cheryl Lander
    LVL 16

    Accepted Solution

    In the process page, first include the config.php file.

    if(isset($frontpage)) {
    include ('includes/config.php');
    echo  $information;

    Author Comment

    by:Cheryl Lander
    works great.

    Im opening up another questions about the same code
    LVL 16

    Expert Comment

    by:Haripriya Sathiish
    Nice. What other problem you are facing?

    Author Comment

    by:Cheryl Lander
    IM trying to resolve it now.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    794 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

    14 Experts available now in Live!

    Get 1:1 Help Now