What I want to do is basically have a page that has fields that say like
[ ] Option 1
[ ] Option 2
[ ] Option 3
Etc...
And when the person select's the option(s) then hits the submit button it'll run the php script and on the next page it would print the option's they picked from the uploaded txt files... So say they picked
Options 1 and clicked submit... Assuming Option 1 is associated with option1.txt it would then print what ever text is in option1.txt into the next page...
So far I have this
code:
<?php
DEFINE('SCRIPT_DIR', $_SERVER['DOCUMENT_ROOT'].'/cscripts/');
$option1 = file(SCRIPT_DIR.'option1.txt');
$option2 = file(SCRIPT_DIR.'option2.txt');
$option3 = file(SCRIPT_DIR.'option3.txt');
?>
This only defines variables to use when printing such as
code:
<?php
print "$option1";
?>
Which should print out what's in option1.txt but on a page i have using
code:
<?php
DEFINE('SCRIPT_DIR', $_SERVER['DOCUMENT_ROOT'].'/cscripts/');
$option1 = file(SCRIPT_DIR.'option1.txt');
$option2 = file(SCRIPT_DIR.'option2.txt');
$option3 = file(SCRIPT_DIR.'option3.txt');
?>
<?php
print "$option1";
?>
Prints out array instead of what's in the txt file.; \