03-14-2006, 03:36 PM
I have on-line editor and would like to publish article on web site.Do you know how to store such content, that it can be on server and possibility to modify?:)
03-21-2006, 06:05 AM
You have one or you want one?
Basically sounds like you need to figure out a database and the php to store/enter/get info in/from it.
03-21-2006, 08:51 AM
I would like to have form and when submited it will publish contant on web site. How is right procedure to do this like e.g. CMS? Need help.
03-23-2006, 08:29 AM
So... you want to be able to update your site just by using a form... well.... you should be able to use the same logic as a comment system, where people can add comments to pages. Google some of that, maybe.
In short, you need to get familiar with forms in html:
1. form tag needs to be like this: <form action="nextpage.php" method="post"> (if you know what this means, then feel free to add stuff in there... also, change nextpage to the right page.)
2. name each field a unique name.
3. Use this: $var = $_POST['var']; for every variable.
4. Then you need to use those variables and php to do some storing method... database, text files on the server, whatever. (or you could skip steps 6 and 7 if you were able to store it directly into the html/php/etc file that you want the comments displayed on, but this gives you less control over them and makes a bug possibly damage the actual page, rather than just being stored in some unimportant .txt file or whatever.)
5. Have it, after this is done do: echo "Task complete."; or whatever you want, so its clear to the user that it worked.... just a suggestion, not crucial...
now... you've got your comments/entries/whatever.
on yourpage.php (where you want the comments to show up:
6. do the inverse of what you just did on nextpage.php... you need to get it from the database or text file or whatever.
7. display this data however, probably using echo $var; or something.
Obviously it gets more complex, but that's the basic structure.
This isn't meant to make sense yet if you don't know php... just search for what I said... note the commands I mentioned and things like 'database', etc. Google them or look at php.net.
Oh, and if you're using this instead of ftp and it is (well... anything is) a security risk, then you might want to password protect it. there are some pretty easy ways to get started with that.
Basically... have an extra field in the form for a password and check that against the value it should be that's stored in the php file. (if its stored within <?php ?> commands, there's NO way for anyone to read that, so it's safe.) Now.... still... this isn't a really secure way, but at least a start. Security is a big issue once you have people with the ability to input things of their choice... be careful :)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.