i have a guestbook that checks if footer.php exists... if it does it will continue and display the html code... if it doesnt it will say footer does not exists.
<?php
if (file_exists("footer.php")){
?>
<html>
html code is here
</html>
<?php
} else {
print "footer.php does not exist";
}
?>
that code works perfect
i also have a code that checks if the data file exists.
<?php
if (file_exists("data.txt")){
"do something";
} else {
print "data.txt does not exist";
?>
both codes work fine but i want to be able to use them both together
i have totally confused myself wen doing this..
but basically i want it to check first if the footer exists... if the footer does exist then check if the data file exists. if the footer doesnt exist print the error. and if the footer exists but the daya doesnt then print error saying data file does not exist
not even sure if thats correct what i have said as i have confused myself
lol
help appreciated