HTML - Two Forms On One Page.
Hey all,
I have two forms on my page (shown below in order of appearance). The 2nd form works and redirects you to the page "change-password.php" as it should, but the 1st form does NOT work correctly - it redirects to "change-password.php" too. I don't know what I'm doing wrong, the form action clearly states "uploadconfig.php" but it still tries to send the information to "change-password.php" instead. Thanks in advance. Code: <form action="uploadconfig.php" method="post" enctype="multipart/form-data" name="frm_upload" id="frm_upload"> <table border="0" cellspacing="0" cellpadding="0" id="tbl_upload"> <tr> <th align="right" scope="row"><span class="style8"> <label for="frmname">Song Title: </label> </span></th> <td><input type="text" name="frmname" id="frmname" class="frmfld" /></td> </tr> <tr> <th align="right" scope="row"><span class="style8"> <label for="price">Price: </label> </span></th> <td><input type="text" name="price" id="price" class="price" /> (i.e. - $20)</td> </tr> <tr> <th align="right" scope="row"><span class="style8"> <label for="frmfile"> File: </label> </span></th> <td><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo MAX_FILE_SIZE; ?>" /><input name="frmfile" type="file" id="frmfile" size="30" /></td> </tr> <tr> <th scope="row"> </th> <td> <label for="btn" id="sbm"> <input type="submit" name="btn" id="btn" value="Upload" /> </label> </td> </tr> </table> </form> Code: <form action='change-password.php' method=post><input type=hidden name=todo value=change-password><table border='1' bordercolor="#FF0000" cellspacing='0' cellpadding='0' align=center> <tr bgcolor='#CCCCCC' ><td colspan='2' align='center'><font face='Calibri' size='3' align='center'><b>Change Your Password</b> </font></td> </tr> <tr bgcolor='#f1f1f1' > <td ><div align="center"><font color="#000000" face='Calibri' size='3' align='right'>Username</font></div></td> <td align='center'><font face='Calibri' size='3' > <input type ='text' class='bginput' name='username' ></font></td></tr> <tr bgcolor='#f1f1f1' > <td ><div align="center"><font color="#000000" face='Calibri' size='3' align='right'>New Password</font></div></td> <td align='center'><font face='Calibri' size='3' > <input type ='password' class='bginput' name='newpassword' ></font></td></tr> <tr bgcolor='#f1f1f1' > <td ><div align="center"><font color="#000000" face='Calibri' size='3' align='right'>Confirm Password</font></div></td> <td align='center'><font face='Calibri' size='3' > <input type ='password' class='bginput' name='confirmnewpassword' ></font></td></tr> <tr bgcolor='#f1f1f1' ><td colspan=2 align=center><input type=submit value='Change Password'> <input type=reset value=Reset></font></td></tr></table></form> Similar TutorialsHello, On one of my pages I have 2 forms and only one of them seems to work. The other one (which I have on all 600 pages of my website as it is part of a template I use) does not work on this page where I already have another form. There seems to be a conflict. Here is the code first form (working): <form name=ftInCmForm> <center> <table border="1" cellpadding="0" cellspacing="0"> <tr> <td> <table border="0" cellpadding="3" cellspacing="0" bgcolor="#C0C0C0"> <tr> <td>Convert to centimeters</td> <td><INPUT type=radio value=0 name=choice onClick="killChoice(this.form)" checked ; tabindex="1"><font size="3">(i.e. 5' 3" to 160 cm)</font></td> </tr> <tr> <td>Convert to feet and inches</td> <td><INPUT type=radio value=1 name=choice onClick="killChoice(this.form)" ; tabindex="2"><font size="3">(i.e. 160 cm to 5' 3" </font></td> </tr> <tr> <td rowspan="2" valign="middle">enter length</td> <td><input type=text name=ft size=5 onClick="form.ft.select()" ; style="font-family: Georgia" tabindex="3"> ft</td> </tr> <tr> <td><input type=text name=inCm size=5 onClick="form.inCm.select()" ; style="font-family: Georgia" tabindex="4"> in/cm</td> </tr> <tr> <td></td> <td><INPUT onClick="ftInCm(this.form)" type=button value="convert" ; tabindex="5"></td> </tr> <tr> <td></td> <td><input name=answer size=40 value="The answer will appear here..." style="background-color: #C0C0C0; font-family: Georgia" tabindex="6" ></td> </tr> <tr> <td></td> <td><INPUT type=reset value=reset onClick="form.ft.disabled=false" tabindex="7" ;></td> </tr> </table> </td> </tr> </table> </center> </div> <br> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0"> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" bgcolor="#C0C0C0"> <tr> <td align="center"> Solution</td> </tr> <tr> <td><textarea rows="3" name="solution" cols="68" style="background-color: #C0C0C0; font-family: Georgia"> A more comprehensive solution will appear here...</textarea></td> </tr> </table> </td> </tr> </table> And here is the code for the form which is working on all but 1 page (the page with the above form on it). This is a Google site search form: <form method="get" action="http://www.google.com/search" target="_blank"> <div style="border:1px solid black;padding:4px;width:14em;" align="center"> <table border="0" cellpadding="0" align="center"> <tr><td> <input type="text" name="q" size="25" maxlength="255" value="" /> <input type="submit" value="Google Search" /></td></tr> <tr><td align="center" style="font-size:75%"> <input type="checkbox" name="sitesearch" value="www.thetallestman.com" checked /> only search TheTallestMan.com<br /> </td></tr></table> </div> </form> I have looked and looked, but have no idea where the conflict lies. Any help would be very much appreciated. Kind regards, The Tallest Man We're having difficulties dealing with two forms on one html search results page. We want the following to happen: 1) "next" and "previous" links to appear when the search returns more results than the limit set in the code. 2) the user to be able to click on a link/radio button which would allow them to view complete result data on another page. The code for goal 1 seems to need a "method = get" capability, while the second goal needs "method = post" to pass information on to the next page. We thought that the best way to do this would be to have two separate forms on the one html page. However, we can't seem to get either form to work in its entirety. Here's the code for our form with the "next" and "previous" links: Code: <form name = "form2" id="form2" method="get" action="<?php echo $_SERVER['PHP_SELF']?>"> When there is only this form on the page, the next/previous links work fine. It's when we try to incorporate other buttons (such as a submit button) and another form that things get messy. The same is true for the other form... it works fine by itself, but it's the combination that throws it off. Goal 2 form: Code: <form name = $formNum id = $formNum method=post action=seach_match_result.php target='_blank'> (This form has a submit button at the end.) These forms are not nested, but totally separated in the code. Are we on the right track, or is there a better way to accomplish this? Thanks! AM how to make contact page with contact detail mean forms detail like this name: email: address: country: Comments : and submit how to use submit coding i do not know much html tell me about submit option Hello. I'm trying to make a form on my myspace page that is like a mailing list sign up. I know how to do a standard form, but what I want to do is have some code that automatically extracts the person's profile ID from the page source and sends it in the form (hidden). Is this possible with HTML, or would it require scripting and hence not be useable on myspace? I'm new to forms and am trying to learn how to make a multiple page one. What I've made so far is very basic, but I figure I shouldn't make a pretty and complex one until I master the simple. I've made three separate pages: page a has the first part of the form and when you click 'continue' it should save the information and move you onto page b where you fill in another form. Then you move onto page c where the information you entered is displayed for you to review, then you press send. That's when it's sent to my e-mail. There are two problems with my code: when you click 'continue' on page A it automatically sends the info to my e-mail and I don't want it to. I want it to go to page b. It also displays the information entered on page a, but also shows a bunch of the code that should be hidden. I don't know why. And it's driving me nuts. I'd appreciate any help! Here's the code: <html> <head> <title>Sample Multiple Page Form</title> </head> <body bgcolor="white" text="#000000" link="#0000CC" vlink="#0000CC" alink="#0000CC" marginwidth=0 marginheight=15 topmargin=15 leftmargin=0> <form action="http://www.bluehost.com/bluemail" enctype="multipart/form-data" method="POST"> <input type="hidden" name="sendtoemail" value="contact@mywebsite.com"> <input type=hidden name="next_page" value="Multiple_Page_b"> <input type=hidden name="required" value="name:Name Required,email:e-Mail Address Required"> <input type=hidden name="current_page" value="Multiple_Page_a"> <input type=hidden name="form" value="2"> <input type=hidden name="start" value="1"> <center> <table width=450 cellpadding=4> <tr> <td colspan=2> <font size=2 face="arial" color=red> </td> </tr> <tr><td><font face="arial" size=2> Your Name: </td><td><input type=text name="name" value="" size=30> </td></tr> <tr><td><font face="arial" size=2> Email Address:</td><td><input type=text name="email" value="" size=30></td></tr> <tr><td colspan=2><br><input type="submit" name="next" value="Continue >>"></td></tr> </table> </form> </body> </html> And here's the message displayed when clicking continue: Thank you for completing our form. The following info was sent to contact@mywebsite.com: Field Value next_page Multiple_Page_b required name:Name Required,email:e-Mail Address Required current_page Multiple_Page_a form 2 start 1 name Jess email contact@myemail.com next Continue >> Hi, I have a PHP script I am writing which displays a list of all the news posts I have made on my site and to the right of it has two links, Edit and Delete. The script will iterate through all the news posts I have made and display them down the page from most recent to oldest, it looks like this: The way it works at the moment is that when each headline gets added, the script will set the edit link for that particular post to <a href="EditSelectedPost.php?$i">Edit</a> $i being the ID to that post. I want it so that when I get sent to EditSelectedPost.php I can pluck off the value of $i and use it on that page. I want to be able to do this without using forms or buttons. Can this be done? Any help will be greatly appreciated. Thanks Ashman I want to add a total of 10 forms to the same page but can only get the "Double Combo" box vehicle "Make and Modle" to work in "Ad 1". (see page link below) What am I missing or what do I need to do? Please view script form here >> http://www.netrixllc.net/clpublisher/create-ads.html I would appreciate any help... Thank you~ My page contains several iframes and each contains a form. In IE (but not in FF), when I submit a form, the action page is shown in a new window. How can I make it so the action page is instead loaded inside the iframe? I need help using a code to do the following: I have a search field, when someone types their serial number into the box it needs to bring the specs up for their computer. Currently i am using a code that is simply if this is typed it goes to this page. As the list of serial numbers grows the list becomes larger and larger. Is there a way to either make this an external file where i can update the one file instead of the actual page it is on or is their a simpler way to do this with maybe PHP, SQL or something else that would make this easier to update? 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 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 Hi can anyone help me I set up a website for a friend and added a form so clients could fill it in and make appointments. For some reason it doesn't seem to work properly. It works from my partners laptop and the main pc but on my laptop nothing happens , after clicking submit the form does not send . I have tried sending it with outlook express open and it still does jot work from laptop The html code is spot on and correct Anyone got any ideas 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 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 need to do a form submission that assigns values to radio buttons. Basically its a subjective hearing test, like this one. http://www.entnet.org/healthinfo/hea...aring_test.cfm My question is I don't know how to setup the form at the point of submission, so it returns the proper response, dependent on the selected buttons(or score)? Does anyone have a clue? Thanks in advance... Okay, I'm trying to make a form that sends the information entered to my email address. I don't know if it's the code or not but all it seems to be doing is opening up a blank email directed to the address. Here's the code: <form action="MAILTO:lifeisbetteroutsidethebox@hotmail.com" method="post" enctype="text/plain"> <p align="center"><strong>Your Full Name:</strong><br /><input name="name" type="text" class="style8" size="20"> </p> <p align="center"><strong>Your Email Address:</strong><br /> <input name="mail" type="text" class="style8" size="20" /> </p> <p align="center"><strong>Your City:</strong><br /> <input name="city" type="text" class="style8" size="20" /> <p align="center"> <input name="Send" type="submit" id="Send" value="Send"> <input name="Reset" type="reset" id="Reset" value="Reset"> </form> Okay, any help please? 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 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. Hello and thank you for having such a good resource for html online. I am trying to accomplish something and am not sure how to go about doing it. What I need to do is have a box that has multiple check boxes with I guess you can call them responses next to them. When the boxes are checked, I would like to be able to have a next button, that would bring me to another set of check boxes and of course answers. At the end of all of this, I would like to have whatever was checked put into a box at the end, that could be copy and pasted into another document. I am basically trying to make a function at my job easier. I have seen it done before, but am not sure what it would be called. I have dabbled a bit with html and for the life of me cannot figure it out. Not looking for someone to do this for me or even walk me through it, but just a point in the right direction. Thanks in advance. 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? |