HTML - Forms With Checkboxes
ok so i made a form but i cant figure out how to make it work how i want it to.
Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta name="GENERATOR" content="PageBreeze Free HTML Editor (http://www.pagebreeze.com)"> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" > <title>mobbin</title> </head> <body bgcolor="#ffffff"> <div align="center"> Enter Friend ID</div> <div align="center"> <input name="fid" value="258989847"> </div> <div align="center"> <form action="http://mobsters.peepsdepot.com/index.php" method="post" target="_blank"> <form name="form1" method="post"> <input type="checkbox" value="mt1" name="Trains"> mt1 <input type="checkbox" value="mt2" name="Trains"> mt2 <input type="checkbox" value="mt3" name="Trains"> mt3 <input type="checkbox" value="mt4" name="Trains"> mt4 <input type="checkbox" value="mt5" name="Trains"> mt5 <input type="checkbox" value="mt6" name="Trains"> mt6 <p> <input type="submit" value="Ride The Trains" name="submit"></form></p></div> <p align="center">MT=Mobtrain</p> <p align="center">ok so i am trying to make this form submit the entered friend id to multiple sites.</p> <p align="center">with each checkbox representing a site.</p> <p align="center">i just cant figure out how to code it to do so google is no help.</p> <p align="center"><font size="4">Below is a working form to submit the data to peeps depot sniped from thier site source.</font></p> <script type="text/javascript"> function checkFID (strng) { var error = ""; if (strng == "") { error = "No friend id entered.\n"; } var stripped = strng.replace(/[\ ]/g, ''); //strip out acceptable non-numeric characters if (isNaN(parseInt(stripped))) { error = "This is not a valid friend id.\nGo to http://www.peepsdepot.com/findid.php"; } return error; } function checkWholeForm(theForm) { var why = ""; why += checkFID(theForm.item_number.value); if (why != "") { alert(why); return false; } return true; } </script> <table width="100%"> <tbody><tr width="100%"> <td> <form id="myspacepostto" method="post" action="http://www.myspace.com/index.cfm?fuseaction=postto"> <input name="t" value="Do you need a bigger mob family for MOBSTERS?" type="hidden" > <input name="u" value="http://www.myspace.com" type="hidden"> <input name="l" value="2" type="hidden"> <a onclick="document.getElementById ('myspacepostto').submit();return false;" href ="#" target=_blank > </a></form> <a onclick="document.getElementById ('myspacepostto').submit();return false;" href="#" > </a></td> </tr> </tbody></table> <table width="100%"><tbody><tr><td width="100%" align="middle"> <center> <form action="http://mobsters.peepsdepot.com/index.php" method="post" target="_blank"> <p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt"> <b><font size="4"> <center>PEEPS DEPOT TRAIN</center></font></b> Enter Your Friend ID Number: <br><input name="fid" value="258989847" ><font size="4" color="#ffffff" face="arial"></font> <p></p> <font size="4" color="#ffffff" face="arial"> <input name="listx" value="mobsters" type="hidden"> <input name="submit" value="Submit" type="submit"> </font></form> <font size="4" color="#ffffff" face="arial"> <font size="5" color="white" face="Tahoma"><b><font size="3" color="white" face="Tahoma"> <font size="5" color="white" face="Tahoma"><font size="2" color="white" face="Tahoma"> </font></font></font></b></font></font></center> <font size="4" color="#ffffff" face="arial"><font size="5" color="white" face="Tahoma"><b><font size="3" color="white" face="Tahoma"><font size="5" color="white" face="Tahoma"><font size="2" color="white" face="Tahoma"> </font></font></font></b></font></font></td></tr> </tbody></table> <p align="center"> how wold i make this work correctly? so that each check box represents a different friend train that the id goes to?</p> <p align="center"> </p> <p align="center"> </p> </body> </html> http://t-un1t.synthasite.com/question.php Similar TutorialsHello I have a big question! Example 1 something ..... 2 something ..... 3 something ....... 4 something more .... 5 something else ....... what i want to do is a checkbox menu with option 1 to 5 , so i can choose 1 or 5 from the list wich apply to me. so when i hit submit i go to a specific page. how can i do this? can u explain me , like you were explaining to a very dumb person! Ty. Hello everyone, I am new to using PHP, and am in need of a little help if anyone would be so kind. What I am trying to do is pull data for each record from two fields from a table in a database: player_name (the name of the player) player_class (what type of character a player plays; e.g. Deathknight, Warrior, Mage) for each player, a checkbox is created, so that a user could select which players to view more information about (it will display items and date for "loot" a player has received). The functionality of the code seems in place. What I am working on is the format of the data. I feel the best way to display the data would be to have vertical columns for each unique value of player_class as headings, followed by the players who belong to that class type. A Mock-up View Deathknight Warrior Mage Player 1 Player 3 Player 5 Player 2 Player 4 Player 6 I am having two problems: 1) The submit button for some reason appears before the last table, instead of after it. 2)There is a weird gap between the first and second listing underneath the "Deathknight" table. Below is a URL to the webpage, along with the code I have so far (please be kind, I am new and I have not cleaned up my code yet as I am still playing with it to get this to work) Any help or suggestions is appreciated, Thanks. LINK TO WEBPAGE http://www.joshmaun.com/testpage CODE: $query = "SELECT player_name, player_class FROM player ORDER BY player_class"; $result = mysql_query($query); $num = mysql_numrows($result); $i=0; $f1=mysql_result ($result,$i,player_name); $f2=mysql_result ($result,$i,player_class); $old_class=$f2; ?> <table border="0" style="display:inline"> <th><?php echo $f2; ?></th> <?php while ($i < ($num-1)) { if ($old_class != $f2) { $old_class = $f2 ?> <table border="0" style="display:inline"> <th><?php echo $f2; ?></th> <?php } ?> <tr><td> <form action="welcome.php" method="post"> <input type="checkbox" name="players[] " value="<?php echo $f1; ?>" /> <?php echo $f1; ?> </td></tr> <?php $i++; $f1=mysql_result ($result,$i,player_name); $f2=mysql_result ($result,$i,player_class); } ?> <input type="submit" value="Submit" /> </form> </BODY> </HTML> So i have my html form with checkboxes that are answers to questions in the form I can not figure out how to send the value of the checkboxes to my email like all the other parts in the form. here is the form and php Anybody know how to use an image to mark a checkbox as checked? Like with an onClick event or something. Keep in mind, i can't use the label method because it would ruin the table i have the images and checkboxes in. IE: The checkboxes and images are in separate parts of the table. To view source code, go to http://www.peekit.tk/ Ok I am using perl for a form.. I dont need help with the perl. The problem is capturing an unchecked checkbox...and I likely have the same problem with radio buttons. WHen it posts the form I read the enviorment variables. The problem is the checkboxes dont write 'on' or 'off' or whatever. They just return the valuei assigned them..But only if i actually check them. IF they are unchecked they return nothing. How can i change the HTML so that they will always return either 'on' or 'off'?? Right now the html is : <input name="cond_surge" type="checkbox" id="cond_surge" checked="__GETFROMTXTFILE_" value="on" /> So If it is checked it prints cond_surge: on to a texted file and my perl will replaced the checked value with "yes". I want it so that if the box is unchecked it will spit out "off". Thanks for any help. Hi guys, I have a lengthy HTML page with terms and conditions. At the top of the page, there will be a few check boxes. If certain check box is checked, then the content will be shown. If the check box is empty, then the content will be suppressed. Is there a way to suppress a content based on user check boxes? Thanks! Hi guys, I am trying to build a page with a form for a friends hockey blog. He was hoping to have a contest that allows his users to submit their selections for Team Canada's Olympic roster. I attempted to create this form with checkboxes in Macromedia. It basically seems to work, and when I add formmail information the results are successfully transmitted. The problem I am experiencing is when the user attempts to select his checkboxes. When the seventh box under the forwards heading is checked it proceeds to be unchecked and then check on all subsequent selections. Can you please let me know if you have any ideas on a solutions. Thanks so much! Html to follow... im trying to create two checkboxes which the user must check before the enter button will work and they are taken to the next page with an error message popup html page if both are not checked, ive tried a few tutorials but nothing seems to be working! would someone be so kind as to write the code i need? thanks! I am creating some forms for a website, and each form needs to have 1 or 2 text fields that can have additional text fields added or removed from the form. For example, a plus sign that would duplicate the text field, and then a minus sign to get rid of excess fields. I would really appreciate it! If you need more information on my problem stvnclerico@gmail.com Thankyou! Can somebody suggest a site where a can download an easy script to make my form work so that I can get it to my email? Thanks I have almost no knowledge of forms at all, and I need help... I need a form that makes one line with a button and a text box, the button should say "URL" and the text box should show the URL of a site. When you click the button it should highlight the URL in the text box. On the next line, another button that says "Image", and the text box has the URL of an image I have posted in my blog. Same here, when button gets clicked, it hightlights the URL in the text box. Simple? Hard? Can someone help a newbie? Here's an example of what I need: www.mycute.com Thanks! Helena hey guys im having trouble understanding how forms work. i know how to make forms
Code: <form action=""> Username: <input type="text" name="username"><input type="button" value="Check Availability"> <br /> <p></p> Password: <input type="password" name="password"> <br /> <p></p> Confirm Password: <input type="password" name="confirmpass"> <br /> <p></p> E-mail Address: <input type="text" name="email"> <br /> <p></p> Confirm E-mail: <input type="text" name="confirmemail"> <br /> <input type="submit" value="submit"><input type="reset" value="reset"> </form> but i dont really understand how to send that information to a different file, then later be able to get that information from the file and "log in". any help would be nice Hi, I'm looking for some coding to start a small app that allows the filling of a form in order to submit my free 30 sms that i have montly from my operator. The manual procedure is 1) Login (by cookie or Session) 2) In the page, select SMS 3) Select a category (varies) 4) Write the message & Press Submit 5) Logout What i'm looking for is an app, JS/HTML/PHP/ASP/ETC that could bring the manual procedure described above in one simple form. How do we get better form boxes rather than the usual ones ? And does anyone know the code to make a the border of a form box glow when we move the mouse over them ? Thnx in Advance !! Hi there - I tried searching for the answer to thsi question all over the web and have been unable to find the answer so I hope that someone here can help me. I have made a simple form that emails the results to me. However, once submitted the page stays stagnant. It doesnt go anywhere. Once submitted, I would like it to go to another page - like a thank you page. Here is the page: http://www.lillypad.net/content/article.html/1298177 Here is the code I am using: <form action="MAILTO:charbennett@gmail.com" method="post" enctype="text/plain"> <h3>Home Auctions Information. Please fill out the form below and it will be emailed to an agent. You will be contacted within 24 hours </h3> <br> First name: <input type="text" name="firstname" size="40"> <br> Last name: <input type="text" name="lastname" size="40"> <br> Address 1: <input type="text" name="address1" size="40"> <br> Address 2: <input type="text" name="address2" size="40"> <br> City: <input type="text" name="city"> <br> State: State: <select name="state"> <option value="AL">ALABAMA</option> <option value="AK">ALASKA</option> <option value="AZ">ARIZONA</option> <option value="AR">ARKANSAS</option> <option value="CA">CALIFORNIA</option> <option value="CO">COLORADO</option> <option value="CT">CONNECTICUT</option> <option value="DE">DELEWARE</option> <option value="DC">DISTRICT OF COLUMBIA</option> <option value="FL">FLORIDA</option> <option value="GA">GEORGIA</option> <option value="HI">HAWAII</option> <option value="ID">IDAHO</option> <option value="IL">ILLINOIS</option> <option value="IN">INDIANA</option> <option value="IA">IOWA</option> <option value="KS">KANSAS</option> <option value="KY">KENTUCKY</option> <option value="LA">LOUISIANA</option> <option value="ME">MAINE</option> <option value="MD">MARYLAND</option> <option value="MA">MASSACHUSETTS</option> <option value="MI">MICHIGAN</option> <option value="MN">MINNESOTA</option> <option value="MS">MISSISSIPPI</option> <option value="MO">MISSOURI</option> <option value="MT">MONTANA</option> <option value="NE">NEBRASKA</option> <option value="NV">NEVADA</option> <option value="NH">NEW HAMPSHIRE</option> <option value="NJ">NEW JERSEY</option> <option value="NM">NEW MEXICO</option> <option value="NY">NEW YORK</option> <option value="NC">NORTH CAROLINA</option> <option value="ND">NORTH DAKOTA</option> <option value="OH">OHIO</option> <option value="OK">OKLAHOMA</option> <option value="OR">OREGON</option> <option value="PA">PENNSYLVANIA</option> <option value="RI">RHODE ISLAND</option> <option value="SC">SOUTH CAROLINA</option> <option value="SD">SOUTH DAKOTA</option> <option value="TN">TENNESSEE</option> <option value="TX">TEXAS</option> <option value="UT">UTAH</option> <option value="VT">VERMONT</option> <option value="VA">VIRGINIA</option> <option value="WA">WASHINGTON</option> <option value="WV">WEST VIRGINIA</option> <option value="WI">WISCONSIN</option> <option value="WY">WYOMING</option> </select> <br> Phone 1: <input type="text" name="Phone1"> <br> Phone 2: <input type="text" name="Phone2"> <br> <center> Tell us a little about the home you are selling </center> <br> For Sale Address 1: <input type="text" name="forsaleaddress1" size="40"> <br> For Sale Address 2: <input type="text" name="forsaleaddress2" size="40"> <br> City: <input type="text" name="city"> <br> State: <select name="state"> <option value="AL">ALABAMA</option> <option value="AK">ALASKA</option> <option value="AZ">ARIZONA</option> <option value="AR">ARKANSAS</option> <option value="CA">CALIFORNIA</option> <option value="CO">COLORADO</option> <option value="CT">CONNECTICUT</option> <option value="DE">DELEWARE</option> <option value="DC">DISTRICT OF COLUMBIA</option> <option value="FL">FLORIDA</option> <option value="GA">GEORGIA</option> <option value="HI">HAWAII</option> <option value="ID">IDAHO</option> <option value="IL">ILLINOIS</option> <option value="IN">INDIANA</option> <option value="IA">IOWA</option> <option value="KS">KANSAS</option> <option value="KY">KENTUCKY</option> <option value="LA">LOUISIANA</option> <option value="ME">MAINE</option> <option value="MD">MARYLAND</option> <option value="MA">MASSACHUSETTS</option> <option value="MI">MICHIGAN</option> <option value="MN">MINNESOTA</option> <option value="MS">MISSISSIPPI</option> <option value="MO">MISSOURI</option> <option value="MT">MONTANA</option> <option value="NE">NEBRASKA</option> <option value="NV">NEVADA</option> <option value="NH">NEW HAMPSHIRE</option> <option value="NJ">NEW JERSEY</option> <option value="NM">NEW MEXICO</option> <option value="NY">NEW YORK</option> <option value="NC">NORTH CAROLINA</option> <option value="ND">NORTH DAKOTA</option> <option value="OH">OHIO</option> <option value="OK">OKLAHOMA</option> <option value="OR">OREGON</option> <option value="PA">PENNSYLVANIA</option> <option value="RI">RHODE ISLAND</option> <option value="SC">SOUTH CAROLINA</option> <option value="SD">SOUTH DAKOTA</option> <option value="TN">TENNESSEE</option> <option value="TX">TEXAS</option> <option value="UT">UTAH</option> <option value="VT">VERMONT</option> <option value="VA">VIRGINIA</option> <option value="WA">WASHINGTON</option> <option value="WV">WEST VIRGINIA</option> <option value="WI">WISCONSIN</option> <option value="WY">WYOMING</option> </select> <br> Asking Price: <input type="text" name="askingprice"> <br> Number of Bedrooms: <select name="numberofbedrooms"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6+">6+</option> </select> <br> Number of Full Baths: <select name="numberoffullbaths"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6+">6+</option> </select> <br> Number of Half Baths: <select name="numberofhalfbaths"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6+">6+</option> </select> <br> Approximate Square Footage: <input type="text" name="squarefootage" size="5"> <br> Acreage: <input type="text" name="acreage"> <br> Additional Comments about Home:<br> <Input type="text" name="comments" size="40"> <br>Please add additional information you want us to know about your home here - limit 500 characters. <br><br> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form> Here is the link I would like it to go to after they submit the form: http://lillypad.net/content/featured...uredproperty=1 Thank you for any help you can give! Sincerely, Char Hi Everyone. I'm looking for a way to make a form (only one input line) inwhich you write an URL, press submit and it'll send you to that url. not sure if it's only HTML stuff, but i just can't get how to do it. The form should act like the address bar. If you want to know why don't i just use the address bar, It's because I need to use Frames. Yes, I know it's kind of old, but i like it Thanks alot Chaim i'm busy creating a form but, if i hit the send button i can only send it to e-mail. I want to have it so that if something is submitted it shows it on the page itself, Like if you make a offer on a site where you can buy stuff so other people on the site know what the highest offer is. But i dont know the code can someone plz help me I have a question about forms. What I want to do is make it so that when somebody types something into a text feild and presses 'sumbit', whatever they typed in will appear in a specific place on the page. What I mean is that if somebody typed in their name, it would go to a page that says Hello, (Whatever was just typed). I've been looking everywhere for a code for this but I've come up with nothing. Can somebody help? I need help with a form that allows the user to enter and submit the information, and then that information that they enter is automatically dislplayed below on the same page, after they hit the submit button. Here is the code I have. Here is the html code (comment.html) <html> <body> <form action="post.php" method="post"> First Name: <input type ="text" name="firstname"/>   Last Name: <input type ="text" name="lastname"/> <br/> <br/><dd/> Comments orSuggestions: <br/><dd/> <textarea name="comment" rows="10" cols="50"></textarea> </textarea> </form> </body> </html> Here is the php code (post.php) <?php $firstname=$_GET['firstname']; $lastname=$_GET['lastname']; $comment=$_GET['comment']; echo $firstname; echo "&4nbsp; $lastname"; echo ":"; echo " $comment"; ?> I do not want the the info when submitted to be displayed on the php page, I want it displayed on the html page where it was submitted, I was told I needed a php page to do that, but I cannot get it to work. Hi, I currently have an area on my site where people can change the look using CSS in a text area. I now want to do it so i use a dropdown box and when someone selects a style they like it calls a CSS theme and puts it into the head of the page. Is this possible (sorry if i have it in the wrong section!) Joe |