Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: how would I do this

  1. #1

    how would I do this

    Hi guys I would like to add a "guest book" to my web site but I dont know the code to do that I have looked in the book my parents got me but it didnt say (damn M$)

    also I would like to have a "news" section where people can post there comments on that artice just like this www.neworder.box.sk

    TIA
    Michael

  2. #2

    Re:how would I do this

    I think you might want to try using input boxes for your guestbook. Just have the action set to whatever file you want to save to. As for the news, you can always setup a SSL page for authentication, and set the window/frame you want the news to view, to read a specific HTML file instead of being coded into the page. That way you can have the news submitted into a news.html and viewed in the same page. Hope that makes any sence. :P

  3. #3

    Re:how would I do this

    [quote author=Master Copy link=board=9;threadid=7997;start=0#msg72953 date=1066885736]
    Hope that makes any sence. :P

    [/quote]


    uhh yea umm ok ??? ??? I kinda get what you are saying about the guest book and thats about it :-\

    oh and i'm using screem but I see what I can do tonight.

  4. #4

    Re:how would I do this

    What I mean about the news is, Lets say you have a 3 frame index.html page. On your "submit news" button you have a link going to "https://www.site.com/news.html" directing anyone to a login, and then a set in input boxes in the authorized page. From there the info in the boxes are submitted to a file called "newspage.html". On your index.html, instead of typing the news in frame #2, you have that frame monitor "newspage.html", that way all submitted info is then printed out on frame #2. How about now? Make sence? ;D

  5. #5

    Re:how would I do this

    now i'm even more confused I don't really get it

    1. make a 3 frame "index.html"
    2. in that page I have a submit button that takes you to a site called "news.html" which askes them to login ??? thats how far I got :'(

    could mabey give a better example one for a little kid mabey ;D


  6. #6

    Re:how would I do this

    woo I kinda got a guest book going ;D it was in the book the whole time but it was squished in with the text > so now i'll see if I can get a better one going ;D

  7. #7

    Re:how would I do this

    ok now i'mstuck I cant get it to work right I think i'm missed something but I dont know what. here is the code I used and this is the tutorial http://www.htmlgoodies.com/beyond/bbscgi.html I think whast messing me up it the "telnet" part

    <P>
    Tell us what you think by signing our guestbook...<P>
    <form Action="/public_html/bbscgi.cgi" method=post>
    <INPUT NAME="name" Size=50 Type="text"> Your Name<BR>
    <INPUT NAME="email" Size=50 Type="text"> Your E-Mail Address<BR>
    <INPUT TYPE=TEXT NAME="url"> Your Home page URL(optional)<BR>

    Type Your Posted Message Here<BR>
    <TEXTAREA NAME="comments" ROWS=10 COLS=50></TEXTAREA><BR>
    <INPUT TYPE=submit Value="Sign the book">
    <INPUT TYPE=reset Value="Clear Form">
    </FORM>

    <P>
    </td>
    </tr>
    </table>

    #!/usr/local/bin/perl

    # This is the absolute pathname of the BBS file.
    $guestbook="/public_html/guestbook.html";

    # This is the url of that file on the web server.
    $entriespage="www3.telus.net/ra11le/MojoJojo.html";

    # This is the email address of the maintainer.
    $maintainer="ra11le\@telus.net";

    if ($ENV{'REQUEST_METHOD'} eq 'POST&#039 {

    # Get the input

    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

    # Split the name-value pairs

    @pairs = split(/&/, $buffer);

    # Load the FORM variables

    foreach $pair (@pairs) {
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

    $FORM{$name} = $value;
    }


    open (GUESTBOOK,">> $guestbook"
    $currenttime=localtime;

    # Put the new log entry in.


    print GUESTBOOK "$currenttime from $ENV{'REMOTE_HOST'}<BR>\n";

    print GUESTBOOK "<FONT SIZE=+1>$FORM{name}";
    if ($FORM{email} ne "&quot {
    print GUESTBOOK " <<A HREF=\"mailto:$FORM{email}\"><I&gt ;$FORM{email}</I></A>> "; }

    print GUESTBOOK "\n";
    if ($FORM{url} ne "&quot {
    print GUESTBOOK "(<A HREF=\"$FORM{url}\">Home Page</A&gt"; }
    print GUESTBOOK "</FONT><P>\n";
    print GUESTBOOK "$FORM{comments}<HR><P>\n&quot ;;
    close (GUESTBOOK);
    # Thank the user and acknowledge
    # the feedback
    &thank_you;
    }

    &sub_error;

    sub sub_error {
    # Format an error message for the user

    print "Content-type: text/html\n\n";
    print "<HTML>\n";
    print "<HEAD>\n";
    print "<TITLE>Guestbook Form Error</TITLE>\n";
    print "</HEAD>\n";
    print "<BODY>\n";
    print "<H1>Guestbook Form Error</H1>\n";
    print "<HR>\n";
    print "<P>\n";
    print "Form input was not proccessed. Please mail your ";
    print "remarks to $maintainer\n";
    print "</BODY>\n";
    print "</HTML>\n";
    }
    sub evil_characters {

    print "Content-type: text/html\n\n";
    print "<HTML>\n";
    print "<HEAD>\n";
    print "<TITLE>Illegal Email Address</TITLE>\n";
    print "</HEAD>\n";
    print "<BODY>\n";
    print "<H1>Illegal Email Address</H1>\n";
    print "<HR>\n";
    print "<P>\n";
    print "The Email address you entered contains illegal";
    print "characters. Please back up and correct, then resubmit.\n";
    print "</BODY>\n";
    print "</HTML>\n";
    }
    sub thank_you {

    print "Content-type: text/html\n\n";
    print "<HTML>\n";
    print "<HEAD>\n";
    print "<TITLE>Thank You!</TITLE>\n";
    print "</HEAD>\n";
    print "<BODY BGCOLOR=#FFFFFF TEXT=#000000>\n";
    print "<H1>Thank You!</H1>\n";
    print "\n";
    print "<P>\n";
    print "<H3>Thanks for your entry. Your feedback is greatly appreciated.<BR>\n";
    print "Click here to <A HREF=$ENV{'REFERRER'}>Back</A>, or check out the guestbook <A HREF=$entriespage>entries</A>.\n";
    print "<P>\n";
    print "<I>$maintainer</I>\n";
    print "</BODY>\n";
    print "</HTML>\n";
    exit(0);
    }

  8. #8

    Re:how would I do this

    Hello
    well I have searched around and tried messing with telnet but I think it what i'm doing wrong is I dont know where to telnet to :-[

  9. #9

    Re:how would I do this

    I would forget telnet. Use ssh instead. Looks like the only reason they want you to telnet is to view the file.

  10. #10

    Re:how would I do this

    ssh ??? now i'm gonna get even more fucked > the tut says telnet you say ssh then other site say use the damn gui > >

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •