+ Reply to Thread
Results 1 to 3 of 3

Thread: form script help please

  1. #1
    aphan is offline x10Hosting Member aphan is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    9

    form script help please

    could anyone tell me where i can find a script that allows visitor to select information from a few drop down list or radio buttons and submit it
    and the admin is able to see who submitted what.

    For example
    What is your name?
    ___________

    Question 1.
    Selection 1
    Selection 2
    Selection 3

    Question 2.
    Selection 1
    Selection 2
    Selection 3
    Selection 4

    and so on

    and when they submit, the admin can see what people chose.

  2. #2
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: form script help please

    If you would like the information sent to your email you can use something like this. It is just a small email form using php and it is easy to use and adjust.

    Make a form like this
    Code:
    <form action="send.php" method="post">
      <div>
        Name<br />
        <input type="text" size="10" name="Name" value="" id="Name" />
        <br />
       <select name="Color" id="Color">
        <option>Select One</option>
        <option>Blue</option>
        <option>Red</option>
        <option>Green</option>
        <option>Orange</option>
       </select><br/>
    
       <input type="submit" value="Send Message" >
      </div>
    </form>
    and create a file called "send.php" that contains

    Code:
    <html>
    <head>
    <title>Your Title</title>
    </head>
    <body>
    <?php
    $Name = strip_tags($_POST["Name"]);
    $Color = strip_tags($_POST["Color"]);
    
    
    $message = "<html><body>";
    $message .= "Name: $Name<br>";
    $message .= "Color: $Color<br>";
    $message .= "</body></html>";
    $headers = "From: Email From<youremailaddress@a.com>\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8';
    mail(" Your name  <youremailaddress@a.com>","Subject",$message,$headers);
    ?> 
    
    
    <!-- body of webpage thanking them for submission -->
    <h1 align=center>Message Sent</h1>
    
    Thank you for your time in filling out my form. 
    
    </body>
    </html>
    Change youremailaddress@a.com to your email address
    change subject to the name of the form

    PM me if you need help with it

  3. #3
    phpasks is offline x10 Sophmore phpasks is an unknown quantity at this point
    Join Date
    Apr 2008
    Posts
    145

    Re: form script help please

    You can create one table & store all data in that

    For example
    What is your name?
    ___________

    Question 1.
    Selection 1
    Selection 2
    Selection 3

    Question 2.
    Selection 1
    Selection 2
    Selection 3
    Selection 4

    and so on

    You can created no. of field filled up to user

    CREATE TABLE `user_info` (
    `user_info_id` MEDIUMINT(9) UNSIGNED NOT NULL AUTO_INCREMENT,
    `Question1` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0',
    `Question2` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0',
    `created_ip` VARCHAR(33) NOT NULL,
    `created_date` TIMESTAMP(14) NOT NULL,
    PRIMARY KEY (`user_info_id`))TYPE=InnoDB;

    Created_ip: Store IP - Where to user information filled which ip.
    Created_date: When will user insert record.

    Once Whole information filled up & display list to admin whole user info.

    Any query then tell you.
    Asif Khalyani
    http://www.phpasks.com

+ Reply to Thread

Similar Threads

  1. Passing a form into a cig script
    By smatt454 in forum Free Hosting
    Replies: 3
    Last Post: 09-04-2008, 08:49 PM
  2. PHP email form script...
    By letstalk in forum Programming Help
    Replies: 3
    Last Post: 07-01-2008, 01:54 AM
  3. need help with form submit script
    By kbjradmin in forum Programming Help
    Replies: 5
    Last Post: 06-26-2008, 01:02 AM
  4. Access to 300+ PHP scripts (2500 credits)
    By jonathanyaniv in forum The Marketplace
    Replies: 11
    Last Post: 06-03-2008, 10:58 PM
  5. Replies: 8
    Last Post: 12-03-2007, 04:12 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