• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

basic php form question

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";

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

------------------------------------------------------
process page.
if(isset($frontpage)) echo" $information";
0
Cheryl Lander
Asked:
Cheryl Lander
  • 2
  • 2
1 Solution
 
CWS (haripriya)Commented:
In the process page, first include the config.php file.

if(isset($frontpage)) {
include ('includes/config.php');
echo  $information;
}
0
 
Cheryl LanderAuthor Commented:
works great.

Im opening up another questions about the same code
0
 
CWS (haripriya)Commented:
Nice. What other problem you are facing?
0
 
Cheryl LanderAuthor Commented:
IM trying to resolve it now.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now