OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 16 May 2003 00:54:10 -0000 Issue 2059

php-general-digest-helplists.php.net
Date: Thu May 15 2003 - 19:54:10 CDT


php-general Digest 16 May 2003 00:54:10 -0000 Issue 2059

Topics (messages 147689 through 147846):

Re: Getting data into a web form from a card scanner
        147689 by: Erwin Kerk

Re: php, mysql & stylesheets
        147690 by: Chris Hayes
        147693 by: Brent Baisley

How to get content (POST)
        147691 by: Ŕíňîí
        147692 by: Chris Hayes
        147696 by: Ŕíňîí

Re: help with PHP
        147694 by: JACK M

Re: Your opinion needed
        147695 by: Brent Baisley
        147706 by: Ryan A
        147710 by: Clint Tredway
        147711 by: Ŕíňîí
        147713 by: Miles Thompson
        147733 by: Steve Keller
        147738 by: Pierrick LE GALL
        147741 by: Ernest E Vogelsinger

standard way to comment in the header of the script
        147697 by: electroteque

PHP E-postcards
        147698 by: Kevin Saenz
        147717 by: Philip Hallstrom

Re: test
        147699 by: Awlad Hussain

how to tell the webbrowser that the file was completely sent?
        147700 by: Marco Weber
        147771 by: Marco Weber
        147774 by: Ernest E Vogelsinger
        147775 by: Ernest E Vogelsinger
        147833 by: Marco Weber

Re: Sorry
        147701 by: Ŕíňîí

performance problem with dynamic image compression
        147702 by: Merlin

formmail
        147703 by: Franz Max
        147704 by: Dan Joseph
        147705 by: Adam Voigt

Install PHP4.3.1
        147707 by: Chris Blake
        147709 by: Adam Voigt

credit card packages?
        147708 by: Amanda McComb
        147712 by: Dan Joseph

Re: increment counter by .1
        147714 by: John Coggeshall
        147718 by: Brian V Bonini
        147719 by: Pushpinder Singh Garcha

sessions
        147715 by: s2p.labnet.pl
        147720 by: Pushpinder Singh Garcha
        147724 by: Scott St. John
        147760 by: s2p.labnet.pl
        147761 by: s2p.labnet.pl

problem with mail flags - imap_setflag_full()
        147716 by: s2p.labnet.pl

Sessions help...
        147721 by: Dan Joseph
        147725 by: Van Andel, Robbert
        147726 by: Dan Joseph

Calculating a total price
        147722 by: Scott St. John
        147723 by: Adam Voigt
        147727 by: Adam Voigt
        147728 by: Scott St. John
        147730 by: Scott St. John
        147737 by: Scott St. John

Re: zend engine 2 - nested classes / nested namespaces
        147729 by: Julian Reich
        147763 by: Emil Stenqvist

executing a remote script
        147731 by: Thomas Hochstetter
        147746 by: Kevin Stone

access user account i windows 2000
        147732 by: buttoz

Weird browser bug (I think)
        147734 by: Brian V Bonini
        147747 by: Kevin Stone
        147755 by: John Worsley <jlx.commandprompt.com
        147756 by: Kevin Stone
        147766 by: John Worsley <jlx.commandprompt.com

Strange variable received
        147735 by: César Aracena
        147736 by: César Aracena
        147742 by: Ford, Mike [LSS]
        147745 by: Ernest E Vogelsinger

Re: SSL Keys...]
        147739 by: Mike
        147740 by: Adam Voigt
        147749 by: ruusvuu.whitney.dns2go.com

RE:Your opinion needed
        147743 by: Ryan A
        147769 by: Miles Thompson
        147776 by: Hugh Bothwell

Re: problem with PHP installation
        147744 by: The.Rock
        147750 by: The.Rock
        147768 by: Volker Augustin

Sessions help... the saga continues
        147748 by: Dan Joseph
        147753 by: Kevin Stone
        147770 by: Dan Joseph

Re: E-commerce
        147751 by: ruusvuu.whitney.dns2go.com
        147759 by: Dave List

Re: LAMP Developer/Administrator - Bay Area
        147752 by: Seth Northrop
        147808 by: James

Keeping form fields populated
        147754 by: Brian V Bonini
        147757 by: Steve Keller
        147783 by: Brian V Bonini
        147785 by: Adam Voigt
        147787 by: John Worsley <jlx.commandprompt.com
        147809 by: Brian V Bonini
        147815 by: Steve Keller
        147826 by: Brian V Bonini
        147827 by: Clint Tredway
        147828 by: Steve Keller
        147830 by: Brian V Bonini
        147832 by: Manuel Lemos

Only numbers
        147758 by: Ryan A
        147764 by: Kevin Stone
        147765 by: CPT John W. Holmes
        147767 by: CPT John W. Holmes

Calculating total price in a form
        147762 by: Adagilson Batista Bispo da Silva

php and discid
        147772 by: Antti
        147773 by: Philip Hallstrom

getting array key with implode
        147777 by: Brian V Bonini
        147778 by: Ernest E Vogelsinger
        147788 by: Brian V Bonini

SSL Key Setup
        147779 by: Mike
        147781 by: Jim Lucas

ctype_digit
        147780 by: Ryan A
        147782 by: Dan Joseph
        147784 by: Ryan A

CLI crashes
        147786 by: Comex
        147789 by: John Coggeshall
        147794 by: Comex
        147799 by: John Coggeshall
        147801 by: Comex
        147804 by: Comex
        147805 by: John Coggeshall
        147807 by: Comex
        147811 by: Jason k Larson
        147822 by: Jason k Larson

I am trying to figure out how to get one database to another database.
        147790 by: Grant
        147791 by: John Coggeshall
        147792 by: Grant
        147796 by: Comex
        147817 by: Grant
        147838 by: CPT John W. Holmes

Apache 2 and PHP Source
        147793 by: Jason Young
        147795 by: Comex

Checkbox query
        147797 by: Ryan A
        147800 by: CPT John W. Holmes

Executing CLI scripts as a cron
        147798 by: Ron Dyck
        147806 by: James
        147816 by: Ron Dyck
        147819 by: Adam Voigt

Getting auto_increment's next value
        147802 by: Daniel Stark
        147803 by: Adam Voigt
        147824 by: Tom Woody

New domxml...
        147810 by: Russell P Jones
        147813 by: Jason k Larson

integer to string
        147812 by: Brian V Bonini
        147814 by: Adam Voigt
        147818 by: Steve Keller
        147820 by: Jennifer Goodie
        147821 by: John Coggeshall
        147823 by: Brian V Bonini
        147825 by: Jennifer Goodie

BB question: Read and Unread messages
        147829 by: Simon

Re: WEB HOSTING
        147831 by: Didier McGillis

passing vars back from a remote call
        147834 by: Thomas Hochstetter

Problems with predefined variables
        147835 by: Tomás Liendo

Getting Values from forms
        147836 by: Steven Farrier
        147837 by: Martin Towell
        147839 by: Steve Keller
        147840 by: Leif K-Brooks
        147842 by: Brian V Bonini

PHP 4.3.2RC3 released.
        147841 by: Jani Taskinen

need advice about web page!
        147843 by: karl james
        147844 by: Volker Augustin

Php and filemaker
        147845 by: Miranda, Joel Louie M

Re: need advice about web page! off subject!
        147846 by: karl james

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


If you are running the scanning software on a windows machine, you could
use the following:

We've set up a local AMP, and a commandline scanning utility called
acquire.exe. Thus, we are controlling the scanner (twain) by PHP (exec),
and can do anything we like with the generated image. Sending it to a db
for example.....

Erwin

Denis L. Menezes wrote:

>Hello friends.
>
>I am thinking to make an application where a card scanner(infra red) could read the data and scan into a php form directly database which could then be written into a database.
>
>Is this possible?
>
>Thanks
>Denis
>
>

attached mail follows:


>
>>Hello,
>>I have a small script that retrives names from MySQL database and displays
>>the information on a web page.
>>I've tried to use stylesheet to format the output with no success. I can't
>>get it to read the style sheet.
>>link to style sheet is like this
>><head>
>><LINK rel="stylesheet" href="style.css" type="text/css">
       <link rel="stylesheet" href="themes/sense/style/style.css"
type="text/css">
Comparing our tags i can only think you either have some problem before
with non-closed quotes in earlier lines (check the produced page source) or
maybe your style.css file is in a subdirectory?

Did you realise that when you include something in a PHP file, the relative
path is still that of the path in the URL?
Eg if you have http://site.com/index.php

which includes
site.com/html/page1.html

which has the link
<LINK rel="stylesheet" href="style.css" type="text/css">

then the style.css fiel is looked for in site.com/style.css
and not in site.com/html/style.css

hth,
Chris

>></head>
>>Is there something Ishoud know about dynamic web pages and stylesheets?
>>Cause I've been using stylesheet for quite some time now and I never had any
>>problems with static pages.

attached mail follows:


Your problem may be in the web server caching your stylesheet file. I
ran into this problem when I first started seriously using stylesheets.
I would change some style attributes that wouldn't get reflected on the
next page load. I now embed the style information via an include until
I get things looking the way I want. Then I put it in an external style
file. Just a possibility.

On Thursday, May 15, 2003, at 04:32 AM, Kalle Saarinen wrote:

> Hello,
>
> I have a small script that retrives names from MySQL database and
> displays
> the information on a web page.
> I've tried to use stylesheet to format the output with no success. I
> can't
> get it to read the style sheet.
>
> link to style sheet is like this
>
> <head>
> <LINK rel="stylesheet" href="style.css" type="text/css">
> </head>
>
> Is there something Ishoud know about dynamic web pages and stylesheets?
> Cause I've been using stylesheet for quite some time now and I never
> had any
> problems with static pages.
>
> Thank You
>
> Kalle
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

attached mail follows:


Hello

I can get "Content-Length" using getallheaders().
How can I get content which is sent to my script?

--
thanks,
sorry fo bad english
 Anton

attached mail follows:


At 14:19 15-5-03, you wrote:
>I can get "Content-Length" using getallheaders().
>How can I get content which is sent to my script?

Using forms is a good way:
http://www.php.net/manual/en/tutorial.forms.php

attached mail follows:


Hi Chris.

>>I can get "Content-Length" using getallheaders().
>>How can I get content which is sent to my script?

CH> Using forms is a good way:
CH> http://www.php.net/manual/en/tutorial.forms.php

I want to get full HTTP request beacause I'm going to send it to other
host with a few changes. Therefore I don't want to join parts of
$_POST. I need an universal program.

Anton

attached mail follows:


I have 2 forms that are not sending email. I know the server is working and
the email is working because there are other forms using php that are
working. I can email the html pages and the php pages to you. Could you take
a look and let me know what the problem is?

Thanks,
Jack
----- Original Message -----
From: "Mike" <php-digestcustom87.net>
To: "JACK M" <jackmiwdnet.com>
Sent: Wednesday, May 14, 2003 1:46 PM
Subject: Re: [PHP] help with PHP

> What for?
>
> -Michael
> On Wed, 2003-05-14 at 09:43, JACK M wrote:
> > I need someone that is experienced in php. Can you help me? Please
reply or call me at 516 889 9671
> > >
> > > Thanx
> > > Jack
>
>
>
>

attached mail follows:


It depends on what your goal is. If you want you code to be the fastest
it can possibly, then you write it in a assembly language. Most people,
me included, don't want to be assembly language programmers. Using a
scripting language like PHP allows you to build things much quicker,
but it's definitely not as fast as C/C++.
Dreamweaver will allow you to build things quicker, but will run slower
than hand tuned code. If you want to improve your PHP skills and will
continue doing projects in PHP, then I would drop Dreamweaver. If you
more concerned with delivering a functional end product, keep
Dreamweaver. But remember that whatever you create in Dreamweaver won't
scale as well on hand tuned code (depending on your skill).

Although I would suggest using something besides Notepad.

On Thursday, May 15, 2003, at 05:13 AM, Ryan A wrote:

> I have just started working with Dreamweaver MX -> PHP/MySql and need
> your
> opinion.
> The advanage of using DWMX with PHP/MySql is of course speed, I can
> write
> scripts to insert/delete/edit etc in seconds and they execute
> perfectly with
> or without magic_quotes or globals, this would normally take me an
> hour or
> more, those headaches are taken away from me *BUT*
> for every little operation (insert/delete etc) it writes around double
> or
> more of what I would normally write (bloatware...?)
>
> My question is....do you think it is worth it? or should i go back to
> writing everything by hand in its codeview/notepad/some editor??
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

attached mail follows:


Hi everyone,
thank you for clearing up my little doubt, After reading all you guys wrote
along with the reasons it seems pretty obvious that Dreamweaver is not the
best option.

I have decided to check out EditPlus and work with that.
If any of you have anything to say about EditPlus or why its not the best
choice for me...(like Dr. Frasier says: )...I'm listening.
:-)

Cheers all and have a great day.
-Ryan

attached mail follows:


On windows, I would like to add NoteTab (www.notetab.com)

While its syntax highlighting is not as robust as EditPlus, its Clip
Language is by far its greatest asset.

I have written many clips that automate my script building and let me put in
variables where needed then it spits out the code that I wrote in seconds.

EditPlus has ClipText, and you can do some stuff, its not nearly as robust
as NoteTab's.

Right now, NoteTab is being re-written to have fully customizable
highlighting and other tweaks. I am not sure when they are releasing the new
version, but I will get it when it comes out.

Clint

-----Original Message-----
From: Ryan A [mailto:ryanjumac.com]
Sent: Thursday, May 15, 2003 9:27 AM
To: php-generallists.php.net
Subject: [PHP] RE: Your opinion needed

Hi everyone,
thank you for clearing up my little doubt, After reading all you guys wrote
along with the reasons it seems pretty obvious that Dreamweaver is not the
best option.

I have decided to check out EditPlus and work with that.
If any of you have anything to say about EditPlus or why its not the best
choice for me...(like Dr. Frasier says: )...I'm listening.
:-)

Cheers all and have a great day.
-Ryan

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

attached mail follows:


Hi

I use PHP Expert Editor (www.ankord.com) to edit PHP code. Try it.

RA> Hi everyone,
RA> thank you for clearing up my little doubt, After reading all you guys wrote
RA> along with the reasons it seems pretty obvious that Dreamweaver is not the
RA> best option.

RA> I have decided to check out EditPlus and work with that.
RA> If any of you have anything to say about EditPlus or why its not the best
RA> choice for me...(like Dr. Frasier says: )...I'm listening.
RA> :-)

RA> Cheers all and have a great day.
RA> -Ryan

--
Ń óâŕćĺíčĺě,
 Ŕíňîí mailto:antonartprom.ru

attached mail follows:


Well, here's a take on three of 'em.

For years I've sued UltraEdit, and been really happy - it's a v.good,
v.complete editor. The latest version has an FTP client, and it has true
hex editing mode. Useful if you have to take a cloe look at something and
fix it.

Last time this issue was raised, a lot of people posted v. strongly in
favour of EditPlus. Downloaded a copy, and began using it - on the first
project where I've not had control of the server, and had to edit files
remotely. EP has a built-in, nearly transparent FTP client - click on the
file to edit, it downloads; save, and it uploads. Plus it has the
convenience of buttons to bang in frequently used HTML tags. Pretty good.

Plus it has a VERY NICE wrap feature, so one doesn't have to go trailing
way off to the right. VERY GOOD.

I've been using it for 28 days and really like it. Plus-HTML tags,
wrapping; Con - doesn't do hex as well as UE.

A couple of people promoted jEdit - I've downloaded it and played a bit. I
don't like the default font, I can't easily figure out how to
configure/change thngs, it's slow to load compared to the previous two
(althouhg this is really a non-issue, as once-opened an editor stays open)
but more critically, I've not figured out how to enable PHP mode, which is
transparently easy on the other two. Don't take this as criticism, I've
been a bit impatient, but it seems, quite rightly, to be very Java oriented.

So, where do I stand? I'll always have UltraEdit on my system, and I'm
about to fork out for EditPlus. And lately it's the latter I've been
opening for PHP editing.

Cheers - Miles Thompson

PS I downloaded the trial of DreamWeaver - and just felt lost. I'll admit
to using Netscape composer to quickly chuck a site together, or it it has
to be "artier" I'll use Paint Shop Pro and slice it, then work from there. /mt

PPS Yes, played with HTMLkit and Bluefish - they left me feeling neutral. /mt

At 04:27 PM 5/15/2003 +0200, Ryan A wrote:
>Hi everyone,
>thank you for clearing up my little doubt, After reading all you guys wrote
>along with the reasons it seems pretty obvious that Dreamweaver is not the
>best option.
>
>I have decided to check out EditPlus and work with that.
>If any of you have anything to say about EditPlus or why its not the best
>choice for me...(like Dr. Frasier says: )...I'm listening.
>:-)
>
>Cheers all and have a great day.
>-Ryan
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


At 5/15/2003 11:13 AM, Ryan A wrote:

> I have just started working with Dreamweaver MX -> PHP/MySql and need your
> opinion.

Well, Ryan, most of the replies here have focused on runtime, but there's
another reason I don't like do-it-for-me editors: maintenance. if you need
to slap together a few pages in a hurry that you'll never touch again, then
DreamWeaver is the way to go. But, if you will be doing constant
maintenance on those pages or, heaven forbid, someone *else* might have to
maintain those pages, then realize that DreamWeaver is the only way to do
so without spending, literally, hours fishing through the code it
generates. If you want to use DreamWeaver for the rest of the project, then
go for it, but otherwise you're far better off doing it yourself in clean,
readable code.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skellerhealthtvchannel.org
Web: www.healthtvchannel.org

attached mail follows:


"Ryan A" <ryanjumac.com> writes:

> I have decided to check out EditPlus and work with that.
> If any of you have anything to say about EditPlus or why its not the best
> choice for me...(like Dr. Frasier says: )...I'm listening.
> :-)

Am I the only PHP developper to use GNU emacs ? I found it very
powerful. When I was working with Microsoft Windows, I bought UltraEdit
(I still have the license) and I was used to work with it. UltraEdit is
very efficient is think. But it's far from GNU emacs, that's my opinion
! I just advise you to try it, and at the opposite of UltraEdit and
EditPlus, GNU emacs is a free software. You can continue to use it after
30 days. Quite interesting for many of you I think.

bye

--
Pierrick LE GALL | http://www.z0rglub.com
<pierrickz0rglub.com> | http://www.phpwebgallery.net

attached mail follows:


At 16:46 15.05.2003, Miles Thompson said:
--------------------[snip]--------------------
>For years I've sued UltraEdit, and been really happy - it's a v.good,
>v.complete editor. The latest version has an FTP client, and it has true
>hex editing mode. Useful if you have to take a cloe look at something and
>fix it.
--------------------[snip]--------------------

So why in the world did you sue them?

*bg* sorry couldn't resist, this one's too good ... :-})

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


hi there i was wondering what the most standard way was to comment the
header of each script with information , possible phpdoc compliant , let me
know thanks.

attached mail follows:


Firstly I would like to thank everyone who offered
suggestions to my question on leeching news from
a news site. I was forced to reinvent the wheel
if anyone would like the code I am more than
happy to share it.

Now I have a new question can anyone please direct
me to some sample code of php based E-postcards.

Thanks

Kevin

attached mail follows:


look on zend.com in the applications area.

On Thu, 15 May 2003, Kevin Saenz wrote:

> Firstly I would like to thank everyone who offered
> suggestions to my question on leeching news from
> a news site. I was forced to reinvent the wheel
> if anyone would like the code I am more than
> happy to share it.
>
> Now I have a new question can anyone please direct
> me to some sample code of php based E-postcards.
>
> Thanks
>
> Kevin
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


If you want people to answer your question, write meaning full subject like
"HTTP headers"
otherwise people would just ignore your post,

----- Original Message -----
From: "Ŕíňîí" <antonartprom.ru>
To: <php-generallists.php.net>
Sent: Thursday, May 15, 2003 12:11 PM
Subject: [PHP] test

> Hi
>
> How can I get all HTTP headers which is sent to my script?
>
>
> --
> thanx
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hi,

i've got a little problem:
the browser prints in the statusbar 'loading page' as long as the PHP-Script
is working...
the browser just begins to run my javascript, when it has finnished
loading...
is it possible to tell the webbrowser, that the webpage is fully
transmitted, althought the script keeps on working?

here is a more detailed description:
i'm building up the page and sending the whole webpage to the webbrowser...
now the php-script must do some synchrinizing work with my 2nd server and
this can take up to 5 seconds...
and that's where the normal internet user is expieriencing problems: the
javascript menu doesn't startup until the webbrowser gets the signal, that
the php script has finished its work...
that's why the java-script menu needs up to 5 seconds until it get
displayed... :(

what can i do?

thanks in advnace for any help... :)

MFG Marco

attached mail follows:


Hi,

i've got a little problem:
the browser prints in the statusbar 'loading page' as long as the PHP-Script
is working...
the browser just begins to run my javascript, when it has finnished
loading...
is it possible to tell the webbrowser, that the webpage is fully
transmitted, althought the script keeps on working?

here is a more detailed description:
i'm building up the page and sending the whole webpage to the webbrowser...
now the php-script must do some synchrinizing work with my 2nd server and
this can take up to 5 seconds...
and that's where the normal internet user is expieriencing problems: the
javascript menu doesn't startup until the webbrowser gets the signal, that
the php script has finished its work...
that's why the java-script menu needs up to 5 seconds until it get
displayed... :(

what can i do?

thanks in advnace for any help... :)

MFG Marco

attached mail follows:


At 21:23 15.05.2003, Marco Weber said:
--------------------[snip]--------------------
>the browser prints in the statusbar 'loading page' as long as the PHP-Script
>is working...
>the browser just begins to run my javascript, when it has finnished
>loading...
>is it possible to tell the webbrowser, that the webpage is fully
>transmitted, althought the script keeps on working?
--------------------[snip]--------------------

The browser will wait for data until the connection is closed, or until the
expected amount of data has been received (MIME-header "Content-length").

Usually the webserver cannot tell the size of the content since it's
generated dynamically; but you can circumvent this by creating the header
within your script.

Try this:

<?php
    // very start of the script
    ob_start(); // turn on output buffering
    // ... all your script that's generating output

    // now transmit the final page
    $data = ob_get_contents(); // get buffered output
    ob_end_clean(); // clean ob buffer and end buffering
    // make sure all browsers will have their buffers filled
    $data .= str_repeat(' ', 512) . "\n";

    // construct the length header and transmit
    header('Content-length: ' . strlen($data));
    echo $data;
    flush();

    // the browser has received all data it expects and should regard
    // the page finished, we can continue
?>

but note that I cannot guarantee that the "loading" bar will disappear in
all browsers, some could simply wait for the connection to be closed which
will happen at the end of the script.

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


Note that the should read

   header('Content-Length: ' . strlen($data));

to be completely MIME-compliant (note the uppercasing of the letter 'L')

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


Hi,
that's a very good idea...
i gonna try this one...

but i've came now to another idea:
is it possible to create another process, that indepenently runs from the
parent script, so that the parent script can be terminated?

thanks in advance for any help...

- Marco -

attached mail follows:


AH> If you want people to answer your question, write meaning full subject like
AH> "HTTP headers"
AH> otherwise people would just ignore your post,

Sorry

Anton

attached mail follows:


Hello everybody,

I would like to add dynamic image quality and dynamice image size to my
application. Currently the images are
stored on the file system. Now I have created a php file which is changing
the image as I like it and then outputs it to the browser.
The code works great.

Problem: Performance is verry bad. On my celeron 1.7 Ghz test system it
takes about 0.5 to 1 s to display the image. In production
with lots of other users and a 1 GHZ celeron it would be even worse. H

Has anybody an idea on how to increase this performance? My code is
underneath and I do not know on how to make it more performant. Code woks,
but as I said it takes to long.

Thank you for any hint,

Merlin

Code for dynamic compression and dynamic image size:

$inputImg = ImageCreateFromJPEG($picture_location);

###############
# resize

  # old size
  $srcX = imagesx($inputImg);
  $srcY = imagesy($inputImg);

   # new size
   $ratio = ($srcX / $maxX);
   $dstY = ($srcY / $ratio);

    $picX = $maxX;
    $picY = ($maxX / ($srcX / $srcY));
    $outputImg = ImageCreateTrueColor($maxX, $dstY);
    imagefill($outputImg, 0, 0, ImageColorAllocate($outputImg, 0, 0,0));

   imagecopyresampled($outputImg, $inputImg, $posX, $posY,0,0, $picX, $picY,
$srcX, $srcY);

############################################################################
####################
# output
header("Content-type: $file[type]");
imagejpeg($outputImg,'',$file[compression]);
############################################################################
####################

attached mail follows:


Hi All,

I have got a form that I want to send as mail to an address. I can't use the
MAILTO method, because it requires a mail client on the users machine. Most
of my clients do not have mail client, they use any webmail provider as
well.

How can I send the form as mail, if there is no php installed on my server?
But I can use an another server with php installed.

I've put in the form tag the target... If I hit the submit button, a new
window will be open with this address line:

http://www.myserver.hu/reporttocs.html?uname=THENAME&clanname=CLAN&emailaddr=CCC.COM&mobile=06012301232&polosize=S&agreecheck=on&submit=Elk%FCld

So the phpmail.php can't get the form fields. WHYYYYY?

The form is:

<FORM target="http://www.softbolt.hu/phpmail.php" onsubmit="return
formCheck(this);">
<TABLE width=100%>
 <tr><td class="verdana10" align="right">Név:
  <td align="left"><INPUT TYPE="text" NAME="uname" MAXLENGTH="30" >
 <tr><td class="verdana10" align="right">Klán neve:
  <td align="left"><INPUT TYPE="text" NAME="clanname" MAXLENGTH="30" >
 <tr><td class="verdana10" align="right">Te vagy a klánvezér?
  <td align="left"><INPUT TYPE="checkbox" NAME="leader" >
 <tr><td class="verdana10" align="right">e-mail cím:
  <td align="left"><INPUT TYPE="text" NAME="emailaddr" VALUE="">
 <tr><td class="verdana10" align="right">Mobilszám:
  <td align="left"><INPUT TYPE="text" NAME="mobile" VALUE="06">
 <tr><td class="verdana10" align="right">Pólóméretem:
  <td align="left"><SELECT NAME="polosize"><OPTION VALUE="S">S<OPTION
VALUE="M">M<OPTION VALUE="L">L<OPTION VALUE="XL">XL<OPTION
VALUE="XXL">XXL</SELECT>
 <tr><td class="verdana10" align="right">A szabályokat elfogadom
  <td align="left"><INPUT TYPE="checkbox" NAME="agreecheck"
onClick="agreesubmit(this)">
 <tr><td>&nbsp;
  <td align="left"><INPUT TYPE="submit" NAME="submit" VALUE="Elküld"
disabled>
 <tr><td>&nbsp;
  <td class="verdana10" align="left"><a
href="javascript:window.close();">bezár</a>
</TABLE>
</FORM>
-------------

Here is my phpmail.php:
------------
<?php
$to = "infomatrix-cafe.hu";
$subject = "Jelentkezési lap";
$body = "";

if( $_POST['cname'] ) {
 $body = sprintf( "Nevező: %s\n", $_POST['uname'] );
}

if( $_POST['clanname'] ) {
 $body. = sprintf( "Klán : %s\n", $_POST['clanname'] );
}

if( $_POST['leader'] ) {
 if( $_POST['leader'] == 'on' ) {
 $body. = "Klánvezér\n";
}

if( $_POST['emailaddr'] ) {
 $body. = sprintf( "email : %s\n", $_POST['emailaddr'] );
}

if( $_POST['mobile'] ) {
 $body. = sprintf( "mobil : %s\n", $_POST['mobile'] );
}

if( $_POST['polosize'] ) {
 $body. = sprintf( "póló : %s\n", $_POST['polosize'] );
}

$rt = mail($to, $subject, $body,
     "From: webmaster$SERVER_NAME\r\n"
    ."Reply-To: webmaster$SERVER_NAME\r\n"
    ."X-Mailer: PHP/" . phpversion()););
?>
-------

Thanx for any answer

regards
Franz

attached mail follows:


Hi Franz,

        use $_GET instead of $_POST, and that will solve you problem. Anything
coming thru the URL is a $_GET, anything submitted from a web page form is
$_POST.

-Dan Joseph

> -----Original Message-----
> From: Franz Max [mailto:fbuzasmatrix-cafe.hu]
> Sent: Thursday, May 15, 2003 9:48 AM
> To: php-generallists.php.net
> Subject: [PHP] formmail
>
>
> Hi All,
>
> I have got a form that I want to send as mail to an address. I
> can't use the
> MAILTO method, because it requires a mail client on the users
> machine. Most
> of my clients do not have mail client, they use any webmail provider as
> well.
>
> How can I send the form as mail, if there is no php installed on
> my server?
> But I can use an another server with php installed.
>
> I've put in the form tag the target... If I hit the submit button, a new
> window will be open with this address line:
>
> http://www.myserver.hu/reporttocs.html?uname=THENAME&clanname=CLAN
> &emailaddr=CCC.COM&mobile=06012301232&polosize=S&agreecheck=on&su
> bmit=Elk%FCld
>
> So the phpmail.php can't get the form fields. WHYYYYY?
>
> The form is:
>
> <FORM target="http://www.softbolt.hu/phpmail.php" onsubmit="return
> formCheck(this);">
> <TABLE width=100%>
> <tr><td class="verdana10" align="right">Név:
> <td align="left"><INPUT TYPE="text" NAME="uname" MAXLENGTH="30" >
> <tr><td class="verdana10" align="right">Klán neve:
> <td align="left"><INPUT TYPE="text" NAME="clanname" MAXLENGTH="30" >
> <tr><td class="verdana10" align="right">Te vagy a klánvezér?
> <td align="left"><INPUT TYPE="checkbox" NAME="leader" >
> <tr><td class="verdana10" align="right">e-mail cím:
> <td align="left"><INPUT TYPE="text" NAME="emailaddr" VALUE="">
> <tr><td class="verdana10" align="right">Mobilszám:
> <td align="left"><INPUT TYPE="text" NAME="mobile" VALUE="06">
> <tr><td class="verdana10" align="right">Pólóméretem:
> <td align="left"><SELECT NAME="polosize"><OPTION VALUE="S">S<OPTION
> VALUE="M">M<OPTION VALUE="L">L<OPTION VALUE="XL">XL<OPTION
> VALUE="XXL">XXL</SELECT>
> <tr><td class="verdana10" align="right">A szabályokat elfogadom
> <td align="left"><INPUT TYPE="checkbox" NAME="agreecheck"
> onClick="agreesubmit(this)">
> <tr><td>&nbsp;
> <td align="left"><INPUT TYPE="submit" NAME="submit" VALUE="Elküld"
> disabled>
> <tr><td>&nbsp;
> <td class="verdana10" align="left"><a
> href="javascript:window.close();">bezár</a>
> </TABLE>
> </FORM>
> -------------
>
> Here is my phpmail.php:
> ------------
> <?php
> $to = "infomatrix-cafe.hu";
> $subject = "Jelentkezési lap";
> $body = "";
>
> if( $_POST['cname'] ) {
> $body = sprintf( "Nevező: %s\n", $_POST['uname'] );
> }
>
> if( $_POST['clanname'] ) {
> $body. = sprintf( "Klán : %s\n", $_POST['clanname'] );
> }
>
> if( $_POST['leader'] ) {
> if( $_POST['leader'] == 'on' ) {
> $body. = "Klánvezér\n";
> }
>
> if( $_POST['emailaddr'] ) {
> $body. = sprintf( "email : %s\n", $_POST['emailaddr'] );
> }
>
> if( $_POST['mobile'] ) {
> $body. = sprintf( "mobil : %s\n", $_POST['mobile'] );
> }
>
> if( $_POST['polosize'] ) {
> $body. = sprintf( "póló : %s\n", $_POST['polosize'] );
> }
>
> $rt = mail($to, $subject, $body,
> "From: webmaster$SERVER_NAME\r\n"
> ."Reply-To: webmaster$SERVER_NAME\r\n"
> ."X-Mailer: PHP/" . phpversion()););
> ?>
> -------
>
> Thanx for any answer
>
> regards
> Franz
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


When you use the variable's in a URL, it's
$_GET, not $_POST. Change your code to reflect this.

On Thu, 2003-05-15 at 09:47, Franz Max wrote:
> Hi All,
>
> I have got a form that I want to send as mail to an address. I can't use the
> MAILTO method, because it requires a mail client on the users machine. Most
> of my clients do not have mail client, they use any webmail provider as
> well.
>
> How can I send the form as mail, if there is no php installed on my server?
> But I can use an another server with php installed.
>
> I've put in the form tag the target... If I hit the submit button, a new
> window will be open with this address line:
>
> http://www.myserver.hu/reporttocs.html?uname=THENAME&clanname=CLAN&emailaddr=CCC.COM&mobile=06012301232&polosize=S&agreecheck=on&submit=Elk%FCld
>
> So the phpmail.php can't get the form fields. WHYYYYY?
>
> The form is:
>
> <FORM target="http://www.softbolt.hu/phpmail.php" onsubmit="return
> formCheck(this);">
> <TABLE width=100%>
> <tr><td class="verdana10" align="right">Nv:
> <td align="left"><INPUT TYPE="text" NAME="uname" MAXLENGTH="30" >
> <tr><td class="verdana10" align="right">Kln neve:
> <td align="left"><INPUT TYPE="text" NAME="clanname" MAXLENGTH="30" >
> <tr><td class="verdana10" align="right">Te vagy a klnvezr?
> <td align="left"><INPUT TYPE="checkbox" NAME="leader" >
> <tr><td class="verdana10" align="right">e-mail cm:
> <td align="left"><INPUT TYPE="text" NAME="emailaddr" VALUE="">
> <tr><td class="verdana10" align="right">Mobilszm:
> <td align="left"><INPUT TYPE="text" NAME="mobile" VALUE="06">
> <tr><td class="verdana10" align="right">Plmretem:
> <td align="left"><SELECT NAME="polosize"><OPTION VALUE="S">S<OPTION
> VALUE="M">M<OPTION VALUE="L">L<OPTION VALUE="XL">XL<OPTION
> VALUE="XXL">XXL</SELECT>
> <tr><td class="verdana10" align="right">A szablyokat elfogadom
> <td align="left"><INPUT TYPE="checkbox" NAME="agreecheck"
> onClick="agreesubmit(this)">
> <tr><td>&nbsp;
> <td align="left"><INPUT TYPE="submit" NAME="submit" VALUE="Elkld"
> disabled>
> <tr><td>&nbsp;
> <td class="verdana10" align="left"><a
> href="javascript:window.close();">bezr</a>
> </TABLE>
> </FORM>
> -------------
>
> Here is my phpmail.php:
> ------------
> <?php
> $to = "infomatrix-cafe.hu";
> $subject = "Jelentkezsi lap";
> $body = "";
>
> if( $_POST['cname'] ) {
> $body = sprintf( "Nevez: %s\n", $_POST['uname'] );
> }
>
> if( $_POST['clanname'] ) {
> $body. = sprintf( "Kln : %s\n", $_POST['clanname'] );
> }
>
> if( $_POST['leader'] ) {
> if( $_POST['leader'] == 'on' ) {
> $body. = "Klnvezr\n";
> }
>
> if( $_POST['emailaddr'] ) {
> $body. = sprintf( "email : %s\n", $_POST['emailaddr'] );
> }
>
> if( $_POST['mobile'] ) {
> $body. = sprintf( "mobil : %s\n", $_POST['mobile'] );
> }
>
> if( $_POST['polosize'] ) {
> $body. = sprintf( "pl : %s\n", $_POST['polosize'] );
> }
>
> $rt = mail($to, $subject, $body,
> "From: webmaster$SERVER_NAME\r\n"
> ."Reply-To: webmaster$SERVER_NAME\r\n"
> ."X-Mailer: PHP/" . phpversion()););
> ?>
> -------
>
> Thanx for any answer
>
> regards
> Franz
>
>
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Greetings learned PHP(eople),

Trying to install PHP 4.3.1. on my system.
Having some trouble.

According to INSTALL file here`s what I must do

$ gunzip -c php-4.x.y.tar.gz | tar xf -
$ cd php-4.x.y
$ ./configure --with-mysql --with-apxs
$ make
$ make install

After typing ./configure etc etc it starts and then produces the
following :
======================================================================
[rootpb004 php-4.3.1]# ./configure --with-mysql --with-apxs --with-gd
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for working sed... sed
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the
PHP parsers.
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 2482: lex: command
not found
configure: error: cannot find output from lex; giving up
=======================================================================
I checked the troubleshooting docs for occurrences of lex but no joy.
Do I need bison.......what is bison ?

Is this PHP or Linux missing something ?

--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
286 emulator for Pentium IV released. It`s called Windows NT.

attached mail follows:


I don't think so on the Bison.
Yes, on the lex.

On Redhat, if you have up2date, use:

up2date -i flex

Or grab the RPM, if using debian, apt get it.

On Thu, 2003-05-15 at 10:31, Chris Blake wrote:
> Greetings learned PHP(eople),
>
> Trying to install PHP 4.3.1. on my system.
> Having some trouble.
>
> According to INSTALL file here`s what I must do
>
> $ gunzip -c php-4.x.y.tar.gz | tar xf -
> $ cd php-4.x.y
> $ ./configure --with-mysql --with-apxs
> $ make
> $ make install
>
> After typing ./configure etc etc it starts and then produces the
> following :
> ======================================================================
> [rootpb004 php-4.3.1]# ./configure --with-mysql --with-apxs --with-gd
> loading cache ./config.cache
> checking for Cygwin environment... no
> checking for mingw32 environment... no
> checking for working sed... sed
> checking host system type... i686-pc-linux-gnu
> checking for gcc... gcc
> checking whether the C compiler (gcc ) works... yes
> checking whether the C compiler (gcc ) is a cross-compiler... no
> checking whether we are using GNU C... yes
> checking whether gcc accepts -g... yes
> checking whether gcc and cc understand -c and -o together... yes
> checking how to run the C preprocessor... gcc -E
> checking for AIX... no
> checking if compiler supports -R... no
> checking if compiler supports -Wl,-rpath,... yes
> checking for ranlib... ranlib
> checking whether ln -s works... yes
> checking for gawk... gawk
> checking for bison... no
> checking for byacc... no
> configure: warning: You will need bison if you want to regenerate the
> PHP parsers.
> checking for flex... lex
> checking for yywrap in -ll... no
> checking lex output file root... ./configure: line 2482: lex: command
> not found
> configure: error: cannot find output from lex; giving up
> =======================================================================
> I checked the troubleshooting docs for occurrences of lex but no joy.
> Do I need bison.......what is bison ?
>
> Is this PHP or Linux missing something ?
>
> --
> Chris Blake
> Office : (011) 782-0840
> Cell : 083 985 0379
> 286 emulator for Pentium IV released. It`s called Windows NT.
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Does anyone know of a place I could download a php module that deals with
all the intricacies of credit cards?

ALso, is there a book or site anyone would recommend on security with PHP?

Thanks.

attached mail follows:


Hi,

        Do a google search on '"Credit Card Validation" +php'. You'll find a few
things listed for this.

        As for security, phpadvisory.com is _ok_. Best thing to do is make sure
you have register_globals off, handle all exceptions, exit() after all
header redirects, and validate all form input before it gets submitted.

-Dan Joseph

> -----Original Message-----
> From: Amanda McComb [mailto:amccombindiana.edu]
> Sent: Thursday, May 15, 2003 10:31 AM
> To: php-generallists.php.net
> Subject: [PHP] credit card packages?
>
>
> Does anyone know of a place I could download a php module that deals with
> all the intricacies of credit cards?
>
> ALso, is there a book or site anyone would recommend on security with PHP?
>
> Thanks.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


> Yes, that worked, thanks. What is += ? It says nothing in the
> ¡Incrementing/Decrementing Operators section of the manual.

Um..

http://www.php.net/manual/en/language.operators.assignment.php

:)

John
 
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


On Wed, 2003-05-14 at 18:31, John Coggeshall wrote:
> > is it possible to increment a counter by .1?
>
> $i += 0.1;
>

Yes, that worked, thanks. What is += ? It says nothing in the
ˇIncrementing/Decrementing Operators section of the manual.

attached mail follows:


i += 1 is similar to writing i = i+1;

hth
--pushpinder

On Thursday, May 15, 2003, at 09:50 AM, Brian V Bonini wrote:

> On Wed, 2003-05-14 at 18:31, John Coggeshall wrote:
>>> is it possible to increment a counter by .1?
>>
>> $i += 0.1;
>>
>
> Yes, that worked, thanks. What is += ? It says nothing in the
> ˇIncrementing/Decrementing Operators section of the manual.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


sessions

hi.

i have a problem.
does anybody know how to write a script which
will make a new file (i know how to do this,
it's only an example) with some text when
the session will be closed (when user close all
browser windows.break current session).

please help me.

s2p.

attached mail follows:


try this .... after closing the session

start of code ......

  if (session_is_registered())
{
   ...... create a new file here ...and write whatever needs to go in
it.....
......
...
..
.
}

hth
--pushpinder

On Thursday, May 15, 2003, at 11:23 AM, <s2plabnet.pl> wrote:

> sessions
>
> hi.
>
> i have a problem.
> does anybody know how to write a script which
> will make a new file (i know how to do this,
> it's only an example) with some text when
> the session will be closed (when user close all
> browser windows.break current session).
>
> please help me.
>
> s2p.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


You mean:

session_destroy();

?

At 05:23 PM 5/15/2003 +0200, s2plabnet.pl wrote:
>sessions
>
>hi.
>
>i have a problem.
>does anybody know how to write a script which
>will make a new file (i know how to do this,
>it's only an example) with some text when
>the session will be closed (when user close all
>browser windows.break current session).
>
>please help me.
>
>s2p.
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

------------------------------------------------------------------------------
Scott St. John, Technical Evangelist
Talon Network Services, Inc.
WorkURL: www.talon.net
HomeURL: www.scottah.com
AIM: scottstjohn102

attached mail follows:


Hello Scott,

this function destroy all session variables.

i need some code which will detect that user brake whole session
(close all browser windows with current session)
and then write some information to file...

s2p.

Thursday, May 15, 2003, 6:17:40 PM, you wrote:

SSJ> You mean:

SSJ> session_destroy();

SSJ> ?

SSJ> At 05:23 PM 5/15/2003 +0200, s2plabnet.pl wrote:
>>sessions
>>
>>hi.
>>
>>i have a problem.
>>does anybody know how to write a script which
>>will make a new file (i know how to do this,
>>it's only an example) with some text when
>>the session will be closed (when user close all
>>browser windows.break current session).
>>
>>please help me.
>>
>>s2p.
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php

SSJ> ------------------------------------------------------------------------------
SSJ> Scott St. John, Technical Evangelist
SSJ> Talon Network Services, Inc.
SSJ> WorkURL: www.talon.net
SSJ> HomeURL: www.scottah.com
SSJ> AIM: scottstjohn102

--
Best regards,
 s2p mailto:s2plabnet.pl

attached mail follows:


Hello Pushpinder,

but it doesn't want to work.
this function needs and parameter which is a variable.

' Warning: Wrong parameter count for session_is_registered() '

i need some code which will detect that user brake whole session
(close all browser windows with current session)
and then write some information to file...

s2p.

Thursday, May 15, 2003, 5:40:21 PM, you wrote:

PSG> try this .... after closing the session

PSG> start of code ......

PSG> if (session_is_registered())
PSG> {
PSG> ...... create a new file here ...and write whatever needs to go in
PSG> it.....
PSG> ......
PSG> ...
PSG> ..
PSG> .
PSG> }

PSG> hth
PSG> --pushpinder

PSG> On Thursday, May 15, 2003, at 11:23 AM, <s2plabnet.pl> wrote:

>> sessions
>>
>> hi.
>>
>> i have a problem.
>> does anybody know how to write a script which
>> will make a new file (i know how to do this,
>> it's only an example) with some text when
>> the session will be closed (when user close all
>> browser windows.break current session).
>>
>> please help me.
>>
>> s2p.
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>

--
Best regards,
 s2p mailto:s2plabnet.pl

attached mail follows:


problem with mail flags - imap_setflag_full()

hi.
i'm writing a website based e-mail client.
but i have a problem with flags.

when someone open a message flag should be set
as '//Seen'.when i do that everything is
correct.
but when i back to main site with index of INBOX folder
flags are still empty.

what's the reason that i can't write flags value ???

s2p.

attached mail follows:


Hi All,

        I have been working for 2 days on a simple script. I even find it hard to
believe that I cannot figure this out, so I am turning to the community to
try and find an answer. First, some code (all from the same script):

$region = mysql_fetch_array ($template_res);

foreach ($region as $name => $value) {
        $r_name = str_replace("_", "", $name);
        $tmpl->$r_name = $value;
        $_SESSION[$r_name] = $value;
}

This piece loads all the database variables that I pulled out into sessions.

I am using:

foreach ($_SESSION as $name => $value) {
        echo "$name => $value<br>";
}

to see an output of what I just created.

I get:

0 => NEVD
region => NEVD
1 => Nevada Bell
brandname => Nevada Bell
2 => SBC Nevada Bell
sbcbrandname => SBC Nevada Bell
3 => nevbell
imgbrand => nevbell
4 => http://www.nevadabell.com/
siteaddress => http://www.nevadabell.com/
5 => Copyright_PrivacyPolicy/0,,113,00.html
privacy1 => Copyright_PrivacyPolicy/0,,113,00.html
6 => Copyright_PrivacyPolicy/0,,114,00.html
privacy2 => Copyright_PrivacyPolicy/0,,114,00.html
7 => C2002 Nevada Bell
Telephone Company
companylabel => C2002 Nevada Bell
Telephone Company
8 =>
ebilllink =>

I do not know where the 0-8 items are from. I have 'session_start ();' at
the top of each script. When I do a submit to go to step 2, it looses all
the session values. Here is the code for submission:

echo '
        <form action=index.php>
                <input type=hidden name=step value=2>
                <input type=submit value=submit>
        </form>
';

Simple html.

I am completely stumped. I have been all over php.net, the archives, and
phpbuilder.com. I cannot find any answer to what I am doing wrong. When I
hit submit, it comes up, and $_SESSION is empty. Any advice will be greatly
appreciated...

Using Version 4.1.2...

-Dan Joseph

attached mail follows:


Can I assume that you have session_start and session_register at the very
beginning of the page. Also, is each value of $r_name registered? I
believe all variables in $_SESSION must be registered. If not, when you
reload the page, the session variables you gave a value to will be empty.

Robbert van Andel

-----Original Message-----
From: Dan Joseph [mailto:djosephduhq.us]
Sent: Thursday, May 15, 2003 8:46 AM
To: php-generallists.php.net
Subject: [PHP] Sessions help...

Hi All,

        I have been working for 2 days on a simple script. I even find it
hard to
believe that I cannot figure this out, so I am turning to the community to
try and find an answer. First, some code (all from the same script):

$region = mysql_fetch_array ($template_res);

foreach ($region as $name => $value) {
        $r_name = str_replace("_", "", $name);
        $tmpl->$r_name = $value;
        $_SESSION[$r_name] = $value;
}

This piece loads all the database variables that I pulled out into sessions.

I am using:

foreach ($_SESSION as $name => $value) {
        echo "$name => $value<br>";
}

to see an output of what I just created.

I get:

0 => NEVD
region => NEVD
1 => Nevada Bell
brandname => Nevada Bell
2 => SBC Nevada Bell
sbcbrandname => SBC Nevada Bell
3 => nevbell
imgbrand => nevbell
4 => http://www.nevadabell.com/
siteaddress => http://www.nevadabell.com/
5 => Copyright_PrivacyPolicy/0,,113,00.html
privacy1 => Copyright_PrivacyPolicy/0,,113,00.html
6 => Copyright_PrivacyPolicy/0,,114,00.html
privacy2 => Copyright_PrivacyPolicy/0,,114,00.html
7 => C2002 Nevada Bell
Telephone Company
companylabel => C2002 Nevada Bell
Telephone Company
8 =>
ebilllink =>

I do not know where the 0-8 items are from. I have 'session_start ();' at
the top of each script. When I do a submit to go to step 2, it looses all
the session values. Here is the code for submission:

echo '
        <form action=index.php>
                <input type=hidden name=step value=2>
                <input type=submit value=submit>
        </form>
';

Simple html.

I am completely stumped. I have been all over php.net, the archives, and
phpbuilder.com. I cannot find any answer to what I am doing wrong. When I
hit submit, it comes up, and $_SESSION is empty. Any advice will be greatly
appreciated...

Using Version 4.1.2...

-Dan Joseph

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

attached mail follows:


session_start is, however, I'm not using session_register anywhere. I've
always been under the impression that it wasn't necessary if you have use
$_SESSION. Maybe I am incorrect?

-Dan Joseph

> -----Original Message-----
> From: Van Andel, Robbert [mailto:RVanAndelchartercom.com]
> Sent: Thursday, May 15, 2003 12:22 PM
> To: Dan Joseph; php-generallists.php.net
> Subject: RE: [PHP] Sessions help...
>
>
> Can I assume that you have session_start and session_register at the very
> beginning of the page. Also, is each value of $r_name registered? I
> believe all variables in $_SESSION must be registered. If not, when you
> reload the page, the session variables you gave a value to will be empty.
>
> Robbert van Andel
>
>
>
> -----Original Message-----
> From: Dan Joseph [mailto:djosephduhq.us]
> Sent: Thursday, May 15, 2003 8:46 AM
> To: php-generallists.php.net
> Subject: [PHP] Sessions help...
>
>
> Hi All,
>
> I have been working for 2 days on a simple script. I even find it
> hard to
> believe that I cannot figure this out, so I am turning to the community to
> try and find an answer. First, some code (all from the same script):
>
> $region = mysql_fetch_array ($template_res);
>
> foreach ($region as $name => $value) {
> $r_name = str_replace("_", "", $name);
> $tmpl->$r_name = $value;
> $_SESSION[$r_name] = $value;
> }
>
> This piece loads all the database variables that I pulled out
> into sessions.
>
> I am using:
>
> foreach ($_SESSION as $name => $value) {
> echo "$name => $value<br>";
> }
>
> to see an output of what I just created.
>
> I get:
>
> 0 => NEVD
> region => NEVD
> 1 => Nevada Bell
> brandname => Nevada Bell
> 2 => SBC Nevada Bell
> sbcbrandname => SBC Nevada Bell
> 3 => nevbell
> imgbrand => nevbell
> 4 => http://www.nevadabell.com/
> siteaddress => http://www.nevadabell.com/
> 5 => Copyright_PrivacyPolicy/0,,113,00.html
> privacy1 => Copyright_PrivacyPolicy/0,,113,00.html
> 6 => Copyright_PrivacyPolicy/0,,114,00.html
> privacy2 => Copyright_PrivacyPolicy/0,,114,00.html
> 7 => C2002 Nevada Bell
> Telephone Company
> companylabel => C2002 Nevada Bell
> Telephone Company
> 8 =>
> ebilllink =>
>
> I do not know where the 0-8 items are from. I have 'session_start ();' at
> the top of each script. When I do a submit to go to step 2, it looses all
> the session values. Here is the code for submission:
>
> echo '
> <form action=index.php>
> <input type=hidden name=step value=2>
> <input type=submit value=submit>
> </form>
> ';
>
> Simple html.
>
> I am completely stumped. I have been all over php.net, the archives, and
> phpbuilder.com. I cannot find any answer to what I am doing
> wrong. When I
> hit submit, it comes up, and $_SESSION is empty. Any advice will
> be greatly
> appreciated...
>
> Using Version 4.1.2...
>
> -Dan Joseph
>
>
> --
> 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
>

attached mail follows:


I need some clear eyes :) I have a site in which a customer can
select an item and then purchase it. It is not a shopping cart - just
a way for marketing departments to place orders for shirts, pens,
golf balls, etc. I have a table that holds the price of each item and
also a table that holds the quantity they want.

Calculating the individual sale items I do this:

$order_total = ($prod_qty * $prod_price);

But I need to come up with a total price at the end of the transaction,
would a foreach array be my best bet?

Thanks in advance......

-Scott

attached mail follows:


SELECT SUM(SELECT (qty * price) FROM tablename WHERE userid = '1');

Assuming you have a DB with sub-select support,
something like that?

On Thu, 2003-05-15 at 12:09, Scott St. John wrote:
> I need some clear eyes :) I have a site in which a customer can
> select an item and then purchase it. It is not a shopping cart - just
> a way for marketing departments to place orders for shirts, pens,
> golf balls, etc. I have a table that holds the price of each item and
> also a table that holds the quantity they want.
>
> Calculating the individual sale items I do this:
>
> $order_total = ($prod_qty * $prod_price);
>
> But I need to come up with a total price at the end of the transaction,
> would a foreach array be my best bet?
>
> Thanks in advance......
>
> -Scott
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Actually I think I was using too many steps, I think
you don't need the sub-select at all, try:

SELECT SUM(qty*price) FROM tablename WHERE userid = '1';

On Thu, 2003-05-15 at 12:17, Adam Voigt wrote:
> SELECT SUM(SELECT (qty * price) FROM tablename WHERE userid = '1');
>
>
> Assuming you have a DB with sub-select support,
> something like that?
>
>
>
> On Thu, 2003-05-15 at 12:09, Scott St. John wrote:
> > I need some clear eyes :) I have a site in which a customer can
> > select an item and then purchase it. It is not a shopping cart - just
> > a way for marketing departments to place orders for shirts, pens,
> > golf balls, etc. I have a table that holds the price of each item and
> > also a table that holds the quantity they want.
> >
> > Calculating the individual sale items I do this:
> >
> > $order_total = ($prod_qty * $prod_price);
> >
> > But I need to come up with a total price at the end of the transaction,
> > would a foreach array be my best bet?
> >
> > Thanks in advance......
> >
> > -Scott
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Using MySQL 4.0.12, let me give it a whirl.

Thanks!

-Scott

At 12:17 PM 5/15/2003 -0400, Adam Voigt wrote:
>SELECT SUM(SELECT (qty * price) FROM tablename WHERE userid = '1');
>
>
>Assuming you have a DB with sub-select support,
>something like that?
>
>
>
>On Thu, 2003-05-15 at 12:09, Scott St. John wrote:
> > I need some clear eyes :) I have a site in which a customer can
> > select an item and then purchase it. It is not a shopping cart - just
> > a way for marketing departments to place orders for shirts, pens,
> > golf balls, etc. I have a table that holds the price of each item and
> > also a table that holds the quantity they want.
> >
> > Calculating the individual sale items I do this:
> >
> > $order_total = ($prod_qty * $prod_price);
> >
> > But I need to come up with a total price at the end of the transaction,
> > would a foreach array be my best bet?
> >
> > Thanks in advance......
> >
> > -Scott
>--
>Adam Voigt (adamcryptocomm.com)
>Linux/Unix Network Administrator
>The Cryptocomm Group
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

------------------------------------------------------------------------
Thank you for choosing Talon!

Scott St. John
Technical Evangelist
Talon Network Services, Inc.
www.talon.net

attached mail follows:


I am working on it now, I have to inner join two tables so my sql code is
getting a little hairy.

At 12:26 PM 5/15/2003 -0400, Adam Voigt wrote:
>Actually I think I was using too many steps, I think
>you don't need the sub-select at all, try:
>
>SELECT SUM(qty*price) FROM tablename WHERE userid = '1';
>
>
>
>On Thu, 2003-05-15 at 12:17, Adam Voigt wrote:
> > SELECT SUM(SELECT (qty * price) FROM tablename WHERE userid = '1');
> >
> >
> > Assuming you have a DB with sub-select support,
> > something like that?
> >
> >
> >
> > On Thu, 2003-05-15 at 12:09, Scott St. John wrote:
> > > I need some clear eyes :) I have a site in which a customer can
> > > select an item and then purchase it. It is not a shopping cart - just
> > > a way for marketing departments to place orders for shirts, pens,
> > > golf balls, etc. I have a table that holds the price of each item and
> > > also a table that holds the quantity they want.
> > >
> > > Calculating the individual sale items I do this:
> > >
> > > $order_total = ($prod_qty * $prod_price);
> > >
> > > But I need to come up with a total price at the end of the transaction,
> > > would a foreach array be my best bet?
> > >
> > > Thanks in advance......
> > >
> > > -Scott
>--
>Adam Voigt (adamcryptocomm.com)
>Linux/Unix Network Administrator
>The Cryptocomm Group

attached mail follows:


This works and here is the sql code:
select orders.fk_prod_size_id, orders.order_qty, prod_size.prod_price,
SUM(prod_size.prod_price * orders.order_qty)
from (orders orders INNER JOIN prod_size prod_size ON
orders.fk_prod_size_id = prod_size.prod_size_id)

But I need a way to tabulate the total order, here is the result of the
above code:

54 1 52.00 52.00

54 50 52.00 2600.00

65 1 14.25 28.50

I need a quick way to tabulate the total of the 3 columns on the right - I
can't think,
maybe I should go to lunch :)

-Scott

At 12:26 PM 5/15/2003 -0400, Adam Voigt wrote:
>Actually I think I was using too many steps, I think
>you don't need the sub-select at all, try:
>
>SELECT SUM(qty*price) FROM tablename WHERE userid = '1';
>
>
>
>On Thu, 2003-05-15 at 12:17, Adam Voigt wrote:
> > SELECT SUM(SELECT (qty * price) FROM tablename WHERE userid = '1');
> >
> >
> > Assuming you have a DB with sub-select support,
> > something like that?
> >
> >
> >
> > On Thu, 2003-05-15 at 12:09, Scott St. John wrote:
> > > I need some clear eyes :) I have a site in which a customer can
> > > select an item and then purchase it. It is not a shopping cart - just
> > > a way for marketing departments to place orders for shirts, pens,
> > > golf balls, etc. I have a table that holds the price of each item and
> > > also a table that holds the quantity they want.
> > >
> > > Calculating the individual sale items I do this:
> > >
> > > $order_total = ($prod_qty * $prod_price);
> > >
> > > But I need to come up with a total price at the end of the transaction,
> > > would a foreach array be my best bet?
> > >
> > > Thanks in advance......
> > >
> > > -Scott
>--
>Adam Voigt (adamcryptocomm.com)
>Linux/Unix Network Administrator
>The Cryptocomm Group
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

------------------------------------------------------------------------------
Scott St. John, Technical Evangelist
Talon Network Services, Inc.
WorkURL: www.talon.net
HomeURL: www.scottah.com
AIM: scottstjohn102

attached mail follows:


hi,

> This file is outdated, nested classes wil NOT be supported, even as
> namespaces.
hmm well we'll have to keep on searching for an other structure ...

> Namespaces will be implemented but can not be nested.
atm it is possible to use the following structure ..

<?PHP
namespace datatypes:db:mysql:select
{
        class startquery
        {
                var $test1;
                var $test2;

                function __construct()
                {
                }
        }
}

namespace datatypes:db:mysql:insert
{
        class startquery
        {
                var $test1;
                var $test2;

                function __construct()
                {
                }
        }
}
?>

.. will this be removed again??

Yours sincerly,
Julian Reich

julianreich.cx

attached mail follows:


On Thu, May 15, 2003 at 06:33:44PM +0200, Julian Reich wrote:
> hi,
>
> > This file is outdated, nested classes wil NOT be supported, even as
> > namespaces.
> hmm well we'll have to keep on searching for an other structure ...
>
> > Namespaces will be implemented but can not be nested.
> atm it is possible to use the following structure ..

Sure you can, I've tried it myself.

I also miss the feature of nested namespaces, it'd be really great, and
make it possible to have awesome structure in your PHP code. As you
are, I'm also working on a CMS which has support for many different
types of pages, not just normal text pages, but forums, news bulletins
and even more. These extensions are made up by plugins, and if it was
possible with nested namespaces, the design logic of the plugin system would be
fantastic. So, could someone please tell me why that's not allowed?

--
Emil Stenqvist <emilevolve.se>
http://dignitas.net/
+46 073 763 67 91

attached mail follows:


Hi there,

I need to know how one can execute a script on another server, which returns
a reply and sends it to the original script (or something like that). All
this has to happen without the user being able to see the variables passed,
ever!
This is for a sms system, we will send password and user id's.

Anyone?

Thomas

--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!

attached mail follows:


----- Original Message -----
From: "Thomas Hochstetter" <fisherofmengmx.net>
To: <php-generallists.php.net>
Sent: Thursday, May 15, 2003 10:45 AM
Subject: [PHP] executing a remote script

> Hi there,
>
> I need to know how one can execute a script on another server, which
returns
> a reply and sends it to the original script (or something like that). All
> this has to happen without the user being able to see the variables
passed,
> ever!
> This is for a sms system, we will send password and user id's.
>
> Anyone?
>
> Thomas

Well you could do it any one of half a dozen different ways I suppose. But
since both servers are running PHP you can simply include() the remote
script.

include("http://www.secretserver.com/script.php");

The script will execute on the remote server, do it's duty, then any output
will come back to the main script on the primary server.

HTH,
Kevin

attached mail follows:


hi,

i install php on server 2000 .
how can access to user list , or change configuration for users of server
2000 like password
using php.

thanks,
zuhear

attached mail follows:


I have this

for($i = 250; $i <= 1000; $i += 250) {
    $c_val[] = $i;
}
echo "Select Calories (number of cals replaced per hour):\n";
echo '<select name="r_calories">'."\n";
    foreach($c_val as $v) {
        $string = ($v != 500) ? "<option value=\"$v\">$v</option>" : "<option value=\"$v\"
 selected=\"selected\">$v</option>";
        echo $string . "\n";
    }
echo "</select>\n";

It does exactly what it's supposed to and creates this:

Select Calories (number of cals replaced per hour):
<select name="r_calories">
<option value="250">250</option>
<option value="500" selected="selected">500</option>
<option value="750">750</option>
<option value="1000">1000</option>
</select>

However, when this is displayed by the browser (Mozilla) it
defaults to 1000 BUT if I take this same snippet of HTML and
paste it into the page so it's NOT created dynamically it's
fine and defaults to 500. Only when it's created via PHP does it
default to 1000. Only seems to effect Mozilla only, IE and Opera
are ok with it. Heck, even Lynx is ok with it.

Any thoughts?

attached mail follows:


----- Original Message -----
From: "Brian V Bonini" <b-boninicox.net>
To: "PHP Lists" <php-generallists.php.net>
Sent: Thursday, May 15, 2003 10:57 AM
Subject: [PHP] Weird browser bug (I think)

> I have this
..shnip..
> Select Calories (number of cals replaced per hour):
> <select name="r_calories">
> <option value="250">250</option>
> <option value="500" selected="selected">500</option>
> <option value="750">750</option>
> <option value="1000">1000</option>
> </select>
>
> However, when this is displayed by the browser (Mozilla) it
> defaults to 1000 BUT if I take this same snippet of HTML and
> paste it into the page so it's NOT created dynamically it's
> fine and defaults to 500. Only when it's created via PHP does it
> default to 1000. Only seems to effect Mozilla only, IE and Opera
> are ok with it. Heck, even Lynx is ok with it.
>