mani_ Posted December 3, 2005 Share Posted December 3, 2005 Please can anyone tell me how can i create html pages from php page. I am going to make a simple Article managment project. For example i have put an editor for visitors and let them to create an article. When they submit then the code will create an html page..how can i do this job.Thanks in advance. Link to comment Share on other sites More sharing options...
Jack McKalling Posted December 3, 2005 Share Posted December 3, 2005 You would have to own a database to store it because the alternate flat file would be awful in this case.Have a try at the MySQL tutorial for your database, after you checked if your server supports it (btw, I do can help you write the program if your sure you'd understand it) Link to comment Share on other sites More sharing options...
mani_ Posted December 4, 2005 Author Share Posted December 4, 2005 yes i know how to relate the php with mysql, but i was wishing to create the html pages, i have an ideacan i use the filestream to write the example.html pages whenever an article is submitted and store their id and url in a database or a text file.is it work?if not then tell me the mysql code that you were talking about Link to comment Share on other sites More sharing options...
Jack McKalling Posted December 4, 2005 Share Posted December 4, 2005 You can store the article in a file, but then its only needed to save its url in the database, while it is unique already :(What I meant was to both store the articles content and URL into the database, which is easier than creating files, in my opinion.That way, you can easily limit the size of the article, by simply defining a maximum of characters in a MySQL database table column.Your table could look like this: Author | Title | URL | Content--------------------------------...... | ..... | ... | ............. | ..... | ... | ....... But I suggest also storing the date(/ -time / time), and if you want some more statistics, you might need them later on :)But as far as I think, having all the data of each article stored in your database, will be safer and easier. After all, files that are creatred the way you describe, are not completely safe :)Are you OK with the idea of storing everything in the database? Link to comment Share on other sites More sharing options...
mani_ Posted December 4, 2005 Author Share Posted December 4, 2005 yes you are right. I will use the way of MySQL, but the file stream also(just for testing )thanks for you help Link to comment Share on other sites More sharing options...
Jack McKalling Posted December 4, 2005 Share Posted December 4, 2005 You're welcome anytime Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now