php-windows Digest 24 Jan 2003 17:26:10 -0000 Issue 1553
Topics (messages 18064 through 18078):
Re: Re:Subject: printing (might be OT)
18064 by: Miha Nedok
Re: Subject: print problem
18065 by: Neil Smith
Re: PDF extensions seems to do not work properly on IE
18066 by: Paul Gardiner
18075 by: Leonardo Javier Belén
18076 by: Leonardo Javier Belén
Configuring a web server I haven't written yet...
18067 by: Jill.Ramonsky.Aculab.com
18068 by: Dash McElroy
18069 by: Per Lundberg
Politely?
18070 by: Jill.Ramonsky.Aculab.com
Geting information back...
18071 by: Bobo Wieland
simple test for Win XP/PHP gurus...
18072 by: Alex Davis
strpos and wildcards
18073 by: Bobo Wieland
18077 by: Cam Dunstan
Chapter 5, Loops and Arrays
18074 by: Wade
newbie form question..
18078 by: paradiddles
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 ---
Has anyone figured out how to print tables in landscape ?
I was trying with CSS but the table is just printed left-to-right but no
landscape :(
-Mike
On Thu, 23 Jan 2003, Neil Smith wrote:
> Date: Thu, 23 Jan 2003 23:44:18 +0000
> From: Neil Smith <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re:Subject: printing (might be OT)
>
> Sure Bobo - you can use Javascript to avoid the need to store your print
> file , together with CSS to format the page as you like.
>
> Javascript : onclick="window.print()"
>
> That will print the window (or offer a print dialog) in IE, NN4, Nav6,
> Moz, Opera etc etc.
>
> For print formatting in CSS look up @media print on www.w3c.org - something
> like this (may not be supported in NN4 btw - though it shouldnt print
> background colors of images if they are on a white background. In fact
> mostof this will be borked on netscape but hey :)
>
> Example :
>
> @media print {
>
> BODY {
> background : white;
> margin: 0.25in;
> size: 210mm 297mm landscape;
>
> /* or portrait */
>
> font-family: Georgia, "Times New Roman", Times, serif;
> font-size: 12pt;
>
> /* prefer to use points for print not pixels cause of resolution
> dependency */
>
> border : 1px solid #000000;
> float: left;
> }
>
> .hidden {
> display : none;
> }
>
> Give your print hidden elements a style of .hidden as specified. There are
> also attributes for page-break-before and page-break-after and so on. Nest
> your other print-only styles inside the @media print{ } making sure that
> you duplicate most of the body styles in some print renderable way (at
> least, specify a font & weight) - the print styles wil be overridden by the
> normal (screen) styles specified in your stylesheet - no need to specify
> @media screen for these. Fool around for a while and you avoid PHP entirely.
>
> Use the force wisely, Luke :-)
>
> Cheers,
> Neil.
>
>
>
> At 16:16 23/01/2003 +0000, you wrote:
> >Message-ID: <001601c2c2c0$bba8dab0$9df81e0a@elstudion>
> >From: "Bobo Wieland" <[EMAIL PROTECTED]>
> >Hi!
> >
> >I'm sorry if this is OT but I really need an answer to this question and I
> >can't find it anywhere...
> >
> >I have a link on a page that basicly should work as a print-button. When you
> >click it, it should print some of the information that is currently
> >displayed and ad a header and footer of some sort.
> >
> >The only way i know of doing this is using CSS and showing/hiding layers,
> >but it would be much easier if I could generate a file of some sort that
> >will be sent to the printer...
> >
> >Is there a way to do this sort of thing with php, or could you guys please
> >help pointing me to some information about this...?
> >
> >thanks!
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
At 05:18 24/01/2003 +0000, you wrote:
Message-ID: <004d01c2c34c$ed35c4d0$01ff0a0a@vaio>
From: "yuegong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Fri, 24 Jan 2003 10:02:23 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0043_01C2C38F.B11331C0"
Subject: print problem
Hi
Is there any way to set the page properties of browser by javascript
before call 'windows.print();', such as size, direction...
See my post just prior to yours ! PS there was an omitted } in the @ media
declaration :
It should have read
@media print {
/* .... css print media styles here */
}
Basically some of the components are supported by most browsers, some are
IE specific. Look to these URLS for info :
http://www.richinstyle.com/test/paged/ and
http://www.aboutbabette.com/css/media.html
Cheers,
Neil Smith.
--- End Message ---
--- Begin Message ---
Hi
This is for PDFLIB, but notice the Content-length header. This I know to
work on IE.
$data = pdf_get_buffer($pdf);
header("Content-type: application/pdf");
header("Content-disposition: inline; filename=test.pdf");
header("Content-length: " . strlen($data));
echo $data;
- Paul -
----- Original Message -----
From: "Leonardo Javier Belén" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 9:49 PM
Subject: Re: [PHP-WIN] Fw: PDF extensions seems to do not work properly on
IE
> Nothing happens. Its the same problem. It seems that IE does not
understand
> the data sent this way. Does anyone has a clue about how to solve it?
> Thanks.
>
> Leonardo Javier Belén.
> AFIP-AR.
>
>
> ----- Original Message -----
> From: "Scott Carr" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 23, 2003 5:27 PM
> Subject: Re: [PHP-WIN] Fw: PDF extensions seems to do not work properly on
> IE
>
>
> > You need to check the disposition line.
> >
> > Content-Disposition: inline; filename=genome.jpeg
> >
> > I believe you are missing the semi-colon.
> > --
> > Scott Carr
> > Documentation Maintainer
> > http://documentation.openoffice.org
> > OpenOffice.org
> >
> >
> > Quoting Leonardo Javier Belén <[EMAIL PROTECTED]>:
> >
> > >
> > > ----- Original Message -----
> > > From: Leonardo Javier Belén
> > > To: [EMAIL PROTECTED]
> > > Sent: Thursday, January 23, 2003 10:51 AM
> > > Subject: PDF extensions seems to do not work properly on IE
> > >
> > >
> > > Hi all!
> > > I am facing a problem with PHP (binaries from php.net) over APACHE
> 1.3.x
> > > on Windows 95 and IE5&6 as a client (in both WinNT40 and Win95). The
> > > problem is as follows:
> > > I need to use the pdf libraries (both cpdf and pdflib) and I
cannto
> make
> > > work any sample. If i use the "hello world" from the documentation
pack,
> > > which is with cpdf:
> > >
> > > <?php
> > > $cpdf = cpdf_open(0);
> > > cpdf_page_init($cpdf, 1, 0, 595, 842, 1.0);
> > > cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
> > > cpdf_begin_text($cpdf);
> > > cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding");
> > > cpdf_set_text_rendering($cpdf, 1);
> > > cpdf_text($cpdf, "Times Roman outlined", 50, 750);
> > > cpdf_end_text($cpdf);
> > > cpdf_moveto($cpdf, 50, 740);
> > > cpdf_lineto($cpdf, 330, 740);
> > > cpdf_stroke($cpdf);
> > > cpdf_finalize($cpdf);
> > > header("Content-type: application/pdf");
> > > header("Content-Disposition: filename=test.pdf");
> > > Header("Expires: 0");
> > > cpdf_output_buffer($cpdf);
> > > ?>
> > >
> > > the answer is always the same:
> > > 1. a dialog box asking me to discard the file based on the information
> on
> > > the control (which I suspect is a problem with the settings on IE but
at
> > > least shows me it recognises the right control).
> > > 2. start to load the control and then a dialog box (during
> initialization of
> > > the control) tells me that the file is no available.
> > >
> > > Please help! I dont know what the problem is.
> > > Thanks in advance.
> > > Leonardo J. Belén. AFIP-AR.
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
> >
> > --
> > 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 ---
Is it a problem if I ask you to explain a little more about your work
around? Because I do not understand your idea completely. How do you manage
multiple documents? because you tell me that what I do want is to make a
file and then refer to it from a html link, If I dont get the wrong idea...
Cheers,
Leonardo J. Belén. AFIP-AR
"MH" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I had a similar problem. What I did was to create a refering page with a
> link to the php page that creates the pdf and then suddenly it showed. If
> you call the PHP page directly all kind of weird things happen. If you
look
> at the source of the new page (PHP one that creates the PDF) you will see
> that it uses the <embed> tag to display the PDF. It seems that is the
only
> way that I can display the created PDF's. I did not do much more
> investigating since this works fine for me.
>
> Also I am using FPDF (ww.fpdf.org) instead of the normal PDF library, I
find
> it much easier and with less problems.
>
> Mh
>
> "Leonardo javier bel?n" <[EMAIL PROTECTED]> wrote in message
> 00ae01c2c329$43ec4bb0$[EMAIL PROTECTED]">news:00ae01c2c329$43ec4bb0$[EMAIL PROTECTED]...
> > Nothing happens. Its the same problem. It seems that IE does not
> understand
> > the data sent this way. Does anyone has a clue about how to solve it?
> > Thanks.
> >
> > Leonardo Javier Bel?n.
> > AFIP-AR.
> >
> >
> > ----- Original Message -----
> > From: "Scott Carr" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 23, 2003 5:27 PM
> > Subject: Re: [PHP-WIN] Fw: PDF extensions seems to do not work properly
on
> > IE
> >
> >
> > > You need to check the disposition line.
> > >
> > > Content-Disposition: inline; filename=genome.jpeg
> > >
> > > I believe you are missing the semi-colon.
> > > --
> > > Scott Carr
> > > Documentation Maintainer
> > > http://documentation.openoffice.org
> > > OpenOffice.org
> > >
> > >
> > > Quoting Leonardo Javier Bel?n <[EMAIL PROTECTED]>:
> > >
> > > >
> > > > ----- Original Message -----
> > > > From: Leonardo Javier Bel?n
> > > > To: [EMAIL PROTECTED]
> > > > Sent: Thursday, January 23, 2003 10:51 AM
> > > > Subject: PDF extensions seems to do not work properly on IE
> > > >
> > > >
> > > > Hi all!
> > > > I am facing a problem with PHP (binaries from php.net) over
APACHE
> > 1.3.x
> > > > on Windows 95 and IE5&6 as a client (in both WinNT40 and Win95).
The
> > > > problem is as follows:
> > > > I need to use the pdf libraries (both cpdf and pdflib) and I
> cannto
> > make
> > > > work any sample. If i use the "hello world" from the documentation
> pack,
> > > > which is with cpdf:
> > > >
> > > > <?php
> > > > $cpdf = cpdf_open(0);
> > > > cpdf_page_init($cpdf, 1, 0, 595, 842, 1.0);
> > > > cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
> > > > cpdf_begin_text($cpdf);
> > > > cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding");
> > > > cpdf_set_text_rendering($cpdf, 1);
> > > > cpdf_text($cpdf, "Times Roman outlined", 50, 750);
> > > > cpdf_end_text($cpdf);
> > > > cpdf_moveto($cpdf, 50, 740);
> > > > cpdf_lineto($cpdf, 330, 740);
> > > > cpdf_stroke($cpdf);
> > > > cpdf_finalize($cpdf);
> > > > header("Content-type: application/pdf");
> > > > header("Content-Disposition: filename=test.pdf");
> > > > Header("Expires: 0");
> > > > cpdf_output_buffer($cpdf);
> > > > ?>
> > > >
> > > > the answer is always the same:
> > > > 1. a dialog box asking me to discard the file based on the
information
> > on
> > > > the control (which I suspect is a problem with the settings on IE
but
> at
> > > > least shows me it recognises the right control).
> > > > 2. start to load the control and then a dialog box (during
> > initialization of
> > > > the control) tells me that the file is no available.
> > > >
> > > > Please help! I dont know what the problem is.
> > > > Thanks in advance.
> > > > Leonardo J. Bel?n. AFIP-AR.
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------
> > > This mail sent through IMP: http://horde.org/imp/
> > >
> > > --
> > > 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 ---
HI!
I get the same problem as before. Do you have a clue of whats going on?
By the way, I do want to collaborate fixing the bug (if it is one).
Thanks a lot,
Leonardo J. Belen
AFIP-AR
----- Original Message -----
From: "Paul Gardiner" <[EMAIL PROTECTED]>
To: "Leonardo Javier Belén" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, January 24, 2003 5:40 AM
Subject: Re: [PHP-WIN] Fw: PDF extensions seems to do not work properly on
IE
> Hi
>
> This is for PDFLIB, but notice the Content-length header. This I know to
> work on IE.
>
> $data = pdf_get_buffer($pdf);
> header("Content-type: application/pdf");
> header("Content-disposition: inline; filename=test.pdf");
> header("Content-length: " . strlen($data));
> echo $data;
>
> - Paul -
>
> ----- Original Message -----
> From: "Leonardo Javier Belén" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 23, 2003 9:49 PM
> Subject: Re: [PHP-WIN] Fw: PDF extensions seems to do not work properly on
> IE
>
>
> > Nothing happens. Its the same problem. It seems that IE does not
> understand
> > the data sent this way. Does anyone has a clue about how to solve it?
> > Thanks.
> >
> > Leonardo Javier Belén.
> > AFIP-AR.
> >
> >
> > ----- Original Message -----
> > From: "Scott Carr" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 23, 2003 5:27 PM
> > Subject: Re: [PHP-WIN] Fw: PDF extensions seems to do not work properly
on
> > IE
> >
> >
> > > You need to check the disposition line.
> > >
> > > Content-Disposition: inline; filename=genome.jpeg
> > >
> > > I believe you are missing the semi-colon.
> > > --
> > > Scott Carr
> > > Documentation Maintainer
> > > http://documentation.openoffice.org
> > > OpenOffice.org
> > >
> > >
> > > Quoting Leonardo Javier Belén <[EMAIL PROTECTED]>:
> > >
> > > >
> > > > ----- Original Message -----
> > > > From: Leonardo Javier Belén
> > > > To: [EMAIL PROTECTED]
> > > > Sent: Thursday, January 23, 2003 10:51 AM
> > > > Subject: PDF extensions seems to do not work properly on IE
> > > >
> > > >
> > > > Hi all!
> > > > I am facing a problem with PHP (binaries from php.net) over
APACHE
> > 1.3.x
> > > > on Windows 95 and IE5&6 as a client (in both WinNT40 and Win95).
The
> > > > problem is as follows:
> > > > I need to use the pdf libraries (both cpdf and pdflib) and I
> cannto
> > make
> > > > work any sample. If i use the "hello world" from the documentation
> pack,
> > > > which is with cpdf:
> > > >
> > > > <?php
> > > > $cpdf = cpdf_open(0);
> > > > cpdf_page_init($cpdf, 1, 0, 595, 842, 1.0);
> > > > cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
> > > > cpdf_begin_text($cpdf);
> > > > cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding");
> > > > cpdf_set_text_rendering($cpdf, 1);
> > > > cpdf_text($cpdf, "Times Roman outlined", 50, 750);
> > > > cpdf_end_text($cpdf);
> > > > cpdf_moveto($cpdf, 50, 740);
> > > > cpdf_lineto($cpdf, 330, 740);
> > > > cpdf_stroke($cpdf);
> > > > cpdf_finalize($cpdf);
> > > > header("Content-type: application/pdf");
> > > > header("Content-Disposition: filename=test.pdf");
> > > > Header("Expires: 0");
> > > > cpdf_output_buffer($cpdf);
> > > > ?>
> > > >
> > > > the answer is always the same:
> > > > 1. a dialog box asking me to discard the file based on the
information
> > on
> > > > the control (which I suspect is a problem with the settings on IE
but
> at
> > > > least shows me it recognises the right control).
> > > > 2. start to load the control and then a dialog box (during
> > initialization of
> > > > the control) tells me that the file is no available.
> > > >
> > > > Please help! I dont know what the problem is.
> > > > Thanks in advance.
> > > > Leonardo J. Belén. AFIP-AR.
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------
> > > This mail sent through IMP: http://horde.org/imp/
> > >
> > > --
> > > 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 ---
Hi guys,
I'm writing a web server for Windows. I want to know how to make it support
PHP.
Here's the easy bit (which I know how to do)...
1) A client requests a web page called "anything.php"
2) The server notices the extension ".php", looks this up in the server's
configuration settings, and says "Aha - this is a PHP script".
3) The server runs the PHP script, and sends the output stream back to the
client.
Here's the bit I _DON'T_ know how to do...
How the hell can my server INITIALISE the superglobal variables $_GET,
$_POST, $_SERVER, $_SESSION, etc. in preparation for running the script?
... I mean, it's an easy enough matter to call:
system("php something.php")
to run a PHP script ... but that won't initialise the superglobal variables.
There doesn't appear to be a command line parameter to php.exe that lets you
specify this information. So how's it done? How do other web servers do it?
Any suggestion would be appreciated.
Jill
--- End Message ---
--- Begin Message ---
Why would you do a system("php something.php")? Just put the code in the
php file and you're good to go.
i.e.
<httproot>/something.php contains:
<?php
echo $_POST['var']; // if post
echo $_GET['var']; // if get
//etc etc etc.. no need to have php call another php script...
?>
-Dash
I can't understand it. I can't even understand the people who can
understand it.
-- Queen Juliana of the Netherlands.
On Fri, 24 Jan 2003 [EMAIL PROTECTED] wrote:
> Hi guys,
>
> I'm writing a web server for Windows. I want to know how to make it support
> PHP.
>
> Here's the easy bit (which I know how to do)...
> 1) A client requests a web page called "anything.php"
> 2) The server notices the extension ".php", looks this up in the server's
> configuration settings, and says "Aha - this is a PHP script".
> 3) The server runs the PHP script, and sends the output stream back to the
> client.
>
> Here's the bit I _DON'T_ know how to do...
>
> How the hell can my server INITIALISE the superglobal variables $_GET,
> $_POST, $_SERVER, $_SESSION, etc. in preparation for running the script?
>
> ... I mean, it's an easy enough matter to call:
>
> system("php something.php")
>
> to run a PHP script ... but that won't initialise the superglobal variables.
> There doesn't appear to be a command line parameter to php.exe that lets you
> specify this information. So how's it done? How do other web servers do it?
>
> Any suggestion would be appreciated.
>
> Jill
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Hey Jill,
I'm writing a web server for Windows. I want to know how to make it support
PHP.
>
Here's the bit I _DON'T_ know how to do...
How can my server INITIALISE the superglobal variables $_GET,
$_POST, $_SERVER, $_SESSION, etc. in preparation for running the script?
In the binary distribution of PHP for Windows, there is a file called
php4ts.dll. You will need to link your web server to this DLL. It
contains the PHP interpreter. This is the way other SAPI (Server API)
implementations work.
Get the PHP source code, if you don't have it already, and unpack it to
a directory of your choice. In the php-4.3.0 (or whatever) directory,
look in the sapi directory for examples about how PHP interacts with
Apache, ISAPI and other web server extensions. I have done something
similar to what you are doing so you may email me politely (i.e. without
using profane/blasphemous language) if you have any other questions.
--
Best regards,
Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com
--- End Message ---
--- Begin Message ---
Wow! I've only been on this mailing list for about half a hour, and I've
only sent two emails (this is the third). What kind of a reputation do I
have already? And how did I get it? Do you know something I don't? Why
should anyone assume I would ever be anything other than polite?
Should I just quit before this newly acquired reputation becomes my undoing?
Jill
-----Original Message-----
From: Per Lundberg [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 9:44 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Configuring a web server I haven't written yet...
... so you may email me politely (i.e. without
using profane/blasphemous language) if you have any other questions.
--- End Message ---
--- Begin Message ---
Hi!
I'm trying to do something that might not be so very kind if it wasn't known
by those I'm targeting at. ;)
Anyway, I would like to retrive the content of a file I link to using a
querystring like this:
http://www.thebook.dk/showvers.jsp?visaverser=1%20mos+2%3A10 ... Can this be
done? I don't want the page to be opened, but get the information from it
back to me and then extract some of it's content...
btw, %20 is a space character but what is %3A?
.bobo
--- End Message ---
--- Begin Message ---
Ok gurus... how do i configure php to so when i use the mail() function...
it will work? Or maybe a better question is how do i set up my IIS to send
email.
Thanx
--- End Message ---
--- Begin Message ---
Hi!
I need to find the first occurence of a '>' that isn't followed by a '<' or
a '&' in a string and then use the index to extract a substring... How do I
do this?
Anyone?
.bobo
--- End Message ---
--- Begin Message ---
within a do while loop, check for a '>' with the strpos() function
if the next character isn`t a < or a & then you have found the spot to start
extracting from, otherwise...
jettison all of the string up to and including the found '>' with the
substr() function and repeat the process (loop) on the remainder of the
string. The loop quits when you have either found the spot or you run out
of string.
Please note I haven`t checked the above code for syntax errors.
----- Original Message -----
From: "Bobo Wieland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 25, 2003 12:24 AM
Subject: [PHP-WIN] strpos and wildcards
> Hi!
>
> I need to find the first occurence of a '>' that isn't followed by a '<'
or
> a '&' in a string and then use the index to extract a substring... How do
I
> do this?
>
> Anyone?
>
> .bobo
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
01232003 1706 CST
01242003 0742 CST
Look at this:
from the book:
do
{
echo'<br><br>$Auto[$Count]";
$CheckEmpty = "Auto[$Count]";
$Count = $Count + 1;
}
while ($CheckEmpty!="");
if ($Count == 1) echo "Not Applicable";
my attempt to change it:
<?php
$Count=0;
echo "Your cars are:";
do
{
echo"<br><br>$_GET["Auto"][$Count]";
$CheckEmpty = "$_GET["Auto"][$Count]";
$Count = $Count+1;
}
while ($CheckEmpty!="");
if ($Count==1) echo "Not Applicable";
?>
How do you do a double {}?
$_GET because of the GET call
$_GET["Auto"] this is right, right?
but then what with the [$Count}?
Can I do this: $_GET["Auto"[$Count]]";
How do you write an array in an array in a Global Variable place holder?
That doesnt seem possible?
Wade
--- End Message ---
--- Begin Message ---
I just created a simple html form and a .php file as a test to be sure php is working
right. All I want the form to do is test the echo construct (which prints the text
between the opening and closing php tags) to be sure my php interpreter is working
right.
The line in my html form used to identify the method looks like this:
<form action="processorder.php" method=post>
The line in my html form used to trigger the submit button looks like this:
<input type=submit value="Submit Order">
The code in my php file called processorder.php looks like this:
<html>
<head>
<title>Seans Designs - Order Results</title>
</head>
<body>
<h1>Seans products</h1>
<h2>Order Results</h2>
<?
echo "<p>Order processed.";
?>
</body>
</html>
The problem is when I hit the submit button on my form, I see all the text accept for
the text Order processed which is contained in the php tag. In other words, its as if
the echo construct is being completely ignored. I think the problem has something to
do with the register_globals=on or off thing. So, I changed the setting from off
(which was the default setting) to on and restarted apache. No joy!
Is there something in the code that I need to change?
thanks
----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You can
do this if you try. All that I want for you my son, is to be satisfied"
~ Lynard Skynard
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---