If you are storing the content in a database, your job is a ton easier.
Just add an edit link on the page you want people to be able to edit. It
will link over to an edit page with the value of the current page sent in
the URL via get.
Get the content from the database pointed to by the url, and stick it in a
variable.
On the edit page have a text area. Set the "value" to the content the person
can edit.
When someone clicks submit, just take the content they submit and stuff it
into the database using UPDATE.
Of course you will need to do safety features like stripslashes() or the
special character functions before storing the data, just to be safe. You
will also want to have the option only available for registered users, and
you probably want to limit it to users you know won't be malicious.
There are many little tricks like using a little piece of javascript to
execute a file on the hard drive that shouldn't be executed, malicious
ActiveX controls, java applets, etc, that you don't want users writing to
the page.
But for administration used by only trusted people, it's actually pretty
simple to put together. For use by people who aren't trusted...
--
Plutarck
Should be working on something...
...but forgot what it was.
""Romulo Roberto Pereira"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I was wondering if anybody have developed something related to dynamic web
> pages building and administration. I need to store the content of the site
> in the database and later as the user navigate, mount the content using
> templates. This part is easy, since PHP is very powerfull in this area. My
> problem would be to let the user modify the actual page content... how?
any
> ideas?
>
> TIA,
>
> Rom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]