• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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