Having a strange problem with some PHP code.
This code:
$filename = "/u2/text/TOPAShiftlog".$dateString."_AShift.rtf";
writes the file TOPAShiftlog2007-10-26_AShift.rtf to the /u2/text dir.
I want it to write 2007-10-26_AShift.rtf to the /u2/text/TOPAShiftlog dir
so I tried this:
$filename = "/u2/text/TOPAShiftlog/".$dateString."_AShift.rtf";
This code ends up removing my "submit" button altogether. I don't understand why the / is causing the problem. Here is the meat of the code:
$filename = "/u2/text/TOPAShiftlog/".$dateString."_AShift.rtf";
$handle = fopen("$filename","w");
$date1[$i]=$row['date'];
$message = "Station Log ";
$message = $message."Date: ".$date1[$i]." \n" ;
.....
$message = $message."\n\n";
if(!fwrite($handle, $message)){
print "Cannot write to file";
exit; }
#print "Success, wrote ($message) to file ";
$message = "";
fclose($handle);
$i++;
}
?>
</table>
<br><input type = 'hidden' name = 'todaym' value = <?=$todaym?>><input type = 'hidden' name = 'todayd' value = <?=$todayd?>><input type = 'hidden' name = 'todayy' value = '<?=$todayy?>'>
<input type='submit' name='Submit' value='Submit'>
</form>
Any ideas would be appreciated
DS