php-general Digest 25 Oct 2003 15:32:34 -0000 Issue 2376
Topics (messages 167518 through 167559):
Re: Post form variables to a frame
167518 by: Luis Lebron
167519 by: Evan Nemerson
167520 by: Pablo Gosse
167546 by: Luis Lebron
Re: Code optimization: single vs. double quotes?
167521 by: olinux
Re: Integrating interbase.so
167522 by: Todd Cary
Trying to start a session
167523 by: Jough Jeaux
167526 by: Marek Kilimajer
167535 by: Ed van der Mark
167544 by: Jough Jeaux
167545 by: Jough Jeaux
167549 by: Curt Zirzow
scrolling tables within a page
167524 by: Denis L. Menezes
167528 by: Burhan Khalid
how to use pclzip class
167525 by: David T-G
167534 by: DvDmanDT
Printing in Linux
167527 by: Manilal K M
167529 by: Marek Kilimajer
Trying to organise an array
167530 by: Tom Wollaston
Re: w3c-compliant form-action parameters
167531 by: Timo Boettcher
167532 by: Timo Boettcher
167536 by: Marek Kilimajer
167537 by: Timo Boettcher
167538 by: John Nichel
167539 by: Marek Kilimajer
167540 by: Marek Kilimajer
167541 by: John Nichel
167547 by: Timo Boettcher
167548 by: Timo Boettcher
167552 by: Marek Kilimajer
output
167533 by: Shmuel
167542 by: J. Cox
Compiling PHP on Mandrake 9.1 with Interbase
167543 by: Luiz Gustavo Sarubi Macchi
sockets - fine tunning
167550 by: Cosmin
167551 by: Curt Zirzow
167553 by: Cosmin
Redirect
167554 by: Joao Andrade
167555 by: John Nichel
167556 by: James Hicks
167558 by: Jon Kriek
CURL remote server get data back
167557 by: Dan McCullough
Re: session_destroy causes backspace on IE
167559 by: bill
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 tried that but it did not work.
Luis
-----Original Message-----
From: Evan Nemerson [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 10:14 PM
To: Luis Lebron; [EMAIL PROTECTED]
Subject: Re: [PHP] Post form variables to a frame
On Friday 24 October 2003 06:08 pm, Luis Lebron wrote:
> How can I post a form to the left frame of a frameset. I want to have an
> user submit a form that opens a frameset. The left frame contains the
> results of a query based on the posted parameters.
Try setting the target attribute of the form element to the name of the left
frame.
http://www.w3schools.com/tags/tag_form.asp
>
> What I want to create is a master detail page. Let's say a person is
> looking for a particular car. They would fill out a form. When the form is
> submitted a frameset shows up with thumbnails and some information on the
> car on the left frame. When the person clicks on the thumbnail, a larger
> picture and more information shows up on the right hand frame.
>
> My only problem is getting the form variables to the left frame.
>
> thanks,
>
> Luis
--
Evan Nemerson
[EMAIL PROTECTED]
--
"...the whole idea of revenge and punishment is a childish daydream.
Properly
speaking, there is no such thing as revenge. Revenge is an act which you
want
to commit when you are powerless and because you are powerless: as soon as
the sense of impotence is removed, the desire evaporates also. "
-George Orwell
--- End Message ---
--- Begin Message ---
On Friday 24 October 2003 08:28 pm, Luis Lebron wrote:
> I tried that but it did not work.
>
What about javascript? There are several ways- create a form then submit it w/
the js, build a URI and set the frame's location, etc. If you need help with
this I suggest a javascript forum or usenet.
>
> Luis
>
> -----Original Message-----
> From: Evan Nemerson [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 24, 2003 10:14 PM
> To: Luis Lebron; [EMAIL PROTECTED]
> Subject: Re: [PHP] Post form variables to a frame
>
> On Friday 24 October 2003 06:08 pm, Luis Lebron wrote:
> > How can I post a form to the left frame of a frameset. I want to have an
> > user submit a form that opens a frameset. The left frame contains the
> > results of a query based on the posted parameters.
>
> Try setting the target attribute of the form element to the name of the
> left frame.
>
> http://www.w3schools.com/tags/tag_form.asp
>
> > What I want to create is a master detail page. Let's say a person is
> > looking for a particular car. They would fill out a form. When the form
> > is submitted a frameset shows up with thumbnails and some information on
> > the car on the left frame. When the person clicks on the thumbnail, a
> > larger picture and more information shows up on the right hand frame.
> >
> > My only problem is getting the form variables to the left frame.
> >
> > thanks,
> >
> > Luis
--
Evan Nemerson
[EMAIL PROTECTED]
--
"God is love, Love is blind, Ray Charles is blind... Therefore, Ray Charles is
God"
--- End Message ---
--- Begin Message ---
On Friday, October 24, 2003 8:28 PM Luis Lebron wrote
> I tried that but it did not work.
Can you post the html code you used?
Setting <form action="foo.php" target="frame"> should do the trick.
This is very standard, so if it's not working that's very strange.
Post the code so we can take a look.
Cheers,
Pablo
-----Original Message-----
From: Evan Nemerson [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 10:14 PM
To: Luis Lebron; [EMAIL PROTECTED]
Subject: Re: [PHP] Post form variables to a frame
On Friday 24 October 2003 06:08 pm, Luis Lebron wrote:
> How can I post a form to the left frame of a frameset. I want to have
an
> user submit a form that opens a frameset. The left frame contains the
> results of a query based on the posted parameters.
Try setting the target attribute of the form element to the name of the
left
frame.
http://www.w3schools.com/tags/tag_form.asp
>
> What I want to create is a master detail page. Let's say a person is
> looking for a particular car. They would fill out a form. When the
form is
> submitted a frameset shows up with thumbnails and some information on
the
> car on the left frame. When the person clicks on the thumbnail, a
larger
> picture and more information shows up on the right hand frame.
>
> My only problem is getting the form variables to the left frame.
>
> thanks,
>
> Luis
--
Evan Nemerson
[EMAIL PROTECTED]
--
"...the whole idea of revenge and punishment is a childish daydream.
Properly
speaking, there is no such thing as revenge. Revenge is an act which you
want
to commit when you are powerless and because you are powerless: as soon
as
the sense of impotence is removed, the desire evaporates also. "
-George Orwell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Here is the frameset:
<frameset rows="80,*,30" cols="*" frameborder="NO" border="0"
framespacing="0">
<frame src="header.php" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="250,*" framespacing="0" frameborder="NO"
border="0">
<frame src="browse.php" name="leftFrame" scrolling="AUTO" noresize>
<frame src="info.php" name="mainFrame">
</frameset>
<frame src="footer.php" name="bottonFrame" scrolling="NO" noresize >
</frameset>
and here is the form:
<form action="frame.php" method="POST" target="leftFrame">
<select name="category">
<option value="1" label="1">1</option>
<option value="2" label="2">2</option>
<option value="3" label="3">3</option>
<option value="4" label="4">4</option>
</select>
<input type="submit" />
and here is the relevant lines of browse.php
$category=$_POST["category"];
$query="Select username, age, height, eyeColor, haircolor, build, id from
users where category='$category'";
thanks,
Luis
-----Original Message-----
From: Pablo Gosse [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 11:38 PM
To: Luis Lebron; [EMAIL PROTECTED]
Subject: RE: [PHP] Post form variables to a frame
On Friday, October 24, 2003 8:28 PM Luis Lebron wrote
> I tried that but it did not work.
Can you post the html code you used?
Setting <form action="foo.php" target="frame"> should do the trick.
This is very standard, so if it's not working that's very strange.
Post the code so we can take a look.
Cheers,
Pablo
-----Original Message-----
From: Evan Nemerson [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 10:14 PM
To: Luis Lebron; [EMAIL PROTECTED]
Subject: Re: [PHP] Post form variables to a frame
On Friday 24 October 2003 06:08 pm, Luis Lebron wrote:
> How can I post a form to the left frame of a frameset. I want to have
an
> user submit a form that opens a frameset. The left frame contains the
> results of a query based on the posted parameters.
Try setting the target attribute of the form element to the name of the
left
frame.
http://www.w3schools.com/tags/tag_form.asp
>
> What I want to create is a master detail page. Let's say a person is
> looking for a particular car. They would fill out a form. When the
form is
> submitted a frameset shows up with thumbnails and some information on
the
> car on the left frame. When the person clicks on the thumbnail, a
larger
> picture and more information shows up on the right hand frame.
>
> My only problem is getting the form variables to the left frame.
>
> thanks,
>
> Luis
--
Evan Nemerson
[EMAIL PROTECTED]
--
"...the whole idea of revenge and punishment is a childish daydream.
Properly
speaking, there is no such thing as revenge. Revenge is an act which you
want
to commit when you are powerless and because you are powerless: as soon
as
the sense of impotence is removed, the desire evaporates also. "
-George Orwell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote:
>
> I've always been a big fan of:
>
> > echo "<td bgcolor=\"$bgcolor2\"> </td></tr>";
>
uggh - apparently you've never had to redesign a
site/application that uses this style. This is one
table cell, but when you work this style through a big
app, it's a huge pain (waste of time) to make any
changes.
olinux
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
Evan -
Many thanks for the help. I have very little experience with Linux, so
the only time I have to get envolved is when I need to make some change
(otherwise my Linux server just runs quietly behind my desk :-) )
If I remember correctly, I need to go to /usr/src/php-4.3.2 and run the
configure as you indicated and then the "make". Correct?
And then php expects to find the interbase.so in the same directory as
the other so's (/usr/lib/php4 )...that is where it is and all runs
fine...just need to reproduce this on a new server (backup...standby).
Todd
Evan Nemerson wrote:
On Friday 24 October 2003 05:58 pm, Todd Cary wrote:
I have interbase integrated with php on my RH 9 server *BUT* I lost my
notes on how I did it. What I do have is interbase.so and it is in the
/usr/lib/php4 directory.
I need to setup another server and I would like to know how to integrate
interbase with php/apache.
When you configure PHP, use the --with-interbase flag.
[tadpole php5]$ ./configure --help | grep interbase
--with-interbase=DIR Include InterBase support. DIR is the InterBase base
install directory, defaults to /usr/interbase
Todd
--- End Message ---
--- Begin Message ---
The very simple following script:
<?
session_start();
?>
Produces an error that says it can't write the file
for the session.
The permissions for /tmp are rwxrwxrwt
Any ideas on how I can fix this?
Thanks!
These are the exact errors:
Warning:
open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
O_RDWR) failed: No such file or directory (2) in
/nex/htdocs/login/try.php on line 2
Warning:
open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
O_RDWR) failed: No such file or directory (2) in
Unknown on line 0
Warning: Failed to write session data (files).
Please verify that the current setting of
session.save_path is correct (/tmp) in Unknown on line
0
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
Is there any space left on /tmp partition?
Jough Jeaux wrote:
The very simple following script:
<?
session_start();
?>
Produces an error that says it can't write the file
for the session.
The permissions for /tmp are rwxrwxrwt
Any ideas on how I can fix this?
Thanks!
These are the exact errors:
Warning:
open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
O_RDWR) failed: No such file or directory (2) in
/nex/htdocs/login/try.php on line 2
Warning:
open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
O_RDWR) failed: No such file or directory (2) in
Unknown on line 0
Warning: Failed to write session data (files).
Please verify that the current setting of
session.save_path is correct (/tmp) in Unknown on line
0
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
If you are using Windows try C:\windows\temp as /tmp directory.
Ed
"Jough Jeaux" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> The very simple following script:
> <?
> session_start();
> ?>
>
> Produces an error that says it can't write the file
> for the session.
>
> The permissions for /tmp are rwxrwxrwt
>
> Any ideas on how I can fix this?
>
> Thanks!
>
> These are the exact errors:
> Warning:
> open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
> O_RDWR) failed: No such file or directory (2) in
> /nex/htdocs/login/try.php on line 2
>
> Warning:
> open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
> O_RDWR) failed: No such file or directory (2) in
> Unknown on line 0
>
> Warning: Failed to write session data (files).
> Please verify that the current setting of
> session.save_path is correct (/tmp) in Unknown on line
> 0
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
There is room left on /tmp. Now that means the 'tmp'
directory under the root directory on the filesystem
right? I don't have to make a directory called 'tmp'
in the DirectoryRoot or someplace else do I?
I also went ahead and chmod 777 /tmp to see if that
would help. It didn't. I had never used the 'sticky
bit'. I went ahead and turned it back on...
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote:
> Is there any space left on /tmp partition?
>
> Jough Jeaux wrote:
> > The very simple following script:
> > <?
> > session_start();
> > ?>
> >
> > Produces an error that says it can't write the
> file
> > for the session.
> >
> > The permissions for /tmp are rwxrwxrwt
> >
> > Any ideas on how I can fix this?
> >
> > Thanks!
> >
> > These are the exact errors:
> > Warning:
> > open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
> > O_RDWR) failed: No such file or directory (2) in
> > /nex/htdocs/login/try.php on line 2
> >
> > Warning:
> > open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
> > O_RDWR) failed: No such file or directory (2) in
> > Unknown on line 0
> >
> > Warning: Failed to write session data (files).
> > Please verify that the current setting of
> > session.save_path is correct (/tmp) in Unknown on
> line
> > 0
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product
> search
> > http://shopping.yahoo.com
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
I'm not using Windows, I'm using OpenBSD.
--- Ed van der Mark <[EMAIL PROTECTED]> wrote:
> If you are using Windows try C:\windows\temp as /tmp
> directory.
> Ed
>
> "Jough Jeaux" <[EMAIL PROTECTED]> schreef in
> bericht
>
news:[EMAIL PROTECTED]
> > The very simple following script:
> > <?
> > session_start();
> > ?>
> >
> > Produces an error that says it can't write the
> file
> > for the session.
> >
> > The permissions for /tmp are rwxrwxrwt
> >
> > Any ideas on how I can fix this?
> >
> > Thanks!
> >
> > These are the exact errors:
> > Warning:
> > open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
> > O_RDWR) failed: No such file or directory (2) in
> > /nex/htdocs/login/try.php on line 2
> >
> > Warning:
> > open(/tmp/sess_54e80d88f91dae66fa58b1aa262a9417,
> > O_RDWR) failed: No such file or directory (2) in
> > Unknown on line 0
> >
> > Warning: Failed to write session data (files).
> > Please verify that the current setting of
> > session.save_path is correct (/tmp) in Unknown on
> line
> > 0
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product
> search
> > http://shopping.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
* Thus wrote Jough Jeaux ([EMAIL PROTECTED]):
>
> There is room left on /tmp. Now that means the 'tmp'
> directory under the root directory on the filesystem
> right? I don't have to make a directory called 'tmp'
> in the DirectoryRoot or someplace else do I?
df -h /tmp will ensure you are looking at the proper device that
tmp is mounted on.
>
> I also went ahead and chmod 777 /tmp to see if that
> would help. It didn't. I had never used the 'sticky
> bit'. I went ahead and turned it back on...
That is good, the sticky bit makes it so only the creator of the
file has permissions to see the contents of the file.
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/
--- End Message ---
--- Begin Message ---
Hello friends.
My query output is about 20 to 30 records only. Instead of making the
visitors scroll the whole page, can I make a scrolling table with the page
such that the visitor scroll the results output table only?
Thanks
Denis
--- End Message ---
--- Begin Message ---
Denis L. Menezes wrote:
My query output is about 20 to 30 records only. Instead of making the
visitors scroll the whole page, can I make a scrolling table with the page
such that the visitor scroll the results output table only?
This has nothing to do with PHP. This is a HTML question. This list is
for php questions. :|
--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--- End Message ---
--- Begin Message ---
Hi, all --
The pclzip documentation is woefully slim, or at least it is for those of
us who don't speak French, and I don't know much about class programming
anyway.
I got the sucker downloaded and am require()ing it (I will later go and
be a little more graceful about it) but my feeble attempt at
$z = new PclZip ;
failed with
Warning: Missing argument 1 for pclzip() in .../pclzip.lib.php on line 160
and so I'm scratching my head.
I want to be able to catch an uploaded zip file and walk through it,
extracting each file (in order, which is important) and saving it under
a name I specify (no, the original name doesn't matter, just the order).
Any pointers or help would be appreciated :-)
TIA & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature
--- End Message ---
--- Begin Message ---
// -------------------------------------------------------------------------
-------
// Function : PclZip()
// Description :
// Creates a PclZip object and set the name of the associated Zip
archive
// filename.
// Note that no real action is taken, if the archive does not exist it
is not
// created. Use create() for that.
// -------------------------------------------------------------------------
-------
Example:
$zipfile="uploaded.zip";
$zip=new PclZip($zipfile);
$file_list= $zip->listContent();
$file_list[$index]
-> ["filename"] (not sure)
-> ["stored_filename"] (filename in archive)
-> ["size"] (uncompressed size)
-> ["compressed_size"] (name says it all)
-> ["index"] (index in archive)
-> ["mtime"] (last mod)
$zip->extractByIndex($index_to_extract,"./folder_to_extract_into/");
--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##########################
"David T-G" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hello everybody,
Can anyone give information regarding how to print a file in plain text format
using PHP. I am using RedHat Linux9.0, httpd-2.0.40-21 and php-4.2.2-17.
I think that print support is not given to linux. I want to know that whether there is
any developments in this regard. Please respond. I don't want to take the print from
the File->
Print menu or icon. I want to get directly printed when a button is clicked. and I
don't want to use Javascript which is inconsistent in many matters. Also that
Javascript can't
handle files.
with regards,
Manilal ,
Open Source Technology Team,
Centre for Development of Imaging Technology,
City centre,
Thiruvananthapuram - 695001
Keralam, India
--
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.
Powered by Outblaze
--- End Message ---
--- Begin Message ---
It is not clear if you want to print on the server or client side. If on
the server side use lpr command. Client side use javascript to prompt
user to print. What do you mean window.print() is inconsistent?
Manilal K M wrote:
Hello everybody,
Can anyone give information regarding how to print a file in plain text format using PHP. I am using RedHat Linux9.0, httpd-2.0.40-21 and php-4.2.2-17.
I think that print support is not given to linux. I want to know that whether there is any developments in this regard. Please respond. I don't want to take the print from the File->
Print menu or icon. I want to get directly printed when a button is clicked. and I don't want to use Javascript which is inconsistent in many matters. Also that Javascript can't
handle files.
with regards,
Manilal ,
Open Source Technology Team,
Centre for Development of Imaging Technology,
City centre,
Thiruvananthapuram - 695001
Keralam, India
--- End Message ---
--- Begin Message ---
I have made this function which should be quite simple but doesn't seem to
do what it is meant to.
What I want it to do is create an array where there is a numbered key (the
rows of the table) and the colume headings as the second key.
It doesn't seem to work. If I set $pid=0 then I get no results (even though
there are such values in the table), and when $pid=1 I get the results I
expect but they are not sorted in the way I expected.
This means that I cannot then use this data for its end effect which is a
menu system.
Thanks
<?php
function getinfo($pid)
{
$query = "SELECT name,id,parentid FROM ubsc_menu WHERE parentid='$pid' ";
$result = mysql_query ($query) or die ("Query failed");
$row=mysql_fetch_array($result,MYSQL_ASSOC);
$n = 1;
while ($row=mysql_fetch_array($result,MYSQL_ASSOC))
{
foreach ($row as $colname => $value)
{
$array[$n][$colname] = $value;
}
$n++;
}
return $array;
}
?>
--- End Message ---
--- Begin Message ---
Hi John,
Nachricht vom Freitag, 24. Oktober 2003, 19:06:33:
> Timo Boettcher wrote:
>> Hi,
>>
>> I am trying to get my pages through the w3c-validator for html.
>> It doesn't like my
>> <FORM action="mypage.php?para1=val1¶2=val2">
>> Changing & to & got my page through the validator, but broke my
>> app, which seems not to be getting any parameters over URL anymore.
>> How can I fix that?
>>
>> PS.: Moving that information from the URL to hidden fields or
>> cookies/sessions is not an option.
>>
>> Timo
>>
> I'm curious....why are hidden fields not an option?
Its not easy to get the value of a hidden field in a bookmark.
Timo
--- End Message ---
--- Begin Message ---
Hi Pablo,
Nachricht vom Freitag, 24. Oktober 2003, 19:14:31:
> Hi, Timo. Why can't use use hidden fields instead of appending the
> values to the url? It would be the same to access them via
> $_GET['para1'] $_GET['para2] (unless you were using post as your method,
> in which case it would simply be $_POST['varname']) if they were on the
> url or in hidden fields.
> Why can't you make this switch?
You can't set a bookmark to include the value of a hidden field, but
with a url-param, it is possible.
> Also, have you tried using the % entity for ampersand (%26 if memory
> serves me correct) instead of & or the literal ampersand?
> So instead of mypage.php?para1=val1¶2=val2 you would use
> mypage.php?para1=val1%26para2=val2.
I'll try that.
> Cheers,
> Pablo
> -----Original Message-----
> From: Timo Boettcher [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 24, 2003 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] w3c-compliant form-action parameters
> Hi,
> I am trying to get my pages through the w3c-validator for html.
> It doesn't like my
> <FORM action="mypage.php?para1=val1¶2=val2">
> Changing & to & got my page through the validator, but broke my
> app, which seems not to be getting any parameters over URL anymore.
> How can I fix that?
> PS.: Moving that information from the URL to hidden fields or
> cookies/sessions is not an option.
> Timo
Timo
--- End Message ---
--- Begin Message ---
Timo Boettcher wrote:
Its not easy to get the value of a hidden field in a bookmark.
Timo
Don't use & in bookmarks, use just &.
--- End Message ---
--- Begin Message ---
Hi Marek,
Nachricht vom Samstag, 25. Oktober 2003, 13:02:06:
> Timo Boettcher wrote:
>> Its not easy to get the value of a hidden field in a bookmark.
> Don't use & in bookmarks, use just &.
But when I say "Bookmark this Page" (in any browser) that gets me a
bookmark on the url, and not on hidden fields.
Timo
--- End Message ---
--- Begin Message ---
Timo Boettcher wrote:
Hi John,
Nachricht vom Freitag, 24. Oktober 2003, 19:06:33:
Timo Boettcher wrote:
Hi,
I am trying to get my pages through the w3c-validator for html.
It doesn't like my
<FORM action="mypage.php?para1=val1¶2=val2">
Changing & to & got my page through the validator, but broke my
app, which seems not to be getting any parameters over URL anymore.
How can I fix that?
PS.: Moving that information from the URL to hidden fields or
cookies/sessions is not an option.
Timo
I'm curious....why are hidden fields not an option?
Its not easy to get the value of a hidden field in a bookmark.
Timo
Sure it is. Change the method of the form from a 'post' to a 'get'
<FORM action="mypage.php?para1=val1¶2=val2" method="get">
Of course, all of your variables will be in the URL then.
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
John Nichel wrote:
Sure it is. Change the method of the form from a 'post' to a 'get'
<FORM action="mypage.php?para1=val1¶2=val2" method="get">
Get variables in action URL don't work with get method, at least in Mozilla.
--- End Message ---
--- Begin Message ---
Can you upload the problematic page somewhere. I don't believe &
entity is the real problem.
Timo Boettcher wrote:
Hi Marek,
Nachricht vom Samstag, 25. Oktober 2003, 13:02:06:
Timo Boettcher wrote:
Its not easy to get the value of a hidden field in a bookmark.
Don't use & in bookmarks, use just &.
But when I say "Bookmark this Page" (in any browser) that gets me a
bookmark on the url, and not on hidden fields.
Timo
--- End Message ---
--- Begin Message ---
Marek Kilimajer wrote:
John Nichel wrote:
Sure it is. Change the method of the form from a 'post' to a 'get'
<FORM action="mypage.php?para1=val1¶2=val2" method="get">
Get variables in action URL don't work with get method, at least in
Mozilla.
Right, my bad. He'd have to move them into hidden fields to be in the
URL query string....
<FORM action="mypage.php?para1=val1¶2=val2" method="get">
<input type="hidden" name="para1" value="val1" />
<input type="hidden" name="para2" value="val2" />
.......
</form>
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Hi Marek,
Nachricht vom Freitag, 24. Oktober 2003, 19:17:36:
> Whoops. The first sentense should be a question.
> Marek Kilimajer wrote:
>> It breaks your server side scripts. & should be translated to & by
>> the browser and never get to php.
>>
>> Timo Boettcher wrote:
>>
>>> Hi,
>>>
>>> I am trying to get my pages through the w3c-validator for html.
>>> It doesn't like my
>>> <FORM action="mypage.php?para1=val1¶2=val2">
>>> Changing & to & got my page through the validator, but broke my
>>> app, which seems not to be getting any parameters over URL anymore.
>>> How can I fix that?
>>>
>>> PS.: Moving that information from the URL to hidden fields or
>>> cookies/sessions is not an option.
>>>
>>> Timo
Yes. When I use
<form action="mypage.php?para1=val1¶2=val2" Method=post>
everything works ok, the form is submitted to the given address.
When I do
<form action="mypage.php?para1=val1&para2=val2" Method=post>
the form is submitted to the given address, too, and that includes the
& so that my application gets broken parameters and breaks.
Timo
--- End Message ---
--- Begin Message ---
Hi Chris,
Nachricht vom Freitag, 24. Oktober 2003, 21:12:06:
> --- Timo Boettcher <[EMAIL PROTECTED]> wrote:
>> I am trying to get my pages through the w3c-validator for html.
>> It doesn't like my
>> <FORM action="mypage.php?para1=val1¶2=val2">
>> Changing & to & got my page through the validator, but broke my
>> app, which seems not to be getting any parameters over URL
>> anymore.
> I find that *very* hard to believe. I'm not aware of any browser
> that mishandles HTML entities. Basically, when you say this:
> action="/mypage.php?para1=val1&para2=val2"
> Your browser's HTTP request line will appear as:
> /mypage.php?para1=val1¶2=val2
That seems to be different here. With IE and opera, I get
"mypage.php?para1=val1&para2=val2" as the page address.
> So, by the time PHP sees it, everything is the same either way. My guess is
> that you have some other problem.
> Hope that helps.
> Chris
Timo
--- End Message ---
--- Begin Message ---
Hi, I'm not sure if this was asked, but what browser are you using? I
get everything correctly and I don't remember any browser with this kind
of bug. Also, can you post the relevant part of page source?
Timo Boettcher wrote:
Yes. When I use
<form action="mypage.php?para1=val1¶2=val2" Method=post>
everything works ok, the form is submitted to the given address.
When I do
<form action="mypage.php?para1=val1&para2=val2" Method=post>
the form is submitted to the given address, too, and that includes the
& so that my application gets broken parameters and breaks.
Timo
--- End Message ---
--- Begin Message ---
I'm getting output from program I run (exec) to the web page.
How can I avoid this ?
These I've tried:
error_reporting = E_ERROR
and even this:
error_reporting = ~E_ALL
display_errors = Off
Any ideas ?
--- End Message ---
--- Begin Message ---
"Shmuel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm getting output from program I run (exec) to the web page.
> How can I avoid this ?
>
> These I've tried:
>
> error_reporting = E_ERROR
>
> and even this:
> error_reporting = ~E_ALL
>
> display_errors = Off
>
> Any ideas ?
>
I'm assuming that you are trying to turn off error reporting.
http://www.php.net/manual/en/function.ini-set.php
Should get you started, or you could suppress the errors with @. Am I in
the right ballpark?
J. Cox
http://www.xaraya.com
--- End Message ---
--- Begin Message ---
Please, i d like to compile the php because i need to use Interbase
I really dont know how to do it !
Has anyone a tutorial to compile it correctly ?
thanks a lot any help
Gugao
--
--- End Message ---
--- Begin Message ---
I'm trying to make an application using XML-RPC, and I have the
following problem: I use fsockopen() to simulate a POST to my local
web-server. All goes very well except it's very very slow. Here is my
code maybe someone could tell me what I'm doing wrong:
=====================================
$url= parse_url($this->serverURL);
$requestString= "POST ".$url['path']." HTTP/1.1\r\nHost:
".$url['host']."\r\nContent-type:
application/x-www.form-urlencoded\r\nContent-length:
".strlen($this->requestData)."\r\n\r\n".$this->requestData;;
$fp = fsockopen($url['host'], 80, $err_num, $err_msg, 5);
if ($fp)
{
//make the request to the xml-rpc server
fputs($fp, $requestString);
//gets the result
while (!feof($fp))
{
$response .= fgets($fp, 1024);
}
fclose($fp);
$this->rawResponse=$response;
$this->error=false;
}
else
{
$this->error=true;
$this->errorMessage=$err_msg;
}
====================================
This is the slowest part of my script(about 16 seconds). The server's
execution time is only 0.00064206123352051 seconds. I don't know why it
takes so much to write a string to the socket and then to read the
response. Here are the execution times:
Server Start Server Stop
1067090777.5339 1067090777.5346
Client Start Client Stop
1067090777.5303 1067090794.5286
If someone knows a way on how to speed this up please tell me how to do
it.
Thank you for your time
--
Cosmin <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
* Thus wrote Cosmin ([EMAIL PROTECTED]):
> I'm trying to make an application using XML-RPC, and I have the
> following problem: I use fsockopen() to simulate a POST to my local
> web-server. All goes very well except it's very very slow. Here is my
> code maybe someone could tell me what I'm doing wrong:
> =====================================
> $url= parse_url($this->serverURL);
> $requestString= "POST ".$url['path']." HTTP/1.1\r\nHost:
> ".$url['host']."\r\nContent-type:
> application/x-www.form-urlencoded\r\nContent-length:
> ".strlen($this->requestData)."\r\n\r\n".$this->requestData;;
Have you tried to simulate this on a web browser?
My guess is there might be some dns issue somewhere causing the
webserver to take a while before even processing the request.
Try and find out where the bottleneck is by echo'ing between steps
to see where the problem is, for example:
echo time(), "\n";
> $fp = fsockopen($url['host'], 80, $err_num, $err_msg, 5);
echo time(), "\n";
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/
--- End Message ---
--- Begin Message ---
On Sat, 2003-10-25 at 17:42, Curt Zirzow wrote:
> * Thus wrote Cosmin ([EMAIL PROTECTED]):
> > I'm trying to make an application using XML-RPC, and I have the
> > following problem: I use fsockopen() to simulate a POST to my local
> > web-server. All goes very well except it's very very slow. Here is my
> > code maybe someone could tell me what I'm doing wrong:
> > =====================================
> > $url= parse_url($this->serverURL);
> > $requestString= "POST ".$url['path']." HTTP/1.1\r\nHost:
> > ".$url['host']."\r\nContent-type:
> > application/x-www.form-urlencoded\r\nContent-length:
> > ".strlen($this->requestData)."\r\n\r\n".$this->requestData;;
>
> Have you tried to simulate this on a web browser?
>
> My guess is there might be some dns issue somewhere causing the
> webserver to take a while before even processing the request.
>
> Try and find out where the bottleneck is by echo'ing between steps
> to see where the problem is, for example:
>
> echo time(), "\n";
> > $fp = fsockopen($url['host'], 80, $err_num, $err_msg, 5);
> echo time(), "\n";
>
>
> Curt
> --
> "My PHP key is worn out"
>
> PHP List stats since 1997:
> http://zirzow.dyndns.org/html/mlists/
Here are the times:
1:1067092779.6042
2:1067092795.7176
And here is the code:
echo '1:'.getmicrotime(),"\n\n";
while($data=fread($fp, 32768))
{
$response.=$data;
}
echo '2:'.getmicrotime(),"\n\n";
I don't know what else to do ... I've changed the buffer length but it's
still the same :((
--- End Message ---
--- Begin Message ---
Hi there people,
I'm looking for a function that will redirect a browser to another page
after a PHP scrip has run. I tried serching for it in the doc but found
nothing. It shall be similar to Tcl's "ns_returnredirect".
Thanx.
Joao Penna Andrade
Undergraduate, Mechanical Engineering
UNICAMP, Brazil
--- End Message ---
--- Begin Message ---
http://us2.php.net/manual/en/function.header.php
Joao Andrade wrote:
Hi there people,
I'm looking for a function that will redirect a browser to another page
after a PHP scrip has run. I tried serching for it in the doc but found
nothing. It shall be similar to Tcl's "ns_returnredirect".
Thanx.
Joao Penna Andrade
Undergraduate, Mechanical Engineering
UNICAMP, Brazil
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
On Saturday 25 October 2003 10:54 am, Joao Andrade wrote:
> Hi there people,
>
> I'm looking for a function that will redirect a browser to another page
> after a PHP scrip has run. I tried serching for it in the doc but found
> nothing. It shall be similar to Tcl's "ns_returnredirect".
> Thanx.
You can either use the php function header() or the HTML meta refresh thing.
James
--- End Message ---
--- Begin Message ---
header() refresh/redirect with delay.
---------------------------
<?php
ob_start();
if(!headers_sent()) {
header('Refresh: 1; Url=http://www.example.com');
exit();
}
ob_end_flush();
?>
---------------------------
header() refresh/re-direct without delay
---------------------------
<?php
ob_start();
if(!headers_sent()) {
header('Location: http://www.example.com');
exit();
}
ob_end_flush();
?>
---------------------------
--
Jon Kriek
http://phpfreaks.com
--- End Message ---
--- Begin Message ---
I have an install script that verifies someones registration key and
information against my client database and installs or patches, or whatever
else. I'm new with CURL but is there away to get back a response from the
server that your are querying back through CURL?
--- End Message ---
--- Begin Message ---
Aha, I'm using PHP 4.1.2 with trans-sid enabled for browsers that don't
use cookies.
Now that I know where to look, I found that putting ob_start() at the
beginning seems to help.
kind regards,
bill
David Otton wrote:
On Fri, 24 Oct 2003 15:42:45 -0400, you wrote:
Tried breaking up the echo, but still didn't work.
What PHP version are you using? 4.10, maybe?
http://bugs.php.net/bug.php?id=14695
--- End Message ---