Form Submission
I need help with this form submission, i understand for submission is the easiest thing to do in php. But i just can't get this to work.
Basically i have a form in which is a question. I have given users choice of 4 answers to this question in a dropdown menu. I just want the form to recognise what answer the user has chosen and put it into a table called support and the column 'category' in it. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Server-Side Form Submission - Form Submits To Form, Which Autosubmits. BAD!
I have a php form from which the user fills out their name and address and clicks "Submit". The form goes to a page that stores the data in a mySQL database, then, using hidden fields, populates another form and actives with a javascript onLoad=submit() to send the information on to the final destination. I cannot control or edit the final destinations web page, which is why the interim page is needed. What I would like is for the user to fill out the form, and upon submission have the data recorded into the database and have the data passed on in a "form like way" on to the final destination BY THE SERVER, not by the use of a hidden form page that auto submits. Any suggestions? Here is the interim page's code below: <? $link = @mysql_connect($db_host_name, $db_name, $the_decoded_password) or die; @mysql_select_db($db_name) or die; $query = "INSERT INTO web_link VALUES ('', '$a', '$b', '$c','$d', '$e', '$f', '$g', '$h')"; $result = @mysql_query($query) or die; ?> <html> <head> </head> <body onLoad="document.contactme.submit();"> <form name="contactme" method="post" action="http://www.test.com/cgi/storethisdata" > print "<input type="hidden" name="first_name" value="$first_name"><br>"; print "<input type="hidden" name="last_name" value="$last_name"><br>"; print "<input type="hidden" name="email" value="$email"><p>"; print "<input type="hidden" name="phone" value="$phone"><p>"; ?> </form> </body> </html>
Form Submission Fills Form Values With Garbage
I'm attempting to do some form processing on a server that has register_globals off, however, I've run into a confusing situation and need some help. Basically, the form is a multi-part/form-data form as I have it upload a file in addition to submit a number of other fields, but the error I have occurs even when no upload is done. When I submit the form, all my input field variables get filled with garbage. Here's the html before submission for one of the fields: Code:
Form Self Submission
I have a form which I am trying to have submit to itself, but change 1 var so that it changes what is printed. how can i do this so it works? Code:
Form Submission
I print out the following after I submit a button. How can i print the following two buttons in the previous form which I'm submitting.Of course, these two buttons should appear only after the form is submitted. Code:
Form Submission
I have an event calendar. Users submit thier events and then I also allow them to edit thier entries. When they edit an event, that recorded is stored in a different table. I then go in and view the record. When I submit it, it updates the main table. Below is the code for viewing the edited info. On some records the submit button doesn't work? I click on it and nothing happens? Why would this happen? PHP Code:
Form Submission
I am working on a PHP based web-site which is running a text based war game. So, there are lots of forms users need to submit. One of the form players submits is to ‘attack’ other player (not physically though). For that, player needs to fill out a form (let say this form is on the script1) having two or three input text fields. After filling out the form user clicks on submit button which then calls (let say script 2) .This script 2 then does all the logic, modifies the database according to who won the attack , calls back the script 1 with the result to be shown to the player. But what is happening right now is that players are abusing the game by clicking the submit buttons or hitting (enter/return) key multiple times(very very quickly), although they are allowed to attack as many times as they want but not before the last attack is done means until they got the result of last attack. They are clicking submit buttons before the last submission updates the database. Is there any way once the player submits the form, they cannot submit it again until the script 1(containing the form) gets reloaded again with the result. Also each script is a PHP Script. I hope I explained my problem. I heard there is way u can do it with JScript but what if they disable their Jscript.
Form Submission
On my three development boxes I run Gentoo, BSD and Windows with practically the same PHP config along with Apache 2. A project I recently completed was just uploaded to a client's server running Apache 2 and PHP (5.2.1). I can no longer submit any data from forms: Code:
Form Value Submission Problems
I'm having a little problem with my php in that when I submit a value with more than one word from a form, (for example, "Cineworld Renfrew Street"), only the first word seems to get submitted, so that when processing it after submission, only "Cineworld" is available. Is there a way I should be formatting form values to prevent this?
How Do I Stop A Form Submission
I have the below code. It has a member number input box. Once a member number is entered, it validates the number against a member number in a table. If the member number is a valid number, it will submit the form, if it is not a valid number it redirects the user to a signup page. But it is not working, it is submitting always. Code:
Submission Form To Fax Machine, Is It Possible?
I got quite a question here, is it possible that from a submission form on a website the results get faxed throught the webiste directly to a fax machine? I would really appreciate any insight on this concept. And where to start.
The Woes Of A PHP Form Submission
Good evening to the skilled Ladies and Gentlemen of the PHP world. I am fairly new to all of this but learning quickly. I have run in to a need to remove blank lines from a form submission after its sent back to the web server for processing by a PHP document. I have a textarea that users can paste lines of text in to and submit them for inclusion in to a database. Every aspect is working perfectly, except one. No matter what I try, I cannot get rid of simple blank lines from the form submission. $theLines = $HTTP_POST_VARS['userSubmitted']; This variable ($theLines) now contains the contents from the textarea. I have tried using ... $theLines = explode(" ", $theLines); and $theLines = explode(" ", $theLines); But all of the blank lines are still there. If anyone has some snippet that they would share, I would be very grateful.
Disabling Enter Key For Form Submission
Could anyone please help me with tips on how to disable a ENTER key, so that a form is submitted only when the designated button for submission is clicked.
Display Of " And ' From Form Submission
I have single and double quotes in the text field which is submitted on one page. When I display this on the next page I see ' and " in place of ' and " respectively.
Bug In IE5+ Involving Form Submission & Images With '?' In URL
I have been experiencing problems with images containing query strings in their URLs. When I land on a page containing these images having submitted a form they don't appear. I heard this is an IE bug. Is there a quickish workaround using PHP? I tried processing the form(s) with an intermediate script, then redirecting to the destination page but still no images.
PHP Form Submission Data Errors
One of my variables "link1" that is storing a bunch of urls is having random lines being duplicated on form submission. I just recently swithed servers from a PHP 4.3.3 to a 4.2.2 version. This error has only started appearing on the new machine. The script worked fine on the old server and still does on the test server. Any ideas? I think it might have to do with the ini config. i am stumped. here is a link to my code.
Disallowing Multiple Submission Of A Form
i have a dynamic form that sends data to a mysql table. it sends data into the table according to variables that are passed in. e.g. form.php?book_title=abc how do i block the user from sending information about the same "book_title" more than once?
Updating Text In Form Submission
I am using a text area form submission to add imformation to a html webpage, and I would like to be able to edit that text in the php form at a later date after submission. Does anyone know how to get the origonal text back into the form text area for editting and resubmission?
Trouble With Mailing A Form Submission
I recently had to move all my php pages and MySQL db to a new server and may have overlooked a setting or two in the php.ini or somewhere else. This form worked up until the move. Here's the code:
Form Submission And Include Files
I have an index page that I want to put an e-mail newsletter signup form on. I have the form inside another page called "misc.php" that is included in the index page. So far so good. When someone submits the form, though, which page do I send the POST to? When I send it to index.php the misc.php page seems to not get the variables. And of course if I send it to itself it works fine, but it takes me to another page, which I don't want. This is very strange.
Capturing Results Of A Form Submission
Is it possible, in PHP, to capture the resulting HTML of a submitted form returning from a server and incorporate that HTML into say a table, or some predefined layout? I am trying to incorporate the resulting HTML into a layout I have created in order to keep the look & feel of my site consistent, but the resulting page is a plain "cheesy" page.
Encrypt Form Variables During Submission?
I've been looking around the net for a solution (I'm pretty new to php) on how to encrypt a form variable before you submit it, is this possible? To give you an idea, I have a "change your password" type form and when the user enters their new password and clicks submit the password is sent out in the open before it's encrypted (md5) and put into the database. I'd like to encrypt it BEFORE I send it though. I plan on using SSL but I'd also like to see if what I'm trying is even possible.
Coding A Form From Email Submission
I have a customer who wants his contact page customized to be a form with questions to be answered by the person trying to contact him. When they are done filling in the form it is suppose to be emailed to him. I can not get this form to work right. Code:
Prevent URL's In Form Submission
I need a way to prevent URL's from being inserted into form fields. I have not been able to discover how to do this. Our forms are being submitted with junk URL's in the form fields. I would like to either A) Kill the form processing if URL's are posted, or B) Provide a pop up message stating that URL submissions are not allowed.
Creating A Tag Cloud Submission Form
I have recently redesigned a clip dump script and I am trying to add the ability for people to submit tags for their items. Here is what I have done so far. Code:
Multiple Attachments In An Email Sent From Form Submission
Currently the user selects a document to download, fills in their details and hits submit. They get the file emailed to them, and I get an email telling me their details and which document they downloaded. However, I'd like the user to be able to select multiple documents (using tick boxes maybe) to be emailed in one mail. There might be 5 documents up there eventually and they could download as many of them as they want. Would anyone be able to take a nose at the code below and tell me how it might be adapted for multiple attachments? I was thinking maybe to loop the attachment section, but I don't know how to do it, or what variable to use to come out of the loop. Code:
A Mystery (how To Mimic Form Submission With Headers)
I have this simple html form with only one field and a submit button which uses the POST method. It works fine. I have been trying to learn php headers and found that one could do exactly the same thing using headers. Using ieHTTPHeaders v 1.6 - agreat FREE utility - one can see the headers being sent when the form is submitted, and then the php script with headers is written. It has worked fine always but in this particular case although the headers are sent correctly .. the form field value for some reason is not accepted by the server. I was wondering if there are variables (predefined variables) that are required by the server but not being included in the headers. Has anyone come across a similar problem? How could one mimic the browser 100% - including all the browsers predefined / environment variables?
Form Submission (no Button) Using PHP+cURL+ Transfer Control To Other Site
I'm trying to send data using the POST method and also have control of the browser be turned over to the website that's receiving the POST data (note that this is NOT the same as sending the data via POST method and then redirecting to the website after). I need it to work exactly like hitting the submit button on an html form, and I need it to work from PHP. It needs to POST the data to the site and also let the other site have control at the same time. I've tried a couple of methods using both cURL and an fsocket function, but it seems like in both cases that (1) the data gets sent to the other site first, (2) then my program gets a response back, (3) and then it redirects to the other site afterwards. The data gets sort of POSTed to the other site (I get a 200 response back, and I get info showing it was posted correctly), but since the other site does not get control, it seems to dump (not save) the posted data. Code:
PHP Form Submission <input Type="hidden"> Security Issues?
Someone has said to me that when using a form (method = post), that storing data in "hidden" tags ie <input type="hidden" name="myField" value="something"> means that the user can set the value to whatever they like So my questions are: 1. How would they do this 2. How can I stop it 3. Do I have to abandon the hidden values and go with sessions?
Multiple Submission !!!
I am looking to create a php package for multiple directory submission. Most of the directories are created with phpld so, I want to inject my submission details to all of them from my script !!
Site Jump During Submission
1)I'am collecting form data on my server from a HTML form. The next steps Iam trying to figure out is: 2) I want to then go to another site (payment site) 3) then back to my site. 4) extract original data gathered from step 1 I know the simple method would be to go to pay site first then to my site. However I would like my form first! I also do not want to write the data into mysql in step 1. Not until step 4.
Trouble With Redirection Upon Submission
I have a poll on my website, but I'm having trouble with the redirect when someone hits submit - it goes to the action php file, and not back to the home like I want them to. Here is my code if anyone can help me out. <?php include "connect.php"; $s=$_SERVER["REMOTE_ADDR"]; $ipcheck="SELECT * FROM P_ip where IP='$s'"; $ipcheck2=mysql_query($ipcheck); while($ipcheck3=mysql_fetch_array($ipcheck2)) { $ip=$ipcheck3[IP]; } if($ip) { print "Thank you for voting in our poll"; } else { $pollquest="SELECT*From P_question"; $p2=mysql_query($pollquest); while($p3 = mysql_fetch_array($p2)) { print "$p3[question] <br>"; } $pollans="Select * from P_choices"; $pollans2=mysql_query($pollans); print "<form action='wp-content/themes/matchbox1.1/pollit.php' method='post'>"; print "<input name='redirect' value='/' type='hidden'>"; while($pollans3=mysql_fetch_array($pollans2)) { print "<input type='radio' name='answer' value='$pollans3[ID]'> $pollans3[answer]<br>"; } print "<input type='submit' value='submit' value='vote'>"; print "</form><br>"; } ?>
Avoid Multiple Submission
I receive multiple copy of the same form because the client press very fast, many times, the submit button. Is it possible to limit this problem? for example timing the next submit.
Bulk Submission To Whois
I have a script (php) which allows me to query a whois server and return specific fields. My question is, how would I submit more than one domain name at a time to my script so that each returned field is then stored into a database file associated with the domain that is queried? There is approx. 8000 domain names registered thru our registry and we need to update the admin contact emails. The domains are currently stored in a MySql db which can be easily converted to a text file.
Blank Submission Code
on my site i allow multiple files to be uploaded at once , but was wanting to put in some code so that if a black submission (no photos selected) was submitted the code would spit an error and exit Code:
Include Prevents Submission
I have a form which when the submit button is pressed it should go to a different page.... but when i have an include to do with absolutely nothing relating to the page other than to display how much money the user has.. and what level they are it just refreshes the page rather than doing the relocation. If i remove the include how ever it works . Would any one know what sorta thing causes this so i can check it out ?
Secure Email Submission Script ...
Can anyone suggest a secure php email form submission script? I know there are a lot of security risks with forms. What is the best and least vulnerable canned script?
Scripted Search Engine Submission - How?
I am about to build a web site that contains a news section. Basically, the site owner will login to an admin section and from there, be able to add news. What I would like to know is how can that news article (i.e. http://www.mysite.com/view-news.php?news_id=355) be automatically submitted to a search engine, such as Google. Is it possible? My concern is that search engines dont allow this for fear of spam. Unfortunetely, I cannot ask the intended web owner to do this as their computer skills may be limited. Asking them to manually submit a website may be beyond them. Also, how often does a search engine, such as Google, return to an indexed website? Whats the estimate if anybody knows? Another way this could be done is when Google follows through links on the site it may index newly added articles.
Checking The Database To See If Submission Already Exists...
I have set up a form. Once the form is submitted the information is sent to this page (see code) below. I am trying to use an if statement to check if the VIN already exists in the database before it is INSERTed into MySQL. If the vin does exist the user gets an error saying so. If it doesn't exist the ELSE statement INSERTs the information into the database and the user gets a thank you message. Code:
Enforcing POST Submission Location
I am considering checking my scripts to make sure the forms are being submitted from my site. The problem with that is I wonder if certain browsers or firewalls can just block referrer value so I cannot access it. In order words, is it possible that the value could just be NULL, and then I end up blocking real users? I know when I track website referrers, the value is frequently not set, so wouldn't this be the same case when tracking script locations using PHP?
Add Form Field Values Into Php Seesion Variable Before Submitting The Form
I have php page which is basically a simple html form containing some text fields.The user will type in values in it and submit it .Now what i want is that just at the time of submittion i want to assign the form field values in session variables. I nwwd this b'coz the form is being submitted into a cgi script which has been given to me.Now the cgi script is an executable one and i am unable to view or change its content,Its functionability is to change a password for a linux user account .Now the cgi script after completing the job is redirected to another html page.What i have to do is that i need to trap the user input and update the values in a mysql database .Now if i can assign the values in a session variable then i can do the updatation from some later pages.
CURL Form Posting To Self Referencing Form Action
I've successfully used CURL to maneuver around and through sites but a new site I've been trying to work with has got me stumped. To retrieve the data I'm trying to get a login is required. If you go to any page in the "member" area without logging in you get directed to a https connection and hit login.php (ie: you end up at https://www.domain.com/login.php). The problem, I believe, lies in the fact that the form on that page references itself in the form action tag. The action tag in the form is "/login.php" and nothing I've tried has been successful in getting CURL to actually submit the data and get me logged in. Not surprising really since you'd normally point CURL to the action target to pass form data. The things I've tried so far without luck are: * Hit the main site page to pick up the session cookie then go to one of the "member" only pages * Gone directly to one of the "member" pages to get redirected to login.php Both attempts end up simply returning me the contents of the login.php page which, obviously, doesn't help or do any good. What isn't clear from the CURL documentation with PHP is whether or not the CURLOPT_POSTFIELDS get passed to pages after a redirect takes place. I suspect they are but the fact that login.php refers back to itself seems to be the real problem. If anyone has any ideas on how to convince CURL to get me past login.php or any other suggestions on things I could try I would very much appreciate it.
Dynamic Form Fields/multiple Page Form?
It is for a friends out of print booksite, where visitors can request multiple books to be searched by adding one at a time to a cart (javascript), then once all added they submit to another form where they enter their personal details and all is sent through. The problem is at the moment they cannot change whats in the cart without refreshing the browser window and losing everything. 1) present for asking how many books they want to search for 2) display multiple rows of the same input fields depending on how many books they say they want to have searched for?i.e title|author|publisher|etc title|author|publisher|etc title|author|publisher|etc 3) when these are submitted they could see these above the next part of the form where they enter their details with the option to go back and delete/amend. 4) send all the info to my colleague. if so has anyone seen a similar script that I could take a look @ to see if I can hack it to suit my needs?
Variable Extracted Out Of One Form Not There Anymore After Submitting Another Form
in short what I'm trying to do: pass a variable from a form that's posted to a certain page, to the same page. The variable is extracted with $_REQUEST. Next, another form in the same page is submitted, again to the same page. Following that, I have code depending on the submission of the latter form. In that code, I try to do something with the variable that has been submitted with the first form, but it's not there anymore. I tried passing it to another variable beforehand, making it a session variable, making the $_REQUEST conditional, etc etc. But nomatter what I do, it remains empty. What's the correct way to go about this?
Integrate Client Form With Third Party Form
Anyway, here's the deal. The client wants a certain form to have its input send to a third party. The form is *only* an email address - that's it. Looks like this: <? if ($action == "sendmail"){ if ($error == "") { echo "<span class="error2"><b>Thank You!</b> You're now signed up for the Company Newsletter, the foremost authority on developing quality requirements specifications. Watch for it in your inbox!</span>"; }} ?> <?php if ($error == "1") { echo "<span class="error2">"; } if ($emailerror == "1") { echo "The e-mail you entered was invalid. Please check it and try again."; } if ($error == "1") { echo "</span>"; } ?> Sign up for our FREE newsletter on <b>developing quality requirements specifications.</b><br /> <form method="post" name="newsletter" action="<? echo $PHP_SELF?>"> <input type="hidden" name="recname" value="Company Name" /> <input type="hidden" name="subject" value="Newsletter Email Submission" /> <b <? if ($emailerror!= "")?> >Email:</b></span> <input class="input" type="text" name="email" size="20" value="<? echo $email?>" /> <input type="hidden" name="action" value="sendmail" /> <input class="button" type="submit" value="Send It" /> </form> See? Simple. One field. If the end user does not input an email address, or inputs an invalid string as an email address, it returns the error. The PHP code is as such: <? isset($_POST['action'])? $action = $_POST['action'] : $action = '' isset($_POST['email'])? $email = $_POST['email'] : $email = '' if($action!="sendmail"){ include ("home.shtml"); exit;} if ($action == "sendmail") { if (!ereg('^[-!#$%&'*+./0-9=?A-Z^_`a-z{¦}~]+' .'@'.'[-!#$%&'*+/0-9=?A-Z^_`a-z{¦}~]+.' .'[-!#$%&'*+./0-9=?A-Z^_`a-z{¦}~]+$', $email) ¦¦ ereg("'", $email)) { $emailerror = "1"; $send = "no";} if ($send == "no") { $error = "1"; include ("home.shtml"); exit;} $to = "email@company.com"; $message = nl2br("Please add my e-mail to your newsletter mailing list. e-Mail address: $email"); $mailheader = "From: <$email> Content-Type: text/html"; mail($to, $subject, $message, $mailheader); } { include ("home.shtml"); exit; } ?> More simplicity. Gotta love it. Now I find out I need to make it work with this third party service. Unfortunately, the only code they provide is for HTML based foms *only*. (Yes, I actually called them on the phone to ask for assistance, and they basically told me to figure it out for myself, because they don't provide support for anything but generating HTML code. Nice.) So, here's their code that somehow needs to be integrated into mine (I'm changing some stuff, because I don't know what it does - but I mean like the numbers they make me input for things - I don't know if they're client-specific or not): <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"> -------------------> <form action="3rdParyURL/servlet.WebToLead?encoding=UTF-8" method="POST"> <!------------------ This HTML is defaulted to DEBUG mode so that your web master can test the online Web-to-Lead page from the desktop. Once your web master has finished testing please remember to remove the entire "debug" and debugEmail" lines of code prior to adding this HTML to your website. -------------------> <input type="hidden" name="debug" value=1> <input type="hidden" name="debugEmail" value="me@myemail.com"> <input type=hidden name="oid" value="123456789065432"> <input type=hidden name="retURL" value="http://www.companysite.com"> Email: <input name="email" id="email" type="text" size=20 maxlength=80><br> newsletter request: <input type="checkbox" name="56A987123J5489P" value="1" id="752D58963G1247W"><br> <input type="submit" name="submit"> </form> Now, you will notice that they have a checkbox for adding someone to the newsletter - but the client just wants the sender sending the e-mail the only thing they need to do to get this going. I have *no* clue how to integrate this into my PHP. I can only have the e-mail area, and I don't know what to do about the action - if I replace my <? echo $PHP_SELF?> with their action - it negates my page. not completely, though - but for the most part....
PHP Contact Form--blank Subject When Form Is Sent
I have a contact form, which has a subject field (the subject of the email that is sent to me), and when the form is submitted, the subject is not being sent. Instead, I just get a blank subject. Code:
Getting Multipart Form To Move To The Next Form
Having trouble getting a multipart series of forms to move to the next form. The problem line is: <form method="post" enctype="multipart/form-data" action="Data_Form1.php"> If the "action" parameter is set to the current form (Data_Form1.php) then the data posts to the table correctly, but it does not move to the next form If the "action" parameter is set to the next form in the series then by clicking "submit" it moves to the next form, but the data does not post to the table.....
Pass Infomation Form One Form To Another
I created a post html page where the user fills out a form and it sends it to my PHP script using the $POST method. I have validated froms checking for input if non is given it prints an error message. Now here is my question how can I reload the form with the information that the vistor entered on the previous one. My HTML code is stored in a varible $htmlcode here is the code for it is below. This comes from the original html document that passed the value to PHP from the form. I tried to set the values of the input text box to strings; however that did not work. Here is what I used <input type="text" name="db_fax" value="$db_fax" size="25">. For some reason the scipt didnt read the value of the string and put it as its value. It just filled the input text boxes with the name of the string($db_fax). To output the data is used print "$htmlcode"; method. If some one could tell me what Im doing that would be awesome. Code:
|