Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: [req]Generate a webpage....(please read)

  1. #1
    dsfreak's Avatar
    dsfreak is offline x10 Elder dsfreak is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Arizona, USA
    Posts
    669

    [req]Generate a webpage....(please read)

    I am offering 200 point to anyone that can do this for me.



    See, what I want to do, is be able to have a form, that will, say, have name, email, and the persons question. On submission, I want the form to use a script to create a webpage using letters and numbers, in a random order.... Say 5 of total characters.


    Basically, I want it to send the form info to a perl / cgi script, which will create a webpage, using a random combination of 5 letters and numbers, (eg. 8hj67.html), and put that data on there!

    In example, the form would have: Email: (text field)
    Name: (Text field)
    Question(text field)
    [Submit]

    On the webpage, I would want it to say (Their name) asked the following question (the question).

    Can anyone do this for me?

  2. #2
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: [req]Generate a webpage....(please read)

    dude, why don't you just get a forum!?!?!?

  3. #3
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Re: [req]Generate a webpage....(please read)

    I could, but does it have to be perl/cgi

    I can do it in PHP, I know that because I am currently using it in one of my scripts :naughty:

    edit if so what do you want the pages named

    like the submit page
    Last edited by Chris S; 04-12-2006 at 09:18 PM.

    I would love to change the world, but they won't give me the source code

  4. #4
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: [req]Generate a webpage....(please read)

    i found a substitute for this. go to your cpanel and go to fantastico. site builders, there is this script called soholaunch pro edition, pick that, it will build you a webpage, and it will let you set up some forms, i'm not sure if you can email though

  5. #5
    dsfreak's Avatar
    dsfreak is offline x10 Elder dsfreak is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Arizona, USA
    Posts
    669

    Re: [req]Generate a webpage....(please read)

    PHP works too, forgot to add that.

    The Sumbit page title: Ask a Question

    (hopefully) the generated page: Question number (if possible), or, Question and Anwser.


    Billy, I want this for a reason.

    I don't want to release it, because it is a secret of mine, but forums would not work for it..

  6. #6
    Jordan K is offline [B]tags dont work:([/B] Jordan K is an unknown quantity at this point
    Join Date
    May 2005
    Location
    Hamilton, Ontario, Canada
    Posts
    764

    Re: [req]Generate a webpage....(please read)

    Quote Originally Posted by billybob bo buck
    dude, why don't you just get a forum!?!?!?
    This has no relevancy to what he is asking, stop posting stupid stuff like this, read his entire post next time?
    adcode // ToS // x10Free | x10Paid Hosting
    ------------------------------------------

  7. #7
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Re: [req]Generate a webpage....(please read)

    here it is

    add.php
    Code:
    <html
    <head>
    <title>Ask a Question</title>
    </head>
    <body>
    <form name="form1" method="post" action="question.php">
    <table>
      <tr>
        <td>E-mail</td>
        <td><input name="email" type="text" id="email" value="somebody@somewhere.com" onfocus="if (this.value == 'somebody@somewhere.com') this.value = '';" onblur="if (this.value == '') this.value = 'somebody@somewhere.com'"></td>
      </tr> 
      <tr>
        <td>Name</td>
        <td><input name="name" type="text" id="name" value="John Doe" onfocus="if (this.value == 'John Doe') this.value = '';" onblur="if (this.value == '') this.value = 'John Doe'"></td>
      </tr>
      <tr>
        <td>Question</td>
        <td><input name="question" type="text" id="question" value="Question" onfocus="if (this.value == 'Question') this.value = '';" onblur="if (this.value == '') this.value = 'Question'"></td>
      </tr>
      <tr>
        <td colspan=2><center><input type=submit value=Submit></center></td>
      </tr>
    </table>
    </body>
    </html>
    question.php
    Code:
    <?php
    $name = $_POST['name'];
    $email = $_POST['email'];
    $question = $_POST['question'];
    
    $name = stripslashes($name);
    $email = stripslashes($email);
    $question = stripslashes($question);
    
    $date = date("F j, Y");
    $time = date("H:j:s");
    $time1 = md5($time);
    $time1 = sha1($time1);
    $time1 = substr($time1, 0, 5)
    $name1 = $time1.'.html';
    $file_chmod = "created/$name1";
    $file = fopen("created/$name1", "w+");
    chmod($file_chmod, 0755);
    if (($file) == 'True' OR '1'){
    
    $message = "Email: $email <br> Name: $name <br> Question: $question<br> Time Created: $time";
    
    $write_question = fwrite($file, $message);
    }else{
    echo "Whoops, the file wasn't created. Contact the administrator of the site";
    }
    fclose($file);
    ?>
    that should work, if not post and the errors will get fixed
    Last edited by Chris S; 04-13-2006 at 06:06 AM.

    I would love to change the world, but they won't give me the source code

  8. #8
    James's Avatar
    James is offline Banned James is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    531

    Re: [req]Generate a webpage....(please read)

    Well done Chris! thats a great job

  9. #9
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Re: [req]Generate a webpage....(please read)

    And it was early :-D But if you try it and it doesn't work, just post here and somebody will help with the errors

    I would love to change the world, but they won't give me the source code

  10. #10
    dsfreak's Avatar
    dsfreak is offline x10 Elder dsfreak is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Arizona, USA
    Posts
    669

    Re: [req]Generate a webpage....(please read)

    Seems to work fine, but one problem..


    It does not generate a webpage at all.

    Note: No errors, it just opens up question.php, and it is blank.
    Last edited by dsfreak; 04-13-2006 at 09:34 AM.

Closed Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. How do you read the URL's
    By Chris S in forum Off Topic
    Replies: 5
    Last Post: 04-03-2006, 10:26 PM
  2. If you don't read, you will get a warning.
    By Corey in forum News and Announcements
    Replies: 11
    Last Post: 12-03-2005, 01:09 AM
  3. hi pls read this
    By symbianclub in forum Tutorials
    Replies: 2
    Last Post: 09-11-2005, 05:14 AM
  4. NEW MEMBERS: Did you read the TOS?
    By n4tec in forum Off Topic
    Replies: 5
    Last Post: 07-06-2005, 01:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers