Okay, here's the entire file to give you a better idea.
<?php
include("config.php");
if($submit)
{
include('post.txt');
if(!$contact){ //this means If the title is really empty.
echo "Error: Contact is a required field. Please fill it.";
exit(); //exit the script and don't do anything else.
}
$result = mysql_query("INSERT INTO AL_BVA (contact, time, phone, address, city, state, zip, email, website, notes)
VALUES ('$contact',NOW(),'$phone','$address','$city','$state','$zip','$email','$website','$notes')",$connect);
echo "Contact added";
echo "<meta http-equiv=Refresh content=4;url=bvaindex.php>";
}
else
{
?>
<?
include('form.txt');
?>
<?
}
mysql_close($connect);
?>
Just like the Include used twice in this code, I want to be able to use something similar to grab text from a file (possibly .txt) and have it show like it is right now when the page loads.
The reason why I'm trying to do this is because I have a ton of files like this one and it'd be helpful to be able to edit them from one external file vs editing each one of them when I edit the database.
I really hope that's all the info you need to help me. 🙂