Jump to content


Photo

how to use a database


  • Please log in to reply
2 replies to this topic

#1 covert215

covert215
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 May 2006 - 12:50 AM

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

#2 DapperDanMan

DapperDanMan
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 25 May 2006 - 04:20 AM

[!--quoteo(post=376851:date=May 24 2006, 07:50 PM:name=covert215)--][div class=\'quotetop\']QUOTE(covert215 @ May 24 2006, 07:50 PM) View Post[/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
[a href="http://www.brierrowstudio.com" target="_blank"]http://www.brierrowstudio.com[/a]

#3 covert215

covert215
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 May 2006 - 11:18 AM

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)?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users