Click to See Complete Forum and Search --> : displaying users input
derezzz
10-26-2003, 02:36 PM
hey. I am trying to create a form where I it begins with my text, then I have a textarea box for a user to type. Then, by clicking on the submit button, I would like for their text to appear under what I had typed originally. The purpose would be something like a continuing story that the user controls. This is extremely simple, I am sure for PHP users, I have a book here but have been unable to really understand all of what I need in it. It appears what I am asking is similar to a guestbook. Can someone show me code for this? I did find on here the code for a php guestbook as well as the tester page for it. Thats very similar to what I want, but the format would be a little different. Is taking the the gestbook code and manipulating it the best way to go? Additionally, I have no idea what CHMOD refers to. Is that something in the code I'd change in order to allow users access to write or is that something thats done through my provider? I dont get that part at all.
THanks in advance
D
PunkSktBrdr01
10-26-2003, 09:11 PM
1. Editing the guestbook code might be the best way to go, as long as there isn't a copyright notice on the code.
2. CHMOD is something used on *nix systems to set file permissions. You should be able to change the CHMOD settings in your FTP program.
I'm assuming the guestbook you are taking about is the one that I wrote here (http://forums.webdeveloper.com/showthread.php?s=&threadid=10856&highlight=guestbook). If so, it is not copyright, and can be modified freely. Also, if that is close to what you are looking for, modifing it would indeed be a good way to go.
Also, as PunkSktBrdr01 mentioned, CHMOD is how we set the file permissions on *nix servers. If you are on a Windows server, just set the file to not be read only.
Good luck, and if you need any more help, let us know.
derezzz
10-27-2003, 12:48 AM
thanks for the responses. I think I got it. I was talking about the guestbook that pyro posted-yes. So, all i do is set the file so it can be read and make myself a blank page called guestbook.html?
No, the blank file is guestbook.txt (and that is also the file that you must CHMOD). The other file contains the code that I posted in the other thread, and must have a .php extention.
aoeguy
10-30-2003, 09:37 AM
Use $_POST["form field here"]
to display the contents of the field name do this:
$name = $_POST["name"];
echo $name;
That won't be saved for other viewers to access later...
aoeguy
10-30-2003, 09:50 AM
Oh, thats what he want s done.
It would appear that way...Originally posted by derezzz
I would like for their text to appear under what I had typed originally. The purpose would be something like a continuing story that the user controls.