HTML - Html Checkboxes Controled With Php Help
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
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> 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 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. 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/ 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... 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! 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 just upgraded all my .HTML pages to .PHP . But now I noticed that when my pages pull up in the search engines like Google, Yahoo, and MSN. They still show the old .HTML links?? When they click on the webpages from the search engines results you get error 404 page cannot be found. How can I update the search engines or add code to my page so the search engines will reflect the new .PHP pages. Also it's been over a good week since I've update to .PHP Thank you all in advanced!! My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> Hi, so I'm trying to make this e-mail newsletter. It's entirely images, tables and text. So no javascript, just plain stuff. I tried attaching it as a signiture file and I had trouble sending it. It also didn't come out right. I'm trying to avoid using a software. Its basically just a block of HTML I need to show up as the only content in an email. If you just put HTML into a email text field, it just shows the HTML code in the email as text. Any ideas? As the title states I've been using Microsoft Word 2000 to create my web page but now want to make a simple no frills html HTML document. Is there a simple and quick way to do it ? I know I can simply create a new HTML document and then just copy and paste the links but is there a utility that can do this ? Many thanks Hi everyone, I've been searching around the web trying to find out how I can send using Outlook a html and text email newsletter automatically. I am quite happy creating html only newsletters, and text ones for that matter, but I have been digging and believe that by using multi-part code I can send to both and the recipients email client "allows" whichever version to be displayed - does this sound right? I'm hoping to simply create the html with the relevent mime references and boundaries (dont know what they are but have seen them on enough Google'd pages to know that they mean something!) and then copy and paste into Outlook - the newsletter is only going out to a few people at a time. Any suggestions or advice would be very greatly appreciated. Regards Allan I need a simple example to take input, and give an output, such as input: height weight output: body BMI thanks Hello Friends, I need a tool which can remove HTML comments from an HTML page. I don't want to create a regular expression to remove HTML comments rather I need a tool which should have command line support also so that it can be integrated with build process. Please advice. Thank you. Hi everybody, I've invented a means of converting HTML to keywords. http://4nf.org/tool/ What do you think of it? Any kind of feedback is greatly appreciated! Thanks in advance and kind regards Hello Everyone, Please help in build the code for the site , the layout should be as the below layout , I need to submit this by today EOD. Image Link1: http://8648180184665331224-a-1802744...attredirects=0 Image Link 2: http://8648180184665331224-a-1802744...attredirects=0 Please mail me the code ASAP. Thanks and Regards, ceenuu2002@gmail.com i just started working on addicted2ally.com, and for some reason, my index.html is showing the text of the html instead of well, doing it lol helppp!? I am still new to the web page world, but the website I originally created (in japanese) was passed on to a programmer. He did a lot of "upgrades" to the site so he says, but he left. Now I am in charge again of re-modeling the site. The problem is I am trying to figure out why there are so many dead links. I have looked up and down the server, but can't find anything. Ok before I confuse anyone else here is what I am talking about. For example this page that I originally made : Code: http://www.discoveryfirm.com/tokushu/index.html cannot be found but if I take of the end: http://www.discoveryfirm.com/tokushu/ the page is there. Now I am trying to fix a lot of dead links, but I cannot figure out what the programmer did to the site. I am still new to all the high-tech features in the web world. Could somebody please explain. hello i have a page 'gallery.html' that i want to show up when the URL www.site.com/gallery is requested. how do i achieve this? thanks in advance rlbw |