HTML - Form Help: Post And Get In The Same Form
So i want to Post and Get in the same form for reasons of keeping the URL looking clean. I need to pass a PHP array through to the next page, and I don't want random gibberish in the URL. So, I can just Post this, but this is for a search page, and it would be nice to Get their search query for the reasons of the advantage of Get over Post, and because it looks better in my opinion.
Anyways. The thing I am posting takes no user input, and it is defined in the beginning of the page. The thing I want to Get is user defined in a textbox. So, I need the method of the Form to be Get, but is it possible to also Post something? Thanks, If i wasn't clear i'm sorry and i'll try to explain it better. Similar TutorialsEveryone, An XHTML class project is posting to an e-mail address. The code works in FireFox, Chrome, and Safari, but not in IE v9. Here's the first several lines of the document, down to the <form> tag: <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../style-sheets/assignments-styles.css" /> <link rel="shortcut icon" href="../images/favicon.ico" type="x-icon" /> <link rel="icon" href="../images/favicon.ico" type="x-icon" /> <title>Site Opinion Form</title> <style type="text/css"> <!-- legend {float: left; color: #00008b; font-style: italic; font-size: small} --> </style> </head> <body> <form method="post" action="mailto:fname.lname@student.swic.edu?subject=Student's Assignment Input"> TIA. Hello all, I am having trouble pasting this html into my content management system and am looking for a solution. We are attempting to have people visit this page and opt-in for email services such as our newsletter. The form isn't posting properly and isn't functioning correctly. Any help would be greatly appreciated. Thank you. Here's the code the site gives you to post into your content manager: <style> .link, .signupframe { color: #226699; font-family: Arial, Helvetica, sans-serif; } .link { text-decoration: none; } .signupframe { border: 1px solid #000000; background: #ffffff; } </style> <form method=post action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup676" accept-charset="UTF-8" onsubmit="return verifyRequired676();" > <input type=hidden name=redirect value="http://www.icontact.com/www/signup/thanks.html" /> <input type=hidden name=errorredirect value="http://www.icontact.com/www/signup/error.html" /> <div id="SignUp"> <table width="260" class="signupframe" border="0" cellspacing="0" cellpadding="5"> <tr> <td valign=top align=right> <font size="1" face="Arial,Helvetica, sans-serif">*</font> <font size="2">Email</font> </td> <td align=left> <input type=text name="fields_email"> </td> </tr> <input type=hidden name="listid" value="11267"> <input type=hidden name="specialid:11267" value="FKCE"> <input type=hidden name=clientid value="693760"> <input type=hidden name=formid value="676"> <input type=hidden name=reallistid value="1"> <input type=hidden name=doubleopt value="0"> <TR> <TD> </TD> <TD><font size="1">*</font><font size="2"> = Required Field</FONT></TD> </TR> <tr> <td> </td> <td><input type="submit" name="Submit" value="Submit"></td> </tr> </table> </div> </form> <script type="text/javascript"> var icpForm676 = document.getElementById('icpsignup676'); if (document.location.protocol === "https:") icpForm676.action = "https://app.icontact.com/icp/signup.php"; function verifyRequired676() { if (icpForm676["fields_email"].value == "") { icpForm676["fields_email"].focus(); alert("The Email field is required."); return false; } return true; } </script> <a class="link" href="http://www.icontact.com"><font size="2">Email Marketing You Can Trust</font></a> Hi, I have created what I think is a valid form aimed at obtaining basic user info for a credit app. My question is, how do I get the info sent to an e-mail address? Also, once that occurs if you have some basic advice on how this can be considered "secure" that will be helpful. Thanks, Chris <li class="buttons" style="left: 192px; top: 0px; height: 52px"> <input type="hidden" name="form_id" value="165100" /> <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" /> <form method=post action="http://us.1.p4.webhosting.yahoo.com/forms?login=mhtrans123&to=chf_2258@yahoo.com"> <td> <form method=post action="http://us.1.p4.webhosting.yahoo.com/forms?login=mhtrans123&to=chf_2258@yahoo.com"> <input name="submitButton" tabindex="5" type="submit" value="Submit" /><input name="resetButton" tabindex="6" type="reset" value="Reset" /></form> </td> </li> and here is the link to the whole page http://www.mhtrans.com/form1 Again, Thanks Hi all, Is it possible to 'post' a request without using a form? e.g. <a href="LoginCustomer">Login</a> if yes... could you tell me how? many thanks...... mike I was looking at w3schools.com and was reading about <Form> but i found a line that i dont know what means so i wanted to hear if U guys could tell me the meaning in some other ways so i might understandt it The line is this: This method sends the form-data as an HTTP post transaction... I dont understandt what they mean with the HTTP post transaction. THX U for the help Could somebody please help .... The following form posts correctly to an email, when viewed in FireFox, but not in IE .... any ideas ? Code: <font face="Arial, ARIAL"><br><b>Lat/Long : <input size="35" type="TEXT" id="latbox" name="latbox" value="" onchange="coffeemsg()"> <br> <script language="JavaScript"> if (navigator.appVersion.lastIndexOf('Win') != -1) { dropline = "\r\n" } else { dropline = "\n" } function coffeemsg(form) { document.ccform.Message.value = ( ' ' + dropline + dropline + '--------- Add Club Request --------' + dropline + 'Club Name : ' + document.ccform.clubname.value + dropline + 'Meeting : ' + document.ccform.meetingdays.value + dropline + 'Time : ' + document.ccform.time.value + dropline + 'District : ' + document.ccform.district.value + dropline + 'Address : ' + document.ccform.address1.value + dropline + ' ' + document.ccform.address2.value + dropline + ' ' + document.ccform.address3.value + dropline + ' ' + document.ccform.address4.value + dropline + ' ' + dropline + dropline + ' Lat/long : '+ document.getElementById("latbox").value + dropline + '--------- Contact Details --------' + dropline + 'Name : ' + document.ccform.name.value + dropline + 'Phone : ' + document.ccform.phone.value + dropline + 'E-mail : ' + document.ccform.email.value + dropline + dropline + dropline + 'Message : ' + document.ccform.message.value + dropline + dropline + dropline ); } // --> </script> <br> <div align="LEFT"> <form name="ccform" action="mailto:addmyclub@fishhoeklionsclub.org.za?subject=Lions Club Addition&cc=hylton@conacher.co.za" method="post" enctype="text/plain"> <table border="0" width="100%"> <tr><!-- Row 1 --> <td><strong><u><font face="Arial">Club Details<br></font></u></strong> <form name="ccform" action="mailto:webmaster@fishhoeklionsclub.org.za?subject=Lions Club Addition&cc=hylton@conacher.co.za" method="post" enctype="text/plain"><input type="hidden" name="Message"> <p><font face="Arial, ARIAL"><b>Club Name:</b></font> <p><input onchange="coffeemsg()" size="25" name="clubname"> </p></form></td><!-- Col 1 --> <td> <p><font face="Arial, ARIAL"><b>Meeting Day:</b></font> <p><input onchange="coffeemsg()" size="25" name="meetingdays"> </p></td><!-- Col 2 --></tr> <tr><!-- Row 2 --> <td> <p><font face="Arial, ARIAL"><b>Meeting Time/s:</b></font> <p><input onchange="coffeemsg()" size="25" name="time"> </p></td><!-- Col 1 --> <td> <p><font face="Arial, ARIAL"><b>District:</b></font> <p><select name="district"> <option selected="" value="410A">410A</option> <option value="410B">410B</option> <option value="410C">410C</option> <option value="410D">410D</option> </select> </tr> <tr><!-- Row 3 --> <td> <p><font face="Arial, ARIAL"><b>Address:</b></font> <p><input onchange="coffeemsg()" size="25" name="address1"> <p><input onchange="coffeemsg()" size="25" name="address2"> <p><input onchange="coffeemsg()" size="25" name="address3"> <p><input onchange="coffeemsg()" size="25" name="address4"> </p></td><!-- Col 1 --> <td> <p> <font face="Arial, ARIAL"><b>Additional Info:</b></font><p><textarea name="message" rows="5" wrap="auto" cols="45" onchange="coffeemsg()"></textarea> </p></td><!-- Col 2 --></tr> <strong><u><font face="Arial">Your Details</font></u></strong><br><br> <font face="Arial, ARIAL"><b>Name:</b></font><p> <input size="25" name="name" onchange="coffeemsg()"> </p></td><!-- Col 1 --> <td> <p> <font face="Arial, ARIAL"><b>Phone:</b></font><p> <input size="25" name="phone" onchange="coffeemsg()"> </p></font></td><!-- Col 2 --></tr> <tr><!-- Row 6 --> <td> <p> <font face="Arial, ARIAL"><b>Email:</b></font><p> <input size="25" name="email" onchange="coffeemsg()"> </p></td><!-- Col 1 --> <td></td><!-- Col 2 --></tr> </table> <center> <input type="submit" value="Send Request" onclick="coffeemsg()"> </center> </form> Any Help would be much appreciated Hey all, This is probably a stupid question, but it's driving me nuts - I have a simple form with 2x file uploads on it, and when the user clicks a button a PHP script is run. This scrip is picked up by checking the global $_POST variable for 'upload'. This works fine and my PHP script does the upload when I only select one file (using either one), but when both are filled in for some reason the global $_POST variable is empty, so my script will not run. Before looking down the PHP route I'm wondering if everything is ok with my form, or if there is some error that I am missing that is causing this problem? Any help is greatly appciated. Thanks. Code: <form action="" method="post" name="client-balances-selection" enctype="multipart/form-data"> <div id="current-balances"> <h3>Current client balances</h3> <input type="file" name="current_balances" class="file_upload" /> </div> <div id="past-balances"> <h3>Past client balances</h3> <input type="file" name="past_balances" class="file_upload" /> </div> <input type="submit" name="upload" class="button-primary" value=<?php _e('Compare'); ?> /> <input type="submit" name="delete" class="button-delete" value=<?php _e('Delete old files'); ?> /> </form> Is it possible in to "post" to 2 different Url's on 2 different servers from just 1 form on a html page? I have used form mail scripts elswhere with success. What would the html look like? I have tried a few different ways and have only been able to call whichever script location I list fisrt. Any help appreciated! http://www.jabproductsonline.com/test/default.html At this site I have a web form that has two steps. Each just gets information, but the second step doesn't ultimately post to the url it's supposed to go to. What's up with this? I have the same type of web form working elsewhere (orange.977mb.com) but this one doesn't seem to want to work. It's posting to a https site, but you can see the code just by going to the web form and checking it out. If you fill in the information, make it clear that it's testing stuff Thanks! I hope I've posted this in the right place, apologies in advance if I haven't. I'm trying to post multiple XML files using a HTML form. The code I'm using is below and although I am able to select multiple files in Mozilla Firefox it is only ever successfully uploading one file. I need to be able to post 100s of XMLs in a single post, as well as receiving the responses for all uploaded files. I have no experience in this type of thing before, is someone able to assist me and am I even on the right track? Heeelp! <h2>Upload</h2> <form ENCTYPE="multipart/form-data" action="https://asp.test.com.au/ttms/sandbox/ws/external/public/client-profile-xml/multi/receiver" method="POST"> <input type="file" name="linkfile" multiple="multiple"> <br/> <input type="submit"> </form> HI, I just started here... like two minutes ago. I NEED help on getting a form to automatically post to a page on my website. So, i'm making a class website, right, and I need my teacher to be able to post stuff on a page and have it erase what was already on there (every week). My teacher does not know html, so I would like to have a text box automatically edit the page, I am a medium web designer... but I do not know ANYTHING about this, I have searched EVERYWHERE and couldn't find ANYTHING. It got so annoying that I gave up for about 6 months... until today, which is why I'm asking this. By the way, I would also like "Contact us" forms to go directly to my email, WITHOUT any CRAPPY websites (like the one I'm using now) any help would be very appreciated!! Hi, I am trying to construct a multipart form-data post request to a web server. However I keep getting malformed multipart post. My set up is Debian Etch/Mozilla 5.0x. I have constructed the multipart post request as follows Code: POST http://192.168.2.5/upload.cgi HTTP/1.1 Accept-Language: en-us Content-Type: multipart/form-data; boundary=---------------------------7d2b119100532 User-Agent: Mozilla/3.01 (compatible) Host: 192.168.2.5 Pragma: no-cache Content-Length: 717 -----------------------------7d2b119100532 Content-Disposition: form-data; name="field1" 5107115015_auto_end -----------------------------7d2b119100532 Content-Disposition: form-data; name="flat_file"; filename="travellerdata.dat" Content-Type: text/plain <SYSSN>5107115015</SYSSN> <HDD slot="0"> <serial>DA40P7C003P5</serial> <model>MAW3300NC</model> <firmware>0104</firmware> </HDD> <network> <adapter slot="1"> <interface slot="1"> <mac>00:E0:81:4B:8F:FD</mac> </interface> </adapter> </network> <BIOS> <revision></revision> <date>06/23/06</date> </BIOS> <CPU_count>4</CPU_count> <CPU slot="0"> <serial>00020F120000000000000000</serial> </CPU> -----------------------------7d2b119100532-- this is the server response that I get Code: Server Response is HTTP/1.1 200 OK Date: Fri, 26 Sep 2008 05:13:55 GMT Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 f3 <h1>Software error:</h1> <pre>Malformed multipart POST </pre> <p> For help, please send mail to the webmaster (<a href="mailto:webmaster@localhost">webmaster@localhost</a>), giving this error message and the time and date of the error. </p> Appreciate if someone can point out where I am going wrong. Thanks, I'm looking to write a form with input fields which, upon submitting, would post to a specific forum. Now, I'm not sure if this is some kind of javascript trickery or something (I am far from familiar with JS). Here's an example of this page: http://www.violentrevolution.net/e10...y/survey.php?2 Now, what happens upon submitting that forum, the information is posted to a forum where clan members can discuss the application. I'm looking to replicate that function, but I've gone over the code and I can't seem to see the modularity of it (i.e. changing the forum to which it posts). Thanks for any help in advance. So I've got a form with some input text. In addition to the data in the input text I want to send some other data that has already been predetermined on initial page load. How would I declare the other data within the form element? Thanks Hi All - I'm new to the forums and also somewhat new to web development. I'm trying to scrape together a website for my wedding and have managed my way through most of it, however the RSVP form is killing me. I believe the page is working fine with FF3 - at least it does what I want it to do. In IE7 however, when the submit button is pressed IE appears to hang, and status bar reads "waiting for rsvp2.php". The page never appears, however the file creation on the back end does complete successfully, so it IS doing something. I have changed the form method to "get" and IE seems to proceed normally, but I don't want to use this as a permanent solution. The URL is below and any help would be greatly appreciated. If there isn't enough information please let me know! www.nikiandzack.com/rsvp.php Thanks, Zack Hi I was wondering if someone could help me out with a project I working on at my work. I have created a simple form web page that the sales people use to send a request to the help desk Everything works fine except my boss doesnt like the output of the email that gets generated to the helpdesk when someone clicks the send button. How can I change the format of the posted email?? I am interested in having a web format or some sort of word document attachment. this is what I have coded right now method="POST" enctype="text/plain"> script completed, thx Hi all, I have a simple newsletter form, so just the email field and a submit, what I would like to do is to send this data to a larger subscriber form, so one that has name, email (with the data previously entered already added), list to subscribe to etc. Can this be done? Thanks I have a form with a number of elements. One of these elements is: <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-subscribe.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> Clicking on that element makes the form submit. But if I add a similar element: <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-subscribe.gif" border="0" name="submit2" alt="Make payments with PayPal - it's fast, free and secure!"> ...clicking on that also makes the form submit. So was wondering if anyone knew what the rules were for which elements make a form submit? Cheers, James HTML Code: <form method="post" action="mailto:xxxxxxxx@xx.com "> <table class="text3"> <tr><td valign="top" width="140">Voornaam:</td><td><input name="requiredvoornaam" type="text" id="requiredvoornaam" class="veld" size="30" /></td></tr> <tr><td valign="top" width="140">Achternaam:</td><td><input name="requiredachternaam" type="text" id="requiredachternaam" class="veld" size="30" /></td></tr> <tr><td valign="top">E-mail:</td><td><input name="requiredemail" type="text" id="requiredemail" class="veld" size="30" /></td></tr> <tr><td valign="top">Telefoonnummer:</td><td><input name="requiredtelefoonnummer" type="text" id="requiredtelefoonnummer" class="veld" size="30" /></td></tr> <tr><td valign="top">Adres:</td><td><input name="requiredadres" type="text" id="requiredadres" class="veld" size="30" /></td></tr> <tr><td valign="top">Woonplaats:</td><td><input name="requiredwoonplaats" type="text" id="requiredwoonplaats" class="veld" size="30" /></td></tr> <tr><td valign="top">Aankomstdatum:</td><td><select name="adag" id="adag"> <option value="Dag">Dag</option> <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> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="amaand" id="amaand"> <option value="Maand">Maand</option> <option value="Januari">Januari</option> <option value="Februari">Februari</option> <option value="Maart">Maart</option> <option value="April">April</option> <option value="Mei">Mei</option> <option value="Juni">Juni</option> <option value="Juli">Juli</option> <option value="Augustus">Augustus</option> <option value="September">September</option> <option value="Oktober">Oktober</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="ajaar" id="ajaar"> <option value="Jaar">Jaar</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> </select> </td></tr> <tr><td valign="top">Vertrekdatum:</td><td><select name="vdag" id="vdag"> <option value="Dag">Dag</option> <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> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="vmaand" id="vmaand"> <option value="Maand">Maand</option> <option value="Januari">Januari</option> <option value="Februari">Februari</option> <option value="Maart">Maart</option> <option value="April">April</option> <option value="Mei">Mei</option> <option value="Juni">Juni</option> <option value="Juli">Juli</option> <option value="Augustus">Augustus</option> <option value="September">September</option> <option value="Oktober">Oktober</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="vjaar" id="vjaar"> <option value="Jaar">Jaar</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> </select> </td></tr> <tr><td valign="top">Welke huisje:</td><td><select name="huisje" id="huisje"> <option value="1">.____Huisje Zomerbries_____.</option> <option value="2">.____Huisje Wervelwind_____.</option> <option value="3">.____Huisje Tornado________.</option> </select> <tr><td valign="top">Aantal personen:</td><td><select name="aantal personen" id="aantal personen"> <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> <option value="7">7</option> <option value="8">8</option> </select> <tr><td valign="top">Overige vragen:</td><td><textarea name="bericht" rows="6" cols="23" id="bericht" class="area"></textarea></td></tr> <tr><td valign="top"></td><td><input type="submit" name="sendFormButton" value="Verzenden" id="sendFormButton" /></td> </tr> </table> </form> </td></tr></table> This is what i get once tested... its out of order... Help me plz...... Im not good with those thingz.. |