Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Help w/weird e-mail forms

    Hey all

    Im new to PHP, and I just need a bit of help.

    I want to make an e-mail form, with text forms, drop-down selections, radio buttons, and check boxes. After the person clicks the "submit" button, instead of being taken to one of those pages by Freedmail or Bravenet or whatever, to be taken to one of my pages.

    I've tried so many options, first using e-mail form hosters. Then I tried script generating, with the PHP included. The problem was that I couldn't add any of my own fields besides the ones given, which were all text boxes when I wanted drop-downs as well.

    Around a week ago, I tried writing my own PHP script, but I couldn't from scratch.

    Can anyone help me write a code of somesort? Or show me an example of a PHP script written to e-mail the results of a drop-down/radio button/checkbox/text field enabled e-mail form? (I could work from there)

    ~Purple Rabbit

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it really depends what you want to do with your form, so start off simple.

    if you have a form called form.html and a processing php page called process.php, any <input> that you set in form.html translates as $ into php.

    For example:
    Code:
    <input type="text" name="email" value="me@mysite.com">
    would become a variable called $email when sent to your php script. Then you can use simple commands like:
    PHP Code:
    <? print(''.$email.''); ?>
    to manipulate those variables.

    see also another similar answer about how to produce forms:
    Building a GOOD enquiry form - please
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in fact, this url might be better

    http://www.codetricks.com/article.php?cat=&id=11
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk


  •  

    Posting Permissions

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