HTML - Can't Get Form To Post Data
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> Similar TutorialsSo 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, 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, Hi there! I've been googleing for this for a while now, but I couldn't find any solution. My problem is simple. I want my forms to be in a way that browsers 'know' that the data being typed into the form is to be sent with the Unicode UTF-8 encoding. So that every data POSTed back to my server is encoded using UTF-8. How can I do that? Thanks in advance, AvoC. Hi Everyone, I am trying to create a generic Form model for taking user input and storing an XML file in a database. I can only use JSP, Java, and HTML functionality which is already installed on the server, so new mods or plug ins are out. To do this, I need to group fields with a common parent together, and fieldsets are a natural way to do this. Is it possible to discover, using JSP or another method, which fieldset encompassed a given form field? Take the following example: XML Structu Code: <server name="myserver01"> <elements> <serverAttr attr1="myAttrbiute"> <serverAttr attr2="myAttr2"> </elements> </server> <server name="myserver02"> <elements> <servertAttr attr1="another attribute"> </elements> </server> ... To gather the data, I have an HTML form where users may add any number of server attributes (including 0) to a given server which they also define. example/pseudo-code shown he HTML Code: <fieldset> <Legend accesskey="Server1">Define a Server</Legend> Server Logical name : <input type="text" size="30" name="serverName"> Attribute: <input type="text" size="30" name="attribute"> <!--Java Script Button to add an additional form field dynamically, with identical form name.--> </fieldset> <!--javascript button to add additional fieldset, with identical structure as above.--> Users can add or remove any number of servers or attributes using the javascript buttons, but the form field names will be the same. When the user presses submit, I will get some number of post variables identified by "attribute", but how can I map them back to a specific server definition? Is this possible? Thanks so much! Hello all! Can anyone shoot me over some quick code here. What i need to do is simply have one text box and one combobox. When the person fills in the info for the 2 and clicks submit, text appears under the button (like for a thank you) and the info gets sent to my email. can anyone shoot me over some code here, i need this really bad for a part on my site, but i dont know how to do it. thanks! When parsing the POST data from an input form, how do you identify a uploaded file? My first guess is that the Content-Disposition header field will contain a filename parameter, but I don't want to just make that assumption. When I dissect some POST data, it looks like this... Code: -----------------------------7d721bbb0272 Content-Disposition: form-data; name="data1" 1 -----------------------------7d721bbb0272 Content-Disposition: form-data; name="myfile"; filename="X:\myfile.txt" Content-Type: text/plain mary had a little lamb with fleece as white as snow -----------------------------7d721bbb0272 Content-Disposition: form-data; name="start_date" -----------------------------7d7d37b0272 Content-Disposition: form-data; name="submit" Submit -----------------------------7d7d37b0272-- I highlighted the filename parameter. That's what I'm planning on keying in on. Is this right? Darren Hi everybody! I have a jsp page with a form and a table. My aim is that when i press the submit button of the form,collect the data and fill the table with it. I am working with J2EE. I have already collected the data in a Java class,but I dont know how to introduce this data into the table. Best Regards! I have been using my site for some time now and it carries the image name over when you clicked on purchasing the print. It carries it still, but when you submit the form, the image name isnt there and the form errors because the field is blank. Here is the site: www.sthompsonphoto.com I cant seem to figure out why it disappears when you click Submit? Any help would be great! 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 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> 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 Everyone, 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. 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 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 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 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'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. |