I want to give my users the ability to upload poetry to my server to be displayed in my website but not sure which way to go about it...
I was considering either just having it so that they upload a .txt or .doc file to the server which i would format later and add to the poetry section in a .php page (I would probably have the upload form save all the required info in the database ready for when i format).
or
have the user copy and paste their poem into a text field which sends the text staright into the database which would mean I need a page to display it im guessing i can just load all the info into one page and stuff so pages wont need to be created
. To do it this way the user would be able to format his/her own poem and it needs to stay thayt way when its displayed in its own page...
help
what should i do... If i've confused you just ask and ill try and explain it better...
Comments
Create a database with fields for stuff like the username, title and content.
Make a PHP script that will gather the information from the user and process it before putting it in the database.
Make a simple listing script to show all the poetry or whatever.
Make a script that obtains data from the database and spits out the HTML needed to view the article.
Basically, if your table has an ID field, you could just grab the id and something like the title from your DB and use them in your artcles list.
Each article would have a link that's something like http://www.yoursite.com/poetry.php?pid=1 where the pid is the articles ID.
When you click the link, it sends you to the article viewing page which looks for the pid value, runs a query like: And then you have all the data in your var, ready for use.
Current project: CMS Object.
Most recent change: Theme support is up and running... So long as I use my theme resource loaders instead of that in the Rails plug-in.
Release date: NEVER!!!
sebastianastill.co.uk - My Portfolio
sebastianastill.co.uk - My Portfolio
You can do this easily like so: \n is the standard linebreak for plain text documents and for stuff put into a text field in a form.
The field type is up to you.
If you intend to have articles which are too long to fit into a standard text field, you'd have to use one of the larger options.
Current project: CMS Object.
Most recent change: Theme support is up and running... So long as I use my theme resource loaders instead of that in the Rails plug-in.
Release date: NEVER!!!
sebastianastill.co.uk - My Portfolio