![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2005
Posts: 9
Rep Power: 0
![]() |
Comments page
Hi I am using the free version of GeoCities, and I want to have a comments page. Will I be able to have one with out needing a CGI-bin or anything? How would I make one.. please help!
Thanks, Derek |
|
|
|
|
|
#2 |
|
Expert Programmer
|
GeoCities doesn't support php, so the only way to make a comments page on it, would be if they had an option on their sitebuilder or something.
Consider moving to www.100webspace.com, there you can use php and mysql for free. It is easy enough to code up a comments page using php, and store the vcomments in text files or in the mysql database. |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() ![]() |
Yeah, geocities is fairly limited. You couold code this in relatively few lines of PHP
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jan 2005
Posts: 9
Rep Power: 0
![]() |
How would I code it.. I have no experience with PHP/MySQL..
Thanks |
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() |
you could probabally do it with javascript like this:
To save a variable with document.execCommand('SaveAs'), you simply need a hidden IFRAME (or any other such window object) and some scripting, <iframe id="SaveFrame" style="display:none"></iframe>
<script>
function SaveVarAsFile(someVar){
SaveFrame.document.open("text/html","replace")
SaveFrame.document.write(someVar)
SaveFrame.document.close()
SaveFrame.focus()
SaveFrame.document.execCommand('SaveAs')
}
</script>now you can call the function from anywhere on your page. that code should give you the ability to write to a text file on the server. However, i have not tested this, and it most likely doesn't work exactly the way that you want, but it a start. you'd just need to hook it to a form action, or a On submit event. Using PHP & Mysql (or Postgresql) would be the way to go though.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
Look into PHP's File I/O as well, for an alternative.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#7 | |
|
Expert Programmer
|
<iframe id="SaveFrame" style="display:none"></iframe>
Quote:
Well thats if you save every comment into one file anyway. Doing it in PHP would be a real benefit, you don't have to use MySQL if you don't want to. |
|
|
|
|
|
|
#8 |
|
Programming Guru
![]() ![]() |
Let's define what we are using:
document.open([mimeType[, replace]]) This method is used to open a stream to collect the output from any write or writeln methods. The first of the optional parameters is mimeType which determines the type of document you are writing to; if this parameter is not used, the default value is "text/html". The second parameter is replace, also optional, which causes the history entry for the new document to inherit the history entry from the document from which it was opened. Thus meaning, or atleast how i read it, it has nothing to do with the content of the document. Inherit: 1) a. To receive (property or a title, for example) from an ancestor by legal succession or will. b. To receive by bequest or as a legacy. 2) To receive or take over from a predecessor: The new administration inherited the economic problems of the last four years. Please Note, i think this code will only work under IE.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! Last edited by Pizentios; Aug 10th, 2005 at 3:08 PM. |
|
|
|
|
|
#9 |
|
Newbie
Join Date: Jan 2005
Posts: 9
Rep Power: 0
![]() |
Thank you.. I'll do this as soon as I can.. very appreciated
Thank you soo much for your time ![]() Derek |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|