{NcsO}ReichstaG
[H]ard|Gawd
- Joined
- Aug 13, 2004
- Messages
- 1,768
Hey
So I am building a website that runs almost entirely of a MySQL database. I created submission form in which the person fills out certain fields such as, Article Name, and the actual Article Body. There are like 4 columns in the database. (Article ID, Article Name, Article Body, Article_Date Posted) Anyway, this information is submitted into the MySQL DB (Each new article is given a new ID, and assigned the date posted). Then on the main page, I have a php script that reads the values. It displays the article name and the date created and the link to the article, such as, "<a href="/articles/$article_name/">. However, the problem is this: Where do I actually post the real article? Basically my thought was to have a script that autmatically creates .php file in the htdocs directory everytime a new article is made. The .php created should include basic php information so that it can read the connect to the MySQL DB.
Basically I want every time a new article is submitted, for a .php file to be created with default information in it like this:
and named after the name of the article.....
So is this possible?
-Thanks
So I am building a website that runs almost entirely of a MySQL database. I created submission form in which the person fills out certain fields such as, Article Name, and the actual Article Body. There are like 4 columns in the database. (Article ID, Article Name, Article Body, Article_Date Posted) Anyway, this information is submitted into the MySQL DB (Each new article is given a new ID, and assigned the date posted). Then on the main page, I have a php script that reads the values. It displays the article name and the date created and the link to the article, such as, "<a href="/articles/$article_name/">. However, the problem is this: Where do I actually post the real article? Basically my thought was to have a script that autmatically creates .php file in the htdocs directory everytime a new article is made. The .php created should include basic php information so that it can read the connect to the MySQL DB.
Basically I want every time a new article is submitted, for a .php file to be created with default information in it like this:
Code:
mysql_select_db("ArticleArchive",$SQL) or die (mysql_error());
$Query = "SELECT * FROM articles
ORDER BY ArticlesT_ID DESC LIMIT 2
";
$Enter = mysql_query($Query) or die(mysql_error());
while($rows = mysql_fetch_array($Enter))
{
...............so on..........
}
So is this possible?
-Thanks