hi everybody,
I need help in implementing preview in php ,just like the preview being used in this forum.i hope to implement it in a newsletter app am working on.Thanks
HELP
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Are you looking for conceptual advice or the actual code to do it? If you want code, you'll have to post your code first.[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Conceptually, it's a fake posting. You do everything that would be done to the post as if it was submitted for real except you don't store any results anywhere except back in the page for further editing.
I think Feyd (as most of the time) has the best solution, but another possibility would be to have a second table. If your primary table is called "entry" the second one could be called "preview_entry". So if you HAD to store the preview, you could put it in preview_entry and then periodically run a cron job to clear out anything in preview_entry that is more than, say, 2 hours old.
I'm not really sure why you would want to do it this way, but I'm just throwing out an idea since you werent very specific with what your needs are.
I'm not really sure why you would want to do it this way, but I'm just throwing out an idea since you werent very specific with what your needs are.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia