form script help please

aphan

New Member
Messages
9
Reaction score
0
Points
0
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.
 

driveflexfuel

New Member
Messages
159
Reaction score
0
Points
0
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
 

phpasks

New Member
Messages
145
Reaction score
0
Points
0
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.
 
Top