I'm posting on this again. Sorry I am so thick heading but I do not
understand why this failure.
I have put in some 'printf' statements for debugging and some comments.
And some questions.
From the menu.html page
<html>
<a href="guestbook .php?var1=list-PINSS.txt"><h3> Padre Island National
Sea Shore</h3></a><br>
<a href="guestbook .php?var1=list-LHL.txt"><h3>Li ght House
Lakes</h3></a><br>
<a href="guestbook .php?var1=list-7LD.txt"><h3>7 Lakes Damon</h3></a><br>
<a href="guestbook .php?var1=list-GR.txt"><h3>Gua dalupe River</h3></a><br>
</html>
To the PHP file
<?php
include $_GET['var1']; //prints to screen the correct information
$file=$_GET['var1'];
printf("-----%s", $var1); // prints nothing.
printf("+++++%s ", $file); // prints to the screen the correct information.
error_reporting (1);
$mode=$_GET['mode'];
if($mode!='view ' && $mode!='sign') $mode=$_POST['mode'];
if($mode!='view ' && $mode!='sign') $mode='sign';
$name=$_POST['name'];
$site=$_POST['site'];
$phone=$_POST['phone'];
$date=date('l, F dS, Y (g:i A T)');
$self=$_SERVER['PHP_SELF'];
printf(;// prints to the screen the correct information.
($handle=fopen( $file,'a+') or die("Could not open file: $file"));// FAILS
............... .....
............... .....
?>
This is the way it appears on the screen....
Sunday, September 24th, 2006 (4:10 PM CDT) Dafydd Cealleigh
da***********@i reland.nat lets go fishing Sunday, September 24th, 2006
(4:30 PM CDT) Dave Kelly da***********@i reland.nat Sunday, September
24th, 2006 (4:53 PM CDT) Jim Kloss da***********@i reland.nat Sunday,
September 24th, 2006 (5:01 PM CDT) Wilson Harmon wi**@harmon.cum 936 894
1710 Sunday, September 24th, 2006 (5:11 PM CDT) Alfred E Newman
49****@vista.fi v 1234483298374
Notice: Undefined variable: var1 in
/var/www/vhosts/texasflyfishers .org/httpdocs/guestbook.php on line 22
-----+++++list-PINSS.txt_____l ist-PINSS.txt_____
Why does $file contain 'list-PINSS.txt' in printf ("_____%s_____" ,
$file) and 'var1' in ($handle=fopen( $file,'a+')?