PDA

View Full Version : printing text to a cell in a template


Pea
06-18-2006, 10:06 AM
Hi. I'm trying to make a script so a user can print text to my site template but i'm not sure how i'd go about getting it into the correct cell. Can anyone help?

Thanks. Pete

-i-dont-know-
06-18-2006, 01:34 PM
How does the user input data? Through a form? You need to give more details. I think you may want to use an include, but until you tell more I can't say.

Pea
06-18-2006, 02:24 PM
Well the project i set myself was to let people write tutorials in a form and then put it on my site. I know how to do all that but i just realsed it'd need validation etc. I thought of sending the user content to my email and then me put it on but that destroys the objective of making things easy. . If i made a control panel, the user fills into the form and it's sent to the control panel and stays there untill i send it somewhere else where it's added.

-i-dont-know-
06-18-2006, 02:40 PM
Okay, try this:
1.They submit a tutorial and it is inserted into a database.
2.The field to make note of is 'is_validated'
3.It starts off as 0
4.You go to your admin control panel and the database outputs all tutorials with the field where the 'is_validated' field = 0
5.You read it and if it's all ok, then you click a button that updates the database and most importantly the 'is_validated' field becomes 1
6.On the other end, tutorials are only published if the 'is_validated' field = 1

Does this make sense?
On the other hand if you only want a word filter, you could use some thing like PHP's string replace. Ironically, I have a full tutorial system completely made ready to be paid for but the customer in question seems to have vanished off the face of the Earth :rolleyes: If you want to have that (not free obviously) pm me.

Pea
06-18-2006, 02:59 PM
Sorry i wanted to validate them more so people can't flood or spam etc :P

That seems like a good plan but i'm a total PHP n00b so i better start reading.

-i-dont-know-
06-18-2006, 03:04 PM
Ok, as a pointer, to stop people flooding the same tutorial over and over read up about PHP Cookies and Sessions and use them to stop people submitting more than say 3 every hour for cookies and say one for every visit to the site in a fresh browser window. If I were you, i'd also implement what I mentioned in my eariler post so you can hand censor tutorials.

Pea
06-18-2006, 03:08 PM
OK. Thanks for the help :)

-i-dont-know-
06-18-2006, 03:59 PM
No problem :) Don't hesitate to ask if you need any more