Results 1 to 4 of 4

Thread: New to webites and stupid

  1. #1
    Join Date
    Mar 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default New to webites and stupid

    Hey guys i'm amking my own website, i'm pretty good at html but everything else i'mm an idiot, and stupid at and would appreciate your help. Is there a script that i can make a pop up box that people enter tehir e-mail and name to and it will send it to me. I need a code like my friend have on his site http://www.4evertoned.com/. I would appreciate it a great deal
    Doug

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This needs to be done server-side. Not a task for a newbie. Read through the documentation on http://www.php.net/.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I would recomend this website: http://www.thesitewizard.com/wizards/feedbackform.shtml

    It should get you started.. If u dont have php or perl, u can use a remote host.. have a look..

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The popup is javascript. Google that. Easy.

    The form is php.

    It's really not that hard. Yeah... php.net and look for stuff.

    Basically, set the form's action to either the same page or another, and in that page, put a php script that handles the data input. I'd say, for your use, put it in a new page.
    Ex:
    <form action="nextpage.php" method="post">
    Now... you've got your form setup. Put that in a popup with correctly named fields for comment, email, whatever.
    Now... in nextpage.php (or yournamehere.php), do something like this:
    PHP Code:
    <?php
    $varname 
    $_POST['varname']; /*gets the variables that were sent from the
    form. see 'method="post"' above. The other one is "get"/$_GET[''], but that
    adds them to your url as well, so this way its hidden and cleaner.*/
    [repeat above line for each variable.] //repeat above...

    INSERT add to database code OR mail() function code
    /*I'd recommend the mail function... have it mail  to your email (maybe setup
    a free new account) and then just use html to add to your page. You could
    use a database and it would be easier, but then you'd have to have a db and
    know how to put the data in and get the data out. Tutorials will help with
    either of these. You could even do something with a text file instead of a
    database or something... but... I'd recommend the other two options. (Maybe
    you could even code it to add directly to your page... that's kinda risky
    though... at least the email way lets you verify...)*/

    if ([CHECK IF IT WORKED HERE-- see tutorial for method you choose above]) { //optional
    echo "[insert html (javascript) for the closepopup command]"/*prints html
    that will close the window.*/
    //optional, see above
    ?>
    Hope this helps.

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
  •