php-windows Digest 30 Sep 2003 06:17:09 -0000 Issue 1933
Topics (messages 21608 through 21622):
Re: form vars missing...
21608 by: Gerardo Rojas
21609 by: Jas
21610 by: Gerardo Rojas
21611 by: Jas
21614 by: Svensson, B.A.T. (HKG)
21615 by: Duane Lakoduk
21616 by: Jas
21617 by: Svensson, B.A.T. (HKG)
21618 by: Duane Lakoduk
php 4.3.3 on apache 2.0.47
21612 by: manon
21613 by: Gerardo Rojas
PHP Web Services
21619 by: Pearson, Gregory
21620 by: Charles P. Killmer
Connect to a FTP server in a IFRAME
21621 by: Dean Hayes
imagecreate () query
21622 by: George Pitcher
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I believe you need to add the value="your value goes here" in the form.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] form vars missing...
Here is my problem:
Using both the Get and Post methods my variables are missing on the
resulting page. Example of code is listed below:
<form method="post" url="result.php" name="form">
<input type="text" name="name"><br>
<input type="text" name="url"><br>
<input type="submit" value="send">
<?php
if ((!$name) || (!url)) {
do nothing;
} elseif (($name) || ($url)) {
do rest of code;
} else {
broken; }
Should be simple and every time I have done this in a *nix environment it
has worked but this time I have installed php on my IIS 5 server and check
the scripting permissions and everything looks ok, except my variables are
not being passed or recognized in the resulting script using post. Using
the Get method my variables are listed in the URL of resulting page but the
script isn't picking them up.
Anyone else have troubles with this?
Any help is appreciated,
Jas
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You know I have tried that as well... ex.
<input type="text" name="fname" value="fname">
And I have tried adding a hidden form element as well... ex.
<input type="text" name="fname" value="fname">
<input type="hidden" name="fname" value="fname">
All to no avail, I am thinking IIS is my problem but I am going to try it in
a *nix environment just to be certain.
jas
"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I believe you need to add the value="your value goes here" in the form.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] form vars missing...
Here is my problem:
Using both the Get and Post methods my variables are missing on the
resulting page. Example of code is listed below:
<form method="post" url="result.php" name="form">
<input type="text" name="name"><br>
<input type="text" name="url"><br>
<input type="submit" value="send">
<?php
if ((!$name) || (!url)) {
do nothing;
} elseif (($name) || ($url)) {
do rest of code;
} else {
broken; }
Should be simple and every time I have done this in a *nix environment it
has worked but this time I have installed php on my IIS 5 server and check
the scripting permissions and everything looks ok, except my variables are
not being passed or recognized in the resulting script using post. Using
the Get method my variables are listed in the URL of resulting page but the
script isn't picking them up.
Anyone else have troubles with this?
Any help is appreciated,
Jas
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
you also need reference the values as such
$_POST['fname']
in the action script.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] form vars missing...
You know I have tried that as well... ex.
<input type="text" name="fname" value="fname">
And I have tried adding a hidden form element as well... ex.
<input type="text" name="fname" value="fname">
<input type="hidden" name="fname" value="fname">
All to no avail, I am thinking IIS is my problem but I am going to try it in
a *nix environment just to be certain.
jas
"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I believe you need to add the value="your value goes here" in the form.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] form vars missing...
Here is my problem:
Using both the Get and Post methods my variables are missing on the
resulting page. Example of code is listed below:
<form method="post" url="result.php" name="form">
<input type="text" name="name"><br>
<input type="text" name="url"><br>
<input type="submit" value="send">
<?php
if ((!$name) || (!url)) {
do nothing;
} elseif (($name) || ($url)) {
do rest of code;
} else {
broken; }
Should be simple and every time I have done this in a *nix environment it
has worked but this time I have installed php on my IIS 5 server and check
the scripting permissions and everything looks ok, except my variables are
not being passed or recognized in the resulting script using post. Using
the Get method my variables are listed in the URL of resulting page but the
script isn't picking them up.
Anyone else have troubles with this?
Any help is appreciated,
Jas
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
so prior to php 4 it was (!$var_name) and from php 4 on it is
(!$_post['var_name'] ?
jas
"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
you also need reference the values as such
$_POST['fname']
in the action script.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] form vars missing...
You know I have tried that as well... ex.
<input type="text" name="fname" value="fname">
And I have tried adding a hidden form element as well... ex.
<input type="text" name="fname" value="fname">
<input type="hidden" name="fname" value="fname">
All to no avail, I am thinking IIS is my problem but I am going to try it in
a *nix environment just to be certain.
jas
"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I believe you need to add the value="your value goes here" in the form.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] form vars missing...
Here is my problem:
Using both the Get and Post methods my variables are missing on the
resulting page. Example of code is listed below:
<form method="post" url="result.php" name="form">
<input type="text" name="name"><br>
<input type="text" name="url"><br>
<input type="submit" value="send">
<?php
if ((!$name) || (!url)) {
do nothing;
} elseif (($name) || ($url)) {
do rest of code;
} else {
broken; }
Should be simple and every time I have done this in a *nix environment it
has worked but this time I have installed php on my IIS 5 server and check
the scripting permissions and everything looks ok, except my variables are
not being passed or recognized in the resulting script using post. Using
the Get method my variables are listed in the URL of resulting page but the
script isn't picking them up.
Anyone else have troubles with this?
Any help is appreciated,
Jas
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
One doesn't need the VALUE when the INPUT is of type TEXT. Sematic
of VALUE is in this case defined as "defualt text to display in
edit box". If left out, it displays a null string, e.g. an empty
field.
On your specific problem I have no suggestions though....
-----Original Message-----
From: Jas
To: [EMAIL PROTECTED]
Sent: 29/09/2003 18:08
Subject: Re: [PHP-WIN] form vars missing...
You know I have tried that as well... ex.
<input type="text" name="fname" value="fname">
And I have tried adding a hidden form element as well... ex.
<input type="text" name="fname" value="fname">
<input type="hidden" name="fname" value="fname">
All to no avail, I am thinking IIS is my problem but I am going to try
it in
a *nix environment just to be certain.
jas
"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I believe you need to add the value="your value goes here" in the form.
-----Original Message-----
From: Jas [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] form vars missing...
Here is my problem:
Using both the Get and Post methods my variables are missing on the
resulting page. Example of code is listed below:
<form method="post" url="result.php" name="form">
<input type="text" name="name"><br>
<input type="text" name="url"><br>
<input type="submit" value="send">
<?php
if ((!$name) || (!url)) {
do nothing;
} elseif (($name) || ($url)) {
do rest of code;
} else {
broken; }
Should be simple and every time I have done this in a *nix environment
it
has worked but this time I have installed php on my IIS 5 server and
check
the scripting permissions and everything looks ok, except my variables
are
not being passed or recognized in the resulting script using post.
Using
the Get method my variables are listed in the URL of resulting page but
the
script isn't picking them up.
Anyone else have troubles with this?
Any help is appreciated,
Jas
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Jas
>
> Here is my problem:
>
> Using both the Get and Post methods my variables are missing on the
> resulting page. Example of code is listed below:
>
> <form method="post" url="result.php" name="form">
> <input type="text" name="name"><br>
> <input type="text" name="url"><br>
> <input type="submit" value="send">
>
> <?php
> if ((!$name) || (!url)) {
> do nothing;
> } elseif (($name) || ($url)) {
> do rest of code;
> } else {
> broken; }
I see a couple problems here,
1. When was the "url" attribute of the form element introduced?
That should be action="result.php"
2. As others indicated: you aren't giving any value to your text inputs.
What are you expecting to see, even if the < url="action.php" worked?
--- End Message ---
--- Begin Message ---
Sorry yeah i noticed the form element was using the wrong syntax on this
page but I didn't copy/paste into the newsgroup.
The results of the form for the 'url' field would be whatever the user
decided to type into the particular field (ex. http://www.somewebsite.com)
and the resulting page just checks to make sure the vars 'url' and 'name'
are present before continuing. Really a simple thing but for some reason
mine is not working correctly and being at work and not next to the server
doesn't help me being able to test your solutions until later tonight.
jas
"Duane Lakoduk" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jas
>
> >
> > Here is my problem:
> >
> > Using both the Get and Post methods my variables are missing on the
> > resulting page. Example of code is listed below:
> >
> > <form method="post" url="result.php" name="form">
> > <input type="text" name="name"><br>
> > <input type="text" name="url"><br>
> > <input type="submit" value="send">
> >
> > <?php
> > if ((!$name) || (!url)) {
> > do nothing;
> > } elseif (($name) || ($url)) {
> > do rest of code;
> > } else {
> > broken; }
>
>
> I see a couple problems here,
> 1. When was the "url" attribute of the form element introduced?
> That should be action="result.php"
>
> 2. As others indicated: you aren't giving any value to your text inputs.
> What are you expecting to see, even if the < url="action.php" worked?
--- End Message ---
--- Begin Message ---
> 2. As others indicated: you aren't giving any value to your text inputs.
That should not effect the functionality. The VALUE tag is only required for
radio buttons and check boxes . Point 1) is on target, fix that and it
should work.
For reference see:
http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html#edef-INPUT
and
http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html#adef-value
-INPUT
--- End Message ---
--- Begin Message ---
>
> That should not effect the functionality. The VALUE tag is
> only required for
> radio buttons and check boxes .
You are correct.
I tested this on my IIS 4.0 server with PHP 4.3.3RC2.
The reason for no values is most likely due to bad syntax in action.php
No errors are reported but syntax errors prohibit display of values.
This works:
<?php
if((!$_POST['name']) || (!$_POST['url'])){
print("at least one value not passed");
}else{
print("Name = " . $_POST['name'] . "<br>");
print("URL = " . $_POST['name'] . "<br>");
}
?>
--- End Message ---
--- Begin Message ---
apache 2.0.47
php 4.3.3
win XP Pro
With the above combination most of the scripts I have don't work under
Apache, however they do running Omni HTTPd.
With Apache for example remote includes fail:
Warning: failed to open stream: Bad file descriptor
Failed opening 'http://somedomain.com/test.htm' for inclusion
(include_path='.;c:\php4\pear')
Line
$fd= fread(fopen($HTTP_REFERER, "r"), 100000);
Gives warning
Warning: fopen failed to open stream: Bad file descriptor
Warning: fread(): supplied argument is not a valid stream resource
and fails to execute the rest of the script
My former setup had PHP 4.2.3, no such problems (however some trouble
with Omni). I tried the latest snapshot php4-win32-STABLE-200309291230,
no relieve there. I think I might have messed up something in the
settings, but I can't figure out what/where, due to hard disk failure I
lost all my data, had to rebuild my system and none of my former
settings can be retrieved. If any of you has any clues, most welcome.
Thanks for your attention.
--- End Message ---
--- Begin Message ---
try calling fopen by itself and then do fread()
$fd = fopen($file, 'r')
$buffer = fread($fd, 10000)
-----Original Message-----
From: manon [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] php 4.3.3 on apache 2.0.47
apache 2.0.47
php 4.3.3
win XP Pro
With the above combination most of the scripts I have don't work under
Apache, however they do running Omni HTTPd.
With Apache for example remote includes fail:
Warning: failed to open stream: Bad file descriptor
Failed opening 'http://somedomain.com/test.htm' for inclusion
(include_path='.;c:\php4\pear')
Line
$fd= fread(fopen($HTTP_REFERER, "r"), 100000);
Gives warning
Warning: fopen failed to open stream: Bad file descriptor
Warning: fread(): supplied argument is not a valid stream resource
and fails to execute the rest of the script
My former setup had PHP 4.2.3, no such problems (however some trouble
with Omni). I tried the latest snapshot php4-win32-STABLE-200309291230,
no relieve there. I think I might have messed up something in the
settings, but I can't figure out what/where, due to hard disk failure I
lost all my data, had to rebuild my system and none of my former
settings can be retrieved. If any of you has any clues, most welcome.
Thanks for your attention.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Has anyone done this with PHP? I'm looking for the best way to create a web
service on a hosted server. Currently, the provider is running the SOAP:Lite
(PERL) module, but I'd rather not have to learn PERL.
_______________________________
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an authorized
representative of the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by e-mail
and delete the message and any attachments from your system.
--- End Message ---
--- Begin Message ---
Use nuSoap.php It is an include file that I have used to create a few
web service client pages.
http://dietrich.ganx4.com/nusoap/index.php
http://www.google.com/apis/
<?php
require_once('nusoap.php');
$Search = "something";
$soapclient = new
soapclient('http://api.google.com/GoogleSearch.wsdl','wsdl');
$soap_proxy = $soapclient->getProxy();
$temp = $soap_proxy->doGoogleSearch('This is a key that you need
to get from google.com', $Search, 0, 10, false, "", false, "", "", "");
if ($temp["estimatedTotalResultsCount"] > 0) {
foreach($temp["resultElements"] as $value) {
echo "<a
href=\"".$value["URL"]."\">".$value["title"]."</a><br>";
echo $value["snippet"]."<br>";
echo "URL: ".$value["URL"]."<br>";
echo "<br>";
}
} else {
echo "Your Search returned Zero results. Plesae try
again.<br>";
}
?>
Code is provided as is. Feel free to use but I offer no guarantees
about the code.
You should have a wsdl file to make the job for the client developers a
lot easier.
Charles Killmer
-----Original Message-----
From: Pearson, Gregory [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 3:04 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-WIN] PHP Web Services
Has anyone done this with PHP? I'm looking for the best way to create a
web service on a hosted server. Currently, the provider is running the
SOAP:Lite
(PERL) module, but I'd rather not have to learn PERL.
_______________________________
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and
confidential.
If the reader of the message is not the intended recipient or an
authorized representative of the intended recipient, you are hereby
notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, please
notify us immediately by e-mail and delete the message and any
attachments from your system.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hey,
I need to connect to a ftp server in a IFRAME within a script. The only
problem is that the url to loginto this account is
ftp://[EMAIL PROTECTED]:[EMAIL PROTECTED] is there a way to get this
account to login to the ftp server with the ftp function and have the normal
ftp upload window in the iframe
thanks
Dean "The Insane Guy" Hayes
Mystical Web Designs
http://www.mystical-sector.com
<-- I design and i redesign but still i never designed true beauty like you
-->
_________________________________________________________________
Chat via SMS. Simply send 'CHAT' to 1889918. More info at
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800
--- End Message ---
--- Begin Message ---
Hi,
I'm picking bits out of SAMS TY PHP in 24H and tried a few of the image
examples.
What I found was that imagegif() generated an error while imagepng() did
not, and generated the image.
can anyone see any reason why I should try and get imagegif() working or
will imagepng() be acceptable. I'm using Win2K/WinNT servers and most of my
clients are on windows.
George
===
George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T +44 (0)1865 799051 direct
T +44 (0)1865 799000 switchboard
F +44 (0)1865 799134
E [EMAIL PROTECTED]
www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.
--- End Message ---