Jump to content

Archived

This topic is now archived and is closed to further replies.

covert215

how to use a database

Recommended Posts

I'm very new to php. I'm making my own CMS so that my non-html literate friends can update the website. First, the user logs in. If the username and password are correct, a page is generated that contains a textarea for entering what they want. When they click submit, their article is POSTed into another file. What do I need to do to make any submitted article appear on the front page? Assume I know nothing. I need the article to be stored somewhere and then recalled to the index page. I am very good with HTML but I'm just learning php.

Does anyone know where I could get a script to base this off of or would anyone be willing to help?

Thanks in advance

Share this post


Link to post
Share on other sites
[!--quoteo(post=376851:date=May 24 2006, 07:50 PM:name=covert215)--][div class=\'quotetop\']QUOTE(covert215 @ May 24 2006, 07:50 PM) [snapback]376851[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm very new to php. I'm making my own CMS so that my non-html literate friends can update the website. First, the user logs in. If the username and password are correct, a page is generated that contains a textarea for entering what they want. When they click submit, their article is POSTed into another file. What do I need to do to make any submitted article appear on the front page? Assume I know nothing. I need the article to be stored somewhere and then recalled to the index page. I am very good with HTML but I'm just learning php.

Does anyone know where I could get a script to base this off of or would anyone be willing to help?

Thanks in advance
[/quote]

Does your web server have a database set up on it (i.e. mysql)? PHP is not a database, but a server side language that works well with databases like mysql. What you are needing is probably not what a script could help you with. You might get close, but you will have to modify it to do what you want. And even then, probably have to set up the database on your own to mesh with the code. I hate to say it, but you are going to have to hunker down and learn the language as well as any database you want to use. The phpfreaks tutorials and articles are good as well as php.net and look for the manual.

Don't worry, it isn't much harder than HTML.

Good luck.

DapperDanMan

Share this post


Link to post
Share on other sites
I can use mySQL. Cureently, I have a workaround where the user writes to a text document, which is then displayed on the home page. Does anyone know how to preserve formatting (e.g. keeping line breaks)?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.