Re: [PHP] Form Post to different domain

2012-02-16 Thread Tedd Sperling
On Feb 14, 2012, at 1:39 PM, Daniel Brown wrote:

 On Tue, Feb 14, 2012 at 13:36, Rick Dwyer rpdw...@earthlink.net wrote:
 
 I only have access to domain B... the one receiving the Form POST.
 
Then all you should need to do is:
 
a.) Verify that Domain A is indeed pointing to Domain B, to
 the script you expect, as a POST request.
b.) In the POST-receiving script on Domain B, try this simple snippet:
 
 ?php
 echo 'pre'.PHP_EOL;
 var_dump($_POST);
 die('/pre');
 ?
 
That should give you all data from the post request.
 
 -- 
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

Why the '.PHP_EOL' ?

I've never seen that before and looking through the PHP documentation doesn't 
give me much.

Cheers,

tedd


_
t...@sperling.com
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-16 Thread Daniel Brown
On Thu, Feb 16, 2012 at 09:53, Tedd Sperling tedd.sperl...@gmail.com wrote:

 Why the '.PHP_EOL' ?

 I've never seen that before and looking through the PHP documentation doesn't 
 give me much.

Cross-compatibility.  For systems which use \n, PHP_EOL will be
\n.  For systems which use \r\n, PHP_EOL will be \r\n.  And, for
oddball or legacy systems which still use \r you get the point.

This means you can rest assured that the newlines will be
appropriate for the system on which PHP is running.  While it makes
little difference on the web, it makes a world of difference at the
CLI and when writing to plain-text files (including CSV).  I've been
using it out of the force of habit for about seven years or so, and
exclusively (with the exception of email headers and other warranted
cases) for the last four.

There are a lot of other very useful and yet very underused
constants.  You can find the info on them here:

http://php.net/reserved.constants

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-16 Thread Matijn Woudt
On Thu, Feb 16, 2012 at 4:09 PM, Daniel Brown danbr...@php.net wrote:
 On Thu, Feb 16, 2012 at 09:53, Tedd Sperling tedd.sperl...@gmail.com wrote:

    This means you can rest assured that the newlines will be
 appropriate for the system on which PHP is running.  While it makes
 little difference on the web, it makes a world of difference at the
 CLI and when writing to plain-text files (including CSV).  I've been
 using it out of the force of habit for about seven years or so, and
 exclusively (with the exception of email headers and other warranted
 cases) for the last four.


What if the system PHP is running on not the same one as the one that
is going to read the plain-text/CSV/.. files? I don't think it is good
practice to use it when writing to files. I often write files on a
Linux server that people are going to read on a Windows PC.

Apart from that, most software written in the last 5-10 years will
happily read files with either \n or \r\n line endings. I'm not really
sure about Win XP for example, but if it would have a problem with the
Linux \n endings, it might even be better to *always*  use \r\n line
endings (except where standards require it), as I haven't seen a
single Linux application since I started using it (about 9 years ago)
that was not able to read a file with \r\n based line endings.

Even better, go Unicode. Unicode specifies that there are 8 ways to
make a new line, and they should all be accepted. However, the pretty
uncommon NEL, LS and PS are not supported in many applications.
(though CR, LF and CRLF are).

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-16 Thread Daniel Brown
On Thu, Feb 16, 2012 at 10:57, Matijn Woudt tijn...@gmail.com wrote:

 What if the system PHP is running on not the same one as the one that
 is going to read the plain-text/CSV/.. files? I don't think it is good
 practice to use it when writing to files. I often write files on a
 Linux server that people are going to read on a Windows PC.

Then what is the difference between PHP_EOL and forcing \n?  It's
still going to use POSIX-style EOLs, but now you've taken away the
benefit of the compatibility.

 Apart from that, most software written in the last 5-10 years will
 happily read files with either \n or \r\n line endings. I'm not really
 sure about Win XP for example, but if it would have a problem with the
 Linux \n endings, it might even be better to *always*  use \r\n line
 endings (except where standards require it), as I haven't seen a
 single Linux application since I started using it (about 9 years ago)
 that was not able to read a file with \r\n based line endings.

You may want to check again.  Ever see ^M at the end of your
lines?  Or, in vim, notice how it says it's a DOS file?

 Even better, go Unicode. Unicode specifies that there are 8 ways to
 make a new line, and they should all be accepted. However, the pretty
 uncommon NEL, LS and PS are not supported in many applications.
 (though CR, LF and CRLF are).

Nothing you've suggested is necessarily bad, but more to the
point, it doesn't come close to invalidating the benefit of PHP_EOL.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-16 Thread Matijn Woudt
On Thu, Feb 16, 2012 at 5:02 PM, Daniel Brown danbr...@php.net wrote:
 On Thu, Feb 16, 2012 at 10:57, Matijn Woudt tijn...@gmail.com wrote:

 What if the system PHP is running on not the same one as the one that
 is going to read the plain-text/CSV/.. files? I don't think it is good
 practice to use it when writing to files. I often write files on a
 Linux server that people are going to read on a Windows PC.

    Then what is the difference between PHP_EOL and forcing \n?  It's
 still going to use POSIX-style EOLs, but now you've taken away the
 benefit of the compatibility.

I'm not saying you should force \n then, but you might want to decide
what to force depending on who will be using it, so in case a windows
user is going to read it, then you set \r\n, otherwise you select
\n.You could even try to detect that based on a browser identification
string.


 Apart from that, most software written in the last 5-10 years will
 happily read files with either \n or \r\n line endings. I'm not really
 sure about Win XP for example, but if it would have a problem with the
 Linux \n endings, it might even be better to *always*  use \r\n line
 endings (except where standards require it), as I haven't seen a
 single Linux application since I started using it (about 9 years ago)
 that was not able to read a file with \r\n based line endings.

    You may want to check again.  Ever see ^M at the end of your
 lines?  Or, in vim, notice how it says it's a DOS file?

I have seen them, but only in files which had mixed line endings,
which should of course never be used. Vim does indeed notice it's a
'dos' file, but it's merely detecting that the file has \r\n line
endings and that it should add those too. I don't consider that bad.


 Even better, go Unicode. Unicode specifies that there are 8 ways to
 make a new line, and they should all be accepted. However, the pretty
 uncommon NEL, LS and PS are not supported in many applications.
 (though CR, LF and CRLF are).

    Nothing you've suggested is necessarily bad, but more to the
 point, it doesn't come close to invalidating the benefit of PHP_EOL.

I'm not saying using PHP_EOL is bad, but I disagree with using it
always as a habit. If line endings matter, then you need to make
decisions based on that, and don't depend on it being automatically OK
if PHP_EOL is used.

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Form Post to different domain

2012-02-14 Thread Rick Dwyer

Hello all.

If I have a form on domain A that uses POST to submit data and I want  
to submit the form to domain B on an entirely different server, how do  
I pull the form values (... echo $_POST[myval] returns nothing)  
from the form at domain B?



 --Rick



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-14 Thread Daniel Brown
On Tue, Feb 14, 2012 at 13:14, Rick Dwyer rpdw...@earthlink.net wrote:
 Hello all.

 If I have a form on domain A that uses POST to submit data and I want to
 submit the form to domain B on an entirely different server, how do I pull
 the form values (... echo $_POST[myval] returns nothing) from the form
 at domain B?

First (basic, obvious) question: do you have full access to both
domains, or is Domain B a third-party site?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-14 Thread Rick Dwyer

On Feb 14, 2012, at 1:16 PM, Daniel Brown wrote:

On Tue, Feb 14, 2012 at 13:14, Rick Dwyer rpdw...@earthlink.net  
wrote:

Hello all.

If I have a form on domain A that uses POST to submit data and I  
want to
submit the form to domain B on an entirely different server, how do  
I pull
the form values (... echo $_POST[myval] returns nothing) from  
the form

at domain B?


   First (basic, obvious) question: do you have full access to both
domains, or is Domain B a third-party site?



I only have access to domain B... the one receiving the Form POST.

--Rick


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-14 Thread Daniel Brown
On Tue, Feb 14, 2012 at 13:36, Rick Dwyer rpdw...@earthlink.net wrote:

 I only have access to domain B... the one receiving the Form POST.

Then all you should need to do is:

a.) Verify that Domain A is indeed pointing to Domain B, to
the script you expect, as a POST request.
b.) In the POST-receiving script on Domain B, try this simple snippet:

?php
echo 'pre'.PHP_EOL;
var_dump($_POST);
die('/pre');
?

That should give you all data from the post request.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form Post to different domain

2012-02-14 Thread Rick Dwyer

Thanks Dan.

As it turned out the reason for not showing the passed values is that  
I didn't have www in the destination address and the values must  
have been getting lost when Apache redirected requests without www to  
the fully formed URL.



 --Rick


On Feb 14, 2012, at 1:39 PM, Daniel Brown wrote:

On Tue, Feb 14, 2012 at 13:36, Rick Dwyer rpdw...@earthlink.net  
wrote:


I only have access to domain B... the one receiving the Form POST.


   Then all you should need to do is:

   a.) Verify that Domain A is indeed pointing to Domain B, to
the script you expect, as a POST request.
   b.) In the POST-receiving script on Domain B, try this simple  
snippet:


?php
echo 'pre'.PHP_EOL;
var_dump($_POST);
die('/pre');
?

   That should give you all data from the post request.

--
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] form post question

2010-10-28 Thread Jack
I have a form which has the following: ( quick clip )

 

  form id=form1 name=form1 method=post
action=http://www.abc.com/processing/process_form.php; onSubmit=return
preSubmit();

 

 label

input name=area_interest type=checkbox id=field13
value=Peer Guide /

Peer Guide/label

  br /

  label

input type=submit value=Submit /

 

When the form runs process_form.php it emails the content and has several
other fields from the form, but I have some fields like the one above that
don't show up in the result.  The script that builds the message looks like
the below

 

$temp_message .= Area(s) of Interest: .
$_POST['area_interest'] .\n;

 

Is there anything obvious that I am missing?

 

Is there a way for me to show all the fields from the form, and their field
names which are received by process_form?

 

 

Thanks!

Jack

 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] form post question

2010-10-28 Thread Bastien Koert
On Thu, Oct 28, 2010 at 10:12 AM, Jack jacklistm...@gmail.com wrote:
 I have a form which has the following: ( quick clip )



  form id=form1 name=form1 method=post
 action=http://www.abc.com/processing/process_form.php; onSubmit=return
 preSubmit();



     label

                input name=area_interest type=checkbox id=field13
 value=Peer Guide /

                Peer Guide/label

              br /

              label

 input type=submit value=Submit /



 When the form runs process_form.php it emails the content and has several
 other fields from the form, but I have some fields like the one above that
 don't show up in the result.  The script that builds the message looks like
 the below



 $temp_message .= Area(s) of Interest: .
 $_POST['area_interest'] .\n;



 Is there anything obvious that I am missing?



 Is there a way for me to show all the fields from the form, and their field
 names which are received by process_form?





 Thanks!

 Jack





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



Check boxes (assuming you have more than one in the set) are generally
coming in as an array. You can see this by running this

echo pre;
print_r($_POST);
echo /pre;

to see the entire post array

-- 

Bastien

Cat, the other other white meat

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] form post question

2010-10-28 Thread Floyd Resler

On Oct 28, 2010, at 10:12 AM, Jack wrote:

 I have a form which has the following: ( quick clip )
 
 
 
  form id=form1 name=form1 method=post
 action=http://www.abc.com/processing/process_form.php; onSubmit=return
 preSubmit();
 
 
 
 label
 
input name=area_interest type=checkbox id=field13
 value=Peer Guide /
 
Peer Guide/label
 
  br /
 
  label
 
 input type=submit value=Submit /
 
 
 
 When the form runs process_form.php it emails the content and has several
 other fields from the form, but I have some fields like the one above that
 don't show up in the result.  The script that builds the message looks like
 the below
 
 
 
 $temp_message .= Area(s) of Interest: .
 $_POST['area_interest'] .\n;
 
 
 
 Is there anything obvious that I am missing?
 
 
 
 Is there a way for me to show all the fields from the form, and their field
 names which are received by process_form?
 
 
 
 
 
 Thanks!
 
 Jack

If it's a single checkbox and it's not not checked, nothing will come through.  
However, if it is a series of checkbox with the same name then you will need to 
do this:
input name=area_interest[] type=checkbox id=field13 value=Peer Guide /

Notice I changed area_interest to area_interest[].  This way any checkboxes 
that are checked will be passed as an array.

Take care,
Floyd


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] form post question

2010-10-28 Thread Kevin Kinsey

Bastien Koert wrote:

On Thu, Oct 28, 2010 at 10:12 AM, Jack jacklistm...@gmail.com wrote:

I have a form which has the following: ( quick clip )

 form id=form1 name=form1 method=post
action=http://www.abc.com/processing/process_form.php; onSubmit=return
preSubmit();

label
   input name=area_interest type=checkbox id=field13
value=Peer Guide /
   Peer Guide/label
 br /
 label
input type=submit value=Submit /

When the form runs process_form.php it emails the content and has several
other fields from the form, but I have some fields like the one above that
don't show up in the result.  The script that builds the message looks like
the below

$temp_message .= Area(s) of Interest: .
$_POST['area_interest'] .\n;

Is there anything obvious that I am missing?

Is there a way for me to show all the fields from the form, and their field
names which are received by process_form?

Thanks!
Jack



Check boxes (assuming you have more than one in the set) are generally
coming in as an array. You can see this by running this

echo pre;
print_r($_POST);
echo /pre;

to see the entire post array


+1 for Bastien; print_r() and var_dump() are the keys to debugging.
See http://www.phpbuilder.com/board/showthread.php?s=threadid=10240608
for a decent overview of same.

And I guess you could reinvent the wheel, or actually process your
POSTed data, with foreach():

// Roll your own print_r()
   foreach ($_POST as $p = $q) {
  echo $p. -.$q. br /;
   }

// Or do_something_useful()
   foreach ($_POST as $p = $q) {
  do_something_useful($p,$q);
   }


HTH,
KDK

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP form POST question

2005-01-09 Thread James \(IFMS\)
I just narrowed something down about forms and POST and would like 
education. In the following scenarios, all work except #4. $_POST is 
null. Why is that?

Setup:
1) Running on localhost
2) /foo/index.php has the following:
   ? var_dump($_POST); var_dump($_GET); ?
3) /index.php contends vary per scenario (below)
Running RHEL 3, all updates (PHP 4.3.2).
SCENARIO 1:
/index.php contains the following:
form method=get action=/foo/index.php
input name=foobutton type=submit
/form
In this case in /foo/index.php $_GET has the right value, i.e.
array('foobutton' = '');
SCENARIO 2:
/index.php contains the following:
form method=get action=/foo
input name=foobutton type=submit
/form
In this case in /foo/index.php $_GET has the right value, i.e.
array('foobutton' = '');
SCENARIO 3:
/index.php contains the following:
form method=post action=/foo/index.php
input name=foobutton type=submit
/form
In this case in /foo/index.php $_POST has the right value, i.e.
array('foobutton' = '');
SCENARIO 4:
/index.php contains the following:
form method=post action=/foo
input name=foobutton type=submit
/form
In this case in /foo/index.php $_POST is NULL.
HUH? Why is $_POST empty? Is Apache doing something to kill the form's 
post information when it has to resolve /foo to /foo/index.php?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP form POST question

2005-01-09 Thread Leon Poon
When you access /foo, the server will redirect the client to /foo/ (because 
it is a directory). At the redirected page, the post data will not be sent 
again by the browser thus there are no _POST values.

Try using action=/foo/. That may work.

- Original Message - 
From: James (IFMS) [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Monday, January 10, 2005 10:04 AM
Subject: [PHP] PHP form POST question


I just narrowed something down about forms and POST and would like 
education. In the following scenarios, all work except #4. $_POST is null. 
Why is that?

Setup:
1) Running on localhost
2) /foo/index.php has the following:
   ? var_dump($_POST); var_dump($_GET); ?
3) /index.php contends vary per scenario (below)
Running RHEL 3, all updates (PHP 4.3.2).
SCENARIO 1:
/index.php contains the following:
form method=get action=/foo/index.php
input name=foobutton type=submit
/form
In this case in /foo/index.php $_GET has the right value, i.e.
array('foobutton' = '');
SCENARIO 2:
/index.php contains the following:
form method=get action=/foo
input name=foobutton type=submit
/form
In this case in /foo/index.php $_GET has the right value, i.e.
array('foobutton' = '');
SCENARIO 3:
/index.php contains the following:
form method=post action=/foo/index.php
input name=foobutton type=submit
/form
In this case in /foo/index.php $_POST has the right value, i.e.
array('foobutton' = '');
SCENARIO 4:
/index.php contains the following:
form method=post action=/foo
input name=foobutton type=submit
/form
In this case in /foo/index.php $_POST is NULL.
HUH? Why is $_POST empty? Is Apache doing something to kill the form's 
post information when it has to resolve /foo to /foo/index.php?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP form POST question

2005-01-09 Thread Tom Rogers
Hi,

Monday, January 10, 2005, 12:04:28 PM, you wrote:
JI I just narrowed something down about forms and POST and would like 
JI education. In the following scenarios, all work except #4. $_POST is 
JI null. Why is that?

JI Setup:
JI 1) Running on localhost
JI 2) /foo/index.php has the following:
JI ? var_dump($_POST); var_dump($_GET); ?
JI 3) /index.php contends vary per scenario (below)

JI Running RHEL 3, all updates (PHP 4.3.2).

JI SCENARIO 1:
JI /index.php contains the following:

JI form method=get action=/foo/index.php
JI input name=foobutton type=submit
JI /form

JI In this case in /foo/index.php $_GET has the right value, i.e.
array('foobutton' = '');

JI SCENARIO 2:
JI /index.php contains the following:

JI form method=get action=/foo
JI input name=foobutton type=submit
JI /form

JI In this case in /foo/index.php $_GET has the right value, i.e.
array('foobutton' = '');

JI SCENARIO 3:
JI /index.php contains the following:

JI form method=post action=/foo/index.php
JI input name=foobutton type=submit
JI /form

JI In this case in /foo/index.php $_POST has the right value, i.e.
array('foobutton' = '');

JI SCENARIO 4:
JI /index.php contains the following:

JI form method=post action=/foo
JI input name=foobutton type=submit
JI /form

JI In this case in /foo/index.php $_POST is NULL.

JI HUH? Why is $_POST empty? Is Apache doing something to kill the form's 
JI post information when it has to resolve /foo to /foo/index.php?


If you do a post to just the domain name apache does a redirect to 
/foo/index.php
losing the post info.

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP form POST question

2005-01-09 Thread James \(IFMS\)
When you access /foo, the server will redirect the client to /foo/ 
(because it is a directory). At the redirected page, the post data will 
not be sent again by the browser thus there are no _POST values.

Try using action=/foo/. That may work.
Yes, /foo/ does work.
The explanation makes sense.
Bugger! All that time spent banging my head against the wall. :-)
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] form POST file upload mystery

2003-03-05 Thread Adam Voigt




Well first, if your running a linux/unix server, did you create

a /temp, because on most server's, it's /tmp (no e).



On Tue, 2003-03-04 at 16:20, Mike D wrote:

Hello,



I have the weirdest thing going on...I have an image upload field that 

has been working fine for months and months, and as of yesterday now 

every file that is uploaded has a size of 0!

After testing, I noticed only 1 mime type that didn't have a size of 0 

and it was 'application/x-macbinary' or something like that...



I have checked the server to make sure it is not a diskspace issue, 

have checked the php ini file to make any settings were changed, have 

all the correct form tags...



Any ideas??? I'm pulling my hair out here.



Here's what's coming up in the $_FILES array arfter submitting...



Array

(

 [userfile] = Array

 (

 [name] = linker2_0_4.tar

 [type] = application/x-tar

 [tmp_name] = /temp/phpFSoKmc

 [size] = 0

 )



)



  thanks

Mike D




-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP] form post

2002-06-12 Thread Kris Vose

Is there a way to post input types that are hidden  with out using a html form in 
php?  I know you can do it in java script with Form.submit().  

So... if I have three hidden fields can I post them without pressing a button that 
uses a form by using a php function?

Thanks in advance.

Kris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] form post

2002-06-12 Thread Lazor, Ed

No, because PHP is server-side.

-Original Message-
From: Kris Vose [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 11:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] form post


Is there a way to post input types that are hidden  with out using a html
form in php?  I know you can do it in java script with Form.submit().  

So... if I have three hidden fields can I post them without pressing a
button that uses a form by using a php function?

Thanks in advance.

Kris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] form post

2002-06-12 Thread Chris Boget

 There's no way to for PHP to say Yo, let's ride... submit that form
 Client-side manipulations must be done client-side, with
 javascript or something similar.

But you can use a function/library called PostToHost() (or something 
like that).  Search on phpbuilder.com for it.  This issue has come up
several times on the list.

Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Form POST

2002-03-24 Thread Kevin Maynard

Maybe someone can shed some light on this.  I have a form to handle a file
upload, but through the same form I would like to gather data as well.  For
example, ID, Price  Picture.

Now I set up my form to handle the file upload, and that all works great,
but I can't seem to access the other variables.  Can I use for form to
collect data and files?

My code is as follows:

File 1

form name=Update enctype=multipart/form-data action=Update2.php
method=POST
input type=hidden name=MAX_FILE_SIZE value=100
center
 table border=0 cellpadding=0 cellspacing=0 width=100%
  tr
   td width=100% colspan=4 nowrap
table border=0 cellpadding=0 cellspacing=4 width=100%
 tr
  td width=205 rowspan=7 valign=middle
   bInput Picture Here:/bbr
INPUT TYPE=FILE NAME=userfile SIZE=35
  /td
  td width=* valign=middle
   bPrice:/bbr
INPUT TYPE=TEXT NAME=Price SIZE=10
  /td
...

File #2

global $HTTP_POST_FILES;

//Update Listing   

$Price = $HTTP_POST_VARS['Price'];

if(!empty($HTTP_POST_FILES['userfile']['tmp_name'])) {
$filename = $HTTP_POST_FILES['userfile']['tmp_name'];
$newname = /images/.$ID._01.jpg;
copy($HTTP_POST_FILES['userfile']['tmp_name'],$newname);
}

...

Now whether I use the $Price alone or $HTTP_POST_VARS['Price'] I get
nothing.

Thanks,

Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Form POST

2002-03-24 Thread Jason Wong

On Monday 25 March 2002 12:47, Kevin Maynard wrote:
 Maybe someone can shed some light on this.  I have a form to handle a file
 upload, but through the same form I would like to gather data as well.  For
 example, ID, Price  Picture.

 Now I set up my form to handle the file upload, and that all works great,
 but I can't seem to access the other variables.  Can I use for form to
 collect data and files?


[snip]

 Now whether I use the $Price alone or $HTTP_POST_VARS['Price'] I get
 nothing.

If you're using php  4.0.6 then use $_POST[] instead of $HTTP_POST_VARS[].


 
-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Hello, he lied.
-- Don Carpenter, quoting a Hollywood agent
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Form POST problem with Netscape 6

2001-08-09 Thread Peter Fekkes

Hi,

I use a few forms on my websites, one of them is to log in onto the site.

These sites all work well in MSIE and Netscape 3 and 4.7 BUT in Netscap 6 
(6.0, 6.01 and 6.1) there is a strange effect: The result page starts 
loading but the loading is broken before the end of the page. The php 
scrips are completed (results are in the database, emails are send out 
etc.) and the page is generated but simply doesn't tranfer completely.

For one form, the transfer always breaks at the same point, which is a 
fferent point for different forms.
I cannot look into the transmitted source because netscape does a reload on 
view source which is not performed for dynamic pages

Anyone seen this before? Does anyone have a qlue where to look for?
(It looks to me like a header problem, but I have no idea what kind of 
header problem..)

Thanks in advance!

Peter.



Re: [PHP] form post without pathinfo

2001-03-18 Thread Clayton Dukes

Yeah,
I just can't figure out how to do it.
Anyone care to enlighten me?
Clayton Dukes

- Original Message - 

From: Chris Anderson 
To: Clayton Dukes 
Sent: Wednesday, March 14, 2001 1:04 PM
Subject: Re: [PHP] form post without pathinfo


Sounds like you just need to use $PHP_Self with your other variables after it, 
that way it gets the right settings
ex:
echo $PHP_SELF$color$etc
  - Original Message - 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, March 17, 2001 4:57 PM
  Subject: [PHP] form post without pathinfo


  Hi :-)

  How can I convert from this:
  form method=POST action="? echo $PHP_SELF; ?/approve"
  /form
  ...snip
  } elseif ($pathinfo == "/approve") {
  do something...


  to something that posts to itself without altering the path?
  My problem is, I'm using themes which are dependent on the path, so if I post 
using the method above, the path changes and screws up the images, colors, etc after 
the user submits.

  TIA!

  Clayton Dukes



--


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] form post without pathinfo

2001-03-17 Thread Clayton Dukes



Hi :-)

How can I convert from this:
form method=POST action="? echo $PHP_SELF; 
?/approve"
/form
...snip
} elseif ($pathinfo == "/approve") {
do something...


to something that posts to itself without altering 
the path?
My problem is, I'm using themes which are dependent 
on the path, so if I post using the method above, the path changes and screws up 
the images, colors, etc after the user submits.

TIA!

Clayton Dukes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]