Apache 1.3.27, PHP 4, SuSE 8.2 PRO - Form-Post Failure
I've recently done an upgrade installation to SuSE PRO 8.2 from
same/8.0.
The problem now is that I don't seem to be receiving data from forms
to PHP-processing pages using either POST or GET for the form method.
When I use GET, I see that the URL has been correctly formed with the
variable name embedded in the URL along with the properly formed
value:
http://www.whatever.com/test.php?ma...Process+Request
Then, in a sample php script:
<?
print "main: $main<BR/>
";
if ($main == "") {
print "main is blank<BR/>
";
}
?>
All I get in the output HTML on the test php script is the "main: "
portion of the print command - the variable is reported as a null and
tests positive for a null.
The php function test() shows mod_php4 is loaded. I have
performed/duplicated these results with the firewall on and the
firewall off. Not that I think the firewall is an issue since the GET
method shows, via the URL, that the variable information is passed
across forms. But I did read somewhere that a firewall can impact the
POST method so I turned it off to try it - no change in the results.
Even tho the info is being passed (GET), it's not accessible by
var-name access in the PHP script. All the php scripts on my server
are so affected and were working prior to the upgrade.
Any ideas? I also suspect this is why my squirrelmail installation
stopped working.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Trying To Build PHP 4.3.0 With Apache 2.2.2 On SUSE 9.1
Whilst I grep around for the first set of problems, I thought I'd ask any generous members of this PHP community for clues... I've started by trying out the instructions at: http://dan.drydog.com/apache2php.html Got this out of the make: ----------------------------------------------------------------------------------------------- /bin/sh libtool --silent --mode=compile gcc -Isapi/apache2filter/ -I/root/downloads/php-4.3.0/sapi/apache2filter/ -DPHP_ATOM_INC -I/root/downloads/php-4.3.0/include -I/root/downloads/php-4.3.0/main -I/root/downloads/php-4.3.0 -I/usr/local/Apache2/include -I/root/downloads/php-4.3.0/Zend -I/usr/local/include -I/root/downloads/php-4.3.0/ext/xml/expat -I/root/downloads/php-4.3.0/TSRM -g -O2 -prefer-pic -c /root/downloads/php-4.3.0/sapi/apache2filter/sapi_apache2.c -o sapi/apache2filter/sapi_apache2.lo In file included from /usr/local/Apache2/include/apr_strings.h:48, from /root/downloads/php-4.3.0/sapi/apache2filter/sapi_apache2.c:34: /usr/local/Apache2/include/apr.h:270: error: parse error before "apr_off_t" /usr/local/Apache2/include/apr.h:270: warning: data definition has no type or storage class In file included from /root/downloads/php-4.3.0/sapi/apache2filter/sapi_apache2.c:34: /usr/local/Apache2/include/apr_strings.h:297: error: parse error before "apr_off_t" /usr/local/Apache2/include/apr_strings.h:313: error: parse error before '*' token /usr/local/Apache2/include/apr_strings.h:349: error: parse error before "size" In file included from /usr/local/Apache2/include/apr_file_io.h:29, from /usr/local/Apache2/include/apr_network_io.h:26, from /usr/local/Apache2/include/apr_buckets.h:29, from /usr/local/Apache2/include/util_filter.h:26, from /root/downloads/php-4.3.0/sapi/apache2filter/sapi_apache2.c:36: /usr/local/Apache2/include/apr_file_info.h:204: error: parse error before "apr_off_t" /usr/local/Apache2/include/apr_file_info.h:204: warning: no semicolon at end of struct or union /usr/local/Apache2/include/apr_file_info.h:206: warning: data definition has no type or storage class /usr/local/Apache2/include/apr_file_info.h:212: error: `ctime' redeclared as different kind of symbol /usr/include/time.h:254: error: previous declaration of `ctime' /usr/local/Apache2/include/apr_file_info.h:219: error: parse error before '}' token In file included from /usr/local/Apache2/include/apr_network_io.h:26, from /usr/local/Apache2/include/apr_buckets.h:29, from /usr/local/Apache2/include/util_filter.h:26, from /root/downloads/php-4.3.0/sapi/apache2filter/sapi_apache2.c:36: /usr/local/Apache2/include/apr_file_io.h:548: error: parse error before "apr_off_t" /usr/local/Apache2/include/apr_file_io.h:740: error: parse error before "apr_off_t" In file included from /usr/local/Apache2/include/apr_buckets.h:29, from /usr/local/Apache2/include/util_filter.h:26, from /root/downloads/php-4.3.0/sapi/apache2filter/sapi_apache2.c:36: /usr/local/Apache2/include/apr_network_io.h:545: error: parse error before "apr_off_t"
Installing And Running Apache 2.0.46 / Php5.0.0b1 / Suse Linux 8.2
I did the following as instructed in the docs. (see below) everything seemed to install ok and I started apache with no complaints, but, 1)I do not see a process for apache using ps -ef 2) In yast I see that the new apache2 version is installed but not php5, its still on php4 any ideas ? 1. gzip -d httpd-2_0_NN.tar.gz 2. tar xvf httpd-2_0_NN.tar 3. gunzip php-NN.tar.gz 4. tar -xvf php-NN.tar 5. cd httpd-2_0_NN 6. ./configure --enable-so 7. make 8. make install Now you have Apache 2.0.NN available under /usr/local/apache2, configured with loadable module support and the standard MPM prefork. To test the installation use your normal procedure for starting the Apache server, e.g.: /usr/local/apache2/bin/apachectl start and stop the server to go on with the configuration for PHP: /usr/local/apache2/bin/apachectl stop. 9. cd ../php4-NN 10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs 11. make 12. make install 13. cp php.ini-dist /usr/local/lib/php.ini Edit your php.ini file to set PHP options. If you prefer this file in another location, use --with-config-file-path=/path in step 10. 14. Edit your httpd.conf file and check that these lines are present: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php .php The path on the right hand side of the LoadModule statement must point to the path of the PHP module on your system. The above statement is correct for the steps shown above. 15. Use your normal procedure for starting the Apache server, e.g.: /usr/local/apache2/bin/apachectl start
Apache/PHP Post Variables
I'm working with someone on a PHP project. The other person is doing testing of scripts on their personal machine using Apache as a web server. The production server and the one I'm using are both using IIS. This other person reports that in their PHP scripts when tested with Apache, form variable sent via the POST method are not "coming through." (This is even using the "long method" of specifying them as $HTTP_POST_VARS['x'].) These same scripts work fine on the the IIS machine (the POST variable come through). I've looked online to see if I can find out if anything special must be specified in the Apache configuration to enable the POST method, and although I found other people posting similar problems, I saw no reference to a solution.
Installed Php-4.3.3RC1 On Suse 8.2
I have installed php-4.3.3RC1 on Suse 8.2, and everything went fine even the make install, but I do not see the new version in yast2 software packages, it still has the old version 4.3.1 any ideas ? is there another step I need to take, how do I check what is really installed ? ps apache is 2.0.46 and mysql is 4.1.0
Problem Installing PHP5 On SuSE 8.2
I've been reading through the lasts months of postings in this (and some other) newsgroups to find a solution to my PHP problem. The configuration I use is as follows: - SuSE v8.2 - Apache 2.0.54 - MySQL 4.1.14 - PHP 5.0.5 Installing the first 3 parts was not a problem at all. Both Apache and MySQL start just fine. Before I could perform a proper 'configure' of PHP I had to update libxml2, add libxml2-devel and python but then the following command worked without any errors: ./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr [note: the previous is, of course, a single line] After this, I used 'make' to compile the stuff and this is where things go wrong. The following error message is shown: =============[ start of make-output ]============================ vpsuse:/usr/local/php # make /bin/sh /usr/local/php/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/standard/ -I/usr/local/php/ext/standard/ -DPHP_ATOM_INC -I/usr/local/php/include -I/usr/local/php/main -I/usr/local/php -I/usr/include/mysql -I/usr/local/php/ext/xml/expat -I/usr/local/php/TSRM -I/usr/local/php/Zend -g -O2 -prefer-non-pic -c /usr/local/php/ext/standard/info.c -o ext/standard/info.lo /bin/sh /usr/local/php/libtool --silent --preserve-dup-deps --mode=compile gcc -I/usr/local/httpd/include -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I/usr/local/httpd/include -I/usr/local/httpd/include -Isapi/apache2handler/ -I/usr/local/php/sapi/apache2handler/ -DPHP_ATOM_INC -I/usr/local/php/include -I/usr/local/php/main -I/usr/local/php -I/usr/include/mysql -I/usr/local/php/ext/xml/expat -I/usr/local/php/TSRM -I/usr/local/php/Zend -g -O2 -prefer-non-pic -c /usr/local/php/sapi/apache2handler/sapi_apache2.c -o sapi/apache2handler/sapi_apache2.lo In file included from /usr/local/php/sapi/apache2handler/sapi_apache2.c:39: /usr/local/httpd/include/ap_config.h:229:16: os.h: No such file or directory In file included from /usr/local/httpd/include/util_filter.h:23, from /usr/local/php/sapi/apache2handler/sapi_apache2.c:40: /usr/local/httpd/include/httpd.h:42:16: os.h: No such file or directory make: *** [sapi/apache2handler/sapi_apache2.lo] Error 1 =============[ end of make-output ]==============================
Mail() Fails - Php4, Sendmail, Suse
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have sendmail running on the local server - mail from unix (1) mail and mutt work locally on the server. This is, specifically, sending mail to a localhost user or another user off on the net somewhere works fine. When I try either simple, or complex, mail() functionality via PHP, it silently fails. And, by silently, I mean that there are no error messages in the PHP log (logging of all messages is enabled), sendmail log, or /var/log/messages or /var/log/warnings. The mail() returns a FALSE indicating that the php->sendmail handoff never occurs. I've even tried forcing the return address but that's not working either. Stable applications, like OSCommerce for example, also fail under this configuration. /etc/php.ini is correctly configured and the sendmail_path is defined correctly. As a matter of fact, the results are the same whether or not sendmail_path is implicitly or explicitly configured. Currently: .....
Form Post
i am making a form but every time it trys to send it it has to send it through outlook i wont the page to send it by its self without it coming up about outlook and stuff or is there a way i can send it to a text file if so is there a good tut for it.
Form Post
I am using 15 text areas for the user to put in 15 names. so we have user1, user2,....user15. How can I do this below: $user1=$_POST['user1']; $user2=$_POST['user2']; $user3=$_POST['user3']; $user4=$_POST['user4']; $user5=$_POST['user5']; $user6=$_POST['user6']; to input the data in a table without actually having to type out 15 lines.
Form POST
I am having my data emailed to me, but the data does not seem to be picking up the user's IP address, the Browser type, the URL that he/she came from, nor the email address they are entering on the form. Code:
Cannot Find MySQL Header Files Under - Compiling PHP5 (Suse 9.0)
I have compiled and installed MySQL and Apache 2. I am now trying to compile PHP5 module for apache but am having real problems with it. I keep getting the message: "Cannot find MySQL header files under" and then a file path. I have tried various paths and no path at all but I still can't get it to work. Is there something else I need to download that is not part of the Standard MySQL source download?
I Am Trying To Design A 'form?' Using Php, Mysql And Apache
I am trying to design a 'form?' using php, mysql and apache that does the following. 1. enter data using forms 2. do lookup using form that will display council persons or committees.. user will be able to select one and the system will display either the council people on committee or the committees that the council person is on. There will be more but right now I am working on the lookup portion. Would I use php to do sql select from either database and then 'somehow' put that into an html/xhtml select function? If that is the direction how do I take that select function to get one entry back to the database? etc?
Post Data W/out Form
I want to post variables to a php script, but I do not want to use a form to do this... is there some sort of header I can use to redirect and post values to another page? Cookies and sessions are not an option, URL line ('get') variables can't hold large enough a string...
Form Post Method
I am new to PHP. have worked in many languages in the past. I have a HTML page which posts back to the mail.php which mails the contents of the input text boxes. I wish to impose some error checking on the HTML form with JavaScript. How do divert to the javascrpit method and then do the POST after all checks OK....
Form Post Doesn't Work
I have RH9 Linux with the versions of Apache and PHP that came with it. The PHP is version 4.2.2 on the CD, I believe. Apache, I think, is version 2.0. I found I can do some regular PHP stuff like pull data back from MySQL and show it, but posting form data from one web form to another web page simply doesn't work for some reason. Has anyone seen this? Example:
XML Form Post To External URL
I'm far enough along in PHP to know how to create input forms, grab the form input as $_POST variables, do some basic validation checks and present the errors to the user for resubmit if needed. For the life of me I can't understand why I can't post data as an XML document to one of my advertisers. For example, a lead form is complete with Name, Address, Phone, and so on. I capture the form data and submit as an XML document. This particular advertiser will only accept data as an "External XML Post." I tried using Javascript and PHP with cURL, but I'm going in circles trying snippets of other people's code -- it's been a week. At this point all I want to do is assume IE7 (nothing else!) and no data checks, just "here's the XML, here's the external URL" and show me that HTTP POST actually works. Right now I'm thinking it's a bunch of junk :-) Someone please help. Here's my server info: PHP Verion 4.4.4 Apache/2.0.46 (Red Hat) CURL support enabled CURL Information libcurl/7.15.4 DOM/XML enabled DOM/XML API Version 20020815 libxml Version 20510 HTML Support enabled XPath Support enabled XPointer Support enabled XML Support active XML Namespace Support active Here's a sample of XML, let's call it "data.xml" <?xml version="1.0" encoding="UTF-8"?> <DataFormSubmit> <individual id="12345"> <FirstName></FirstName> <LastName></LastName> <Address></Address> <Phone></Phone> </individual> </DataFormSubmit> POST XML document to URL on an external website for example: http://www.example.com/othersite/xml.aspx Response XML is equally simple. There is no mention of MethodCall, MethodResponse and Params like the books say, so please don't use those elements in your reply to me. There is mention of field requirements like "Text field" "255 character max" "Numeric" but I think this can be handled by the input validation scripts. I'm just trying to POST and get a response. I've received errors refering to "permission denied" "access denied" "object expected" but at this point I've edited my code so many times I don't know what's right or wrong any more. Here's one of my failed cURL examples: <?php // XML data as string $request = '<?xml version="1.0" encoding="UTF-8"?>' $request .= '<DataFormSubmit>' $request .= '<individual id="12345">' $request .= '<FirstName></FirstName>' $request .= '<LastName></LastName>' $request .= '<Address></Address>' $request .= '<Phone></Phone>' $request .= '</individual>' $request .= '</DataFormSubmit>' // Create Headers $header[] = "Host: www.example.com"; $header[] = "Content-type: text/xml"; $header[] = "Content-length: ".strlen($request) . " "; $header[] = $request; // Send using CURL $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "http://www.example.com/othersite/xml.aspx"); // URL to post curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); // return into a variable curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ); // headers from above curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' ); // special POST with specified Content-type $result = curl_exec( $ch ); // runs the post curl_close($ch); echo $result; // echo reply response ?> And I tried a Javascript variations using code like xmlhttp = new ActiveXObject("Microsoft.XMLHTTP") but I'll save that for a followup post since this is getting long. Anyone out there doing external XML form post?
Php Post Script No Form
How to generate the headers to submit POSTED variables to a page? i know this will be brief, just need to know how to construct the headers with the posted var...
Form Post And Refresh
in my php program ,i posted some text field value from one htm from to php3 form,in this php form i insert all values in mysql db, but again if we refresh the php form it again insert into databse? please give me the solution for it?
Form Data Will Not Post
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most part, the scripts were created with http://phpcodegenie.sourceforge.net/
Form Post Issues
I have a webpage that uploads a photo picture file to server, but goes through some error checking before it redirects to the next page. Since I do not have PHP compiled with mime type support I have checking last 3 characters of filename. Here are my problems: 1) When I set form type to ENCTYPE="multipart/form-data" i can check the file size correctly and works fine, but then filename and extension are in some weird format which is binary I believe. form = 1 Photo: /tmp/phpnDF01W image_x = 89 image_y = 16 Ext: 01w < this is wrong, should be gif/jpg/etc... Size: 34326 File: /tmp/phpnDF01W < this is wrong 2) When I omit the above form type and use default, file size function fails but the extension and filename work correctly. I believe this is because it is sent in ascii/plain text mode. Warning: filesize(): Stat failed for C:WINDOWSDesktopsci.psd (errno=2 - No such file or directory) in /home/fcl/public_html/free/index3.php on line 30 form = 1 photo = C:WINDOWSDesktopsci.psd image_x = 66 image_y = 12 Ext: psd Size: ?????? File = C:WINDOWSDesktopsci.psd 3) I'm also trying to get the file to the server and it's not uploading it. It's creating the directories but not moving the file up there for me!! 4) Here is code. What is going on? Can I kill 3 birds with one stone here? I'd rather not recompile PHP. Must I convert $ext from binary to plain text? while(list($key, $value) = each($HTTP_GET_VARS)) { echo "$key = $value<br>"; } if ($form) { if ($photo) { $ext = strtolower(substr($photo, -3)); function fsize($photo) { return filesize($photo); } $size = fsize($photo); if ($size > 100000) { $focus = "photo"; $msg = "Your file size exceeds the maximum allowed upload. Please re-submit or skip this step."; } elseif (!preg_match("/(gif|peg|jpg|bmp|png)$/", $ext)) { $focus = "photo"; $msg = "Invalid file type. Please submit a gif, jpeg, bmp, or png photo."; } else { if ($ltype == "1") { $type = "hotel"; }<-- this all works fine, etc if ($ltype == "2") { $type = "inn"; } if ($ltype == "3") { $type = "bandb"; } if ($ltype == "4") { $type = "resort"; } $imgdir = "$DOCUMENT_ROOT/lodging/$type"; <-- this all works fine,etc if (!file_exists($imgdir)) { mkdir($imgdir, 0755); } $imgdir.= "/$aid"; if (!file_exists($imgdir)) { mkdir($imgdir, 0755); } move_uploaded_file($photo, "$imgdir/photo1.jpg"); <---this is not working!! loc("index4.php?sid=$sid&aid=$aid"); <-- works fine }} <form name="form1" method="post" action="<?=$SCRIPT_NAME?>?sid=<?=$sid?>&aid=<?=$aid?><ype=<?=$ltype?>" ENCTYPE="multipart/form data"> <input type="hidden" name="form" value="1">
Form Post Not Working
I've made a small script where my users can enter their usernames into a form and when they press submit it sends the username to me as an email. It doesn't seem to be working though. Check the Code:
Form POST To MySQL WHERE
I have a form that is posting to another page, and on that other page the posted elements fill out a MySQL where statement. It is posting school, state, and category. When each field has a value in it, it works fine. However, the default value of "All Schools" or "All States" or "All Categories" will not work. I've tried using a * and also an %. I've also just left the fields at value="", but after post, it considers that a value even if i'm using isset to check it. Any ideas on how to solve this?
Post A Form To A Different Website?
Perhaps, not a PHP question but I have a <form> variable that I need to access on a different website. <script language="JavaScript"> <!-- document.write("<form method='post' name='samplesearch' action='http://<my-website>'>"); document.write("<input type='hidden' name='data' value='<?=$data;?>'>"); document.samplesearch.submit(); //--> </script> This works in IE but now FF. Why? Security concern? Should I use cURL instead?
Can't Read Form Variables After Reinstalling Apache
I reinstalled Apache (2.0.52) and added the appropriate lines to run php scripts to the bottom of the httpd.conf file. The scripts run fine (for example, 'print "Hello!"' yields "Hello!" rather than displaying all of the code (which would occur if the php script wasn't being processed by php.exe first). However, variables passed from a form are read as null/empty. Any idea why, and/or how I can fix this? I found it hard to believe that there would ever be a configuration setting for that kind of thing (since it's the 'meat and potatoes' of server-side web scripting), but I looked through the httpd.conf file extensively nonetheless and could find nothing that looked like it could be set to adjust for this. I'm having the same problem now when I install it on my Linux system as well.
Sending Form POST Data To SSL
I've seen posts on here before about this, but I could never figure it out. I even downloaded the code that was posted and tried to pick it apart to get it to do just what I need, but never succeeded. What what I understand it deals with using Sockets and sending the header information. Maybe that's where my lack of knowledge lies. For a regular post it should be sent to port 80, and for SSL 443 right? How do you go about forming the header of the data? I've never seen that kind of thing, and I'm guessing that's where I'm goofing up. I'm trying to set up a test: index.php posts data to test1.php and then displays the results. $var1 = 'test' then test1.php would do something very basic like drop it into a line of text. "This is a <? echo"$_POST['var1']";?> of the gotspy broadcast system." So I would assume if everything worked right, going to index.php should return: "This is a test of the gotspy broadcast system."?? Yes, no?
How To Post Form Data After Validation
I'm posting the contents of a html form (I have the html form on the same file as the php mail()) to itself in order to validate and then send an e-mail. However, I'd like it to post it to another php file after upon successful validation. Can someone tell me how to do this? Just a bit of background - the reason why I'd like to do this is because I have multiple contact us forms on a site, and for efficiency purposes, I'd like to have a single form mail script so that I don't have to keep editing the php.
How Can A Form Set To 'get' Return 'post'?
I have a form which the user fills out to enter some data. If there already exists an uncompleted session - say, the user started entering some data but had to stop to do something else - the user has the option of selecting that session from a drop-down menu (think <form><select><option>....</option></select></form>). The method for that particular form is set to 'GET' and the action is $_SERVER['PHP_SELF']. The <selecttag has a bit of javascript (onChange) which, when the session is chosen, triggers a 'submit' of the uncompleted session's session ID number. So the user selects the uncompleted session, the session ID is looked up, the data retrieved, and the page reloads and shows the data which they (or someone else) already entered, retrieved from a mySQL table (using the session ID) designated to temporarily store data from uncompleted sessions until it is ready to be written to the 'permanent' tables. At this point the user should update any information if so desired, then click on "Submit" at the bottom of the page to update the table and go on to the next page of the form. This causes the same page to reload, validation is run, and if it passes it again reloads the page only this time it sets a flag to write a <meta> redirect tag to the page. The page is reloaded but instantly redirected to the next page (I couldn't use "header()" because the headers are already written). The validation script is part of the same document. There is an IF statement at the head of the validation portion - if ($_SERVER['REQUEST_METHOD'] == 'POST'). This should, in theory, prevent the script from running a retrieved 'open session' through the validation, at the end of which if everything passes validation the data for that session is updated (or if it is a new session ,inserted). It should only be invoked if someone presses the "Submit" button at the bottom of the page, which is set to "POST". So in theory, the validation should only be run when "submit" is clicked by the user, not when an open session is selected and "submit" is sent by the 'onChange' javascript. What's going screwy is that the open session's request method is coming back as "POST" even though it is explicitly set as "GET". So when an open session is retrieved, the page reloads, the validation is run, everything checks out so the data is updated and the browser loads the next page, without the user getting the opportunity to update any of the retrieved open session's data. I hope I have explained this clearly. Can someone tell me why the first submit - the one for the drop-down menu of open sessions - is returning POST even though it is set to GET? This is screwing everything up and I can't figure a way around it.
Form Post To Text File
I have a form that posts to my php file which in turn writes to a text file. The way I'm doing is probably far from efficient or the right way, but it's the first thing i've ever written and I have to get it done. The way it writes now is it just puts all the form input next to each other in a text file. I want each field to be delimited or on new line so I can read it easily. Here's a snippet of my code: <?php> $filename = 'orders.txt' $fp = fopen($filename, "a"); $string4 = $_POST["email"]; $string5 = $_POST["street1"]; $string6 = $_POST["street2"]; $write = fputs($fp, $string4); $write = fputs($fp, $string5); $write = fputs($fp, $string6); fclose($fp);?>
Form Method Post Does Not Work, But GET Does
I have a form, if it uses method get, the variables gets passed. In the response page, when I print out the $_GET array, it prints out all the values passed in from the from. BUT, if I use the form method POST, the $_POST array is empty. I don't understand why it isn't working for $_POST. The register_globals variable is set to Off by the way. PHP Version 4.1.2 Red Hat Linux release 7.3
Odd Result From PDF Form Post Processing
I have a PDF form that contains a submit button with an associated action that causes the populated PDF file to be submitted to my web server, similar to POSTing an HTML form, but instead it happens via Acrobat, no HTML involved. Code:
POST Blanks Out Form Fields
I have a form that POSTs to itself and validates data entered into the form. If all is well the form performs a header location command to move to the next input form in the series. If the user has entered an error within the form the user is NOT redirected to the next page and error messages are displayed indicating the fields that are in error. So far so good. The only problem is that all the input fields are now blanked out after the post. These fields must display all the values that were inputted before the post was executed. I have tried the following to no avail...... reassigning values like this after the post => $zip=$_POST['zip']; reassigning values like this after the post => $fullname=$_SESSION['fullname']; Utilizing this Meta Tag => <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="CACHE"> How can I keep the data that was entered into the form fields before the post was executed?
How To Detect Which Link Was Used To POST A Form
Have a PHP script that reloads itself into one of two modes, depending on which text link you click on. Right now it's done using the GET method, by appending different variables to the URLs, but I'd like to convert it to POST if that's not too hard.
Values Not Displaying In Second Form After Post.
I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the second form when it is called. Both forms are .htm files that call themselves when the submit button is press via the following command in each form: <form method="post" action="<?php $server['PHP_SELF']?>"> The server is set to parse .htm files as php. Everything else is working fine and all the validation checks are working fine. Based on certain validation checks that are within the form php code, the user is either left on the input form page to correct errors or if there are no errors the user is passed to the next form via a Java call.... <script language="javascript"> <!-- location.replace("order2.htm"); --> </script> I have even put a session_write_close() before the redirect hoping this would fix the problem of not displaying the inputted values from the first form into the second form. The server value for global variables is set to ON. In the second form I have tried to display the values from the first form after the POST using the following three methods: $fullname; echo $HTTP_POST_VARS['fullname']; echo $_POST['fullname']; Nothing works...
POST Form To Dynamic Page Name
I've got a simple form with an HTML OPTION block. I'd like to POST the form to a page whose name is based on the OPTION they select. So for example say the user selected this option, I'd like to POST the form to a page named "memory.php". echo "<option value="memory">Memory Utilization</option>";
Submit Form Via Post To A New Window?
i want to submit $_POST vars to a new window. is that possible? I tried this and it didnt work... echo " <form name='form1' method='post' action="javascriptpen('blarblarblar.php')"> <input name='Submit' type='submit' value='submit'> <input type='text' name='postvar' value=??'> </form>"; in the new window, i cant get my postvar.
How Do I Send A Http POST Without Using A Form?
I looked at using curl library, but it's not available on the host where I'm building my application. I need to be able to send a POST to a payment gateway and receive their response back.
Using The GET And POST Form Methods Correctly
I have a form that I want customers to fill out and submit. Based on the answers to the questions, the results page will display dynamic results. My first instinct was to use the GET method, and append the answers to a URL, and have the results page look for the parameters. After doing some research, it appears that the POST method is cleaner and safer, however, it is not as intuitive for me. My question is this. When using the POST method, how do I get my results page to see the post value. I know how to configure the if statement to display the appropriate result, but I don't know how to get the result page to recognize and read the POST values.
Getting A Form To Post To A Specific Page
How do i get it so that a form can be submitted and have the information post directly to a page that i can specify without having to use a database. I just want a direct post that inserts the new information at the top of a page already created. Basically so every time the form is filled out a new piece of information is above the last.
Passing POST Information Without A Form
I have no clue if this is possible, and if it is, how to do it. Basically, I am creating a vote server system for my school, there is a central server with IIS, MySQL and PHP 5 on it, and I need to write all the pages that will get the information and display it, allowing the students to vote. I have the index page, which is nothing more than the login page, at least for now. When the student enters his / her student ID, the database checks if it exists by using this query: mysql_query('SELECT count(*) FROM `students` WHERE `snumber` = ''.$sid.'''); if the number is 1, the ID exists, if it is 0, it does not, simple. I will then transfer the person to vote.php, which will get the person's first and last name and display it at the top, then display all the vote information, and if they exist, poll questions as well. MY question is this, how would I go about transferring the person from index.php (where their student ID is validated) to vote.php where they will be allowed to vote, and also passing their student ID in a POST variable? I don't want to use vote.php to validate becuase I don't want the person to accidentally be able to vote without entering proper information. I also don't want to pass their student ID through GET for obvious reasons. IS there anything I can do?
How To Post A Form To A List Document
I'm not looking to learn alot of PHP right now but i am learning enough to get done what needs to be done. I need to no how to make a list document that gets and posted form from a different document and puts it into a list, . heres my form from my input.htm Code:
Sending POST Withought A Form
Im looking for a way to send data to a page as POST, but withought having to use a form. Eg GET is in the URL, but i want the URL to be withought all that data. Is it possible to send the POST this way, or isit only ann option with forms?
PHP Not Populating Form Variables Passed Through POST Or GET
I"m running: Windows Xp SP2 Apache2 PHP5 MySQL4 Everything seems fine and dandy, and I can do scripting on server side, but for some reason I cannot get data from a form to be put into a variable. I have a simple form in an html page which submits, and in the php script that handles the input, none of the data in the form is going into the variables. My php.ini file does have all the GPC's in place(ie variable_order, the way they get processed).
Form To Insert Mysql Row *and* POST Data
I'm reasonably new to PHP and after searching all over the place can't find anything useful I need to insert some variables into a mysql row and then POST variables to another web page using the same form The page i'm posting to is an SSL (bank hosted)ecommerce transaction page which I have no powers to change I don't have any problems inserting just mysql rows or making html forms to post separately, I just don't know where to start to get the one form to do both.
Remove Some HTML Tags When Post A Form
A user writes an article using WYSIWYG HTML based editor and submit it to script.php(<form method="post" action="script.php">). I only want to keep the HTML tags which are in my allowance list and remove other tags from the post string. For example, here is the allowance list of tags: <b>,<strong>,<p>, <ul>,<ol>,<li>, <a> Before submission:
GET / POST Conflict In A Multi-page Form.
Wonder if anyone can help with this problem: I am using an app with several pages, using a session to track vars between the pages, and using an image map to re-direct back and forwards between the pages. The way I redirect is when the image map is clicked on, it posts to a page called 'control.php' which passes the POST vars to the corresponding SESSION variables, then redirects to another page, based upon the co-ords of where the image map was clicked upon. I have added text links at the bottom of the page: i.e. <--- previous page ----> next page but because the image map POSTs the data to 'control.php', I can't really add a GET query string to the link at the bottom of the page, because nothing will be POSTed. ....But then again, I can't add a POST link to the HREF, because it won't pass the co-ords, and I can't add a special variable to identify the link to the control form -i.e. control.php?link=3 (as I could with a GET) and re-direct accordingly. So, after hours of thinking about this, I'm stumped. The only idea I have is to hack the image map up into smaller pieces, add ALT tags to each one, and make do with it - or add NEXT and PREVIOUS submit images at the bottom of the page too. If I make do one with large image map, it is no use to someone who is visually impaired and relies on ALT wordings. Is there any possible way to achieve what I am trying to do ?
|