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-help_at_lists.php.net
Date: Wed Jul 10 2002 - 13:05:42 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 10 Jul 2002 18:05:42 -0000 Issue 1456

    Topics (messages 106675 through 106905):

    Re: PLZ HELP -- - GET & POST form problem
            106675 by: vins

    Re: How do I import tables into MySQL from web page ...
            106676 by: Analysis & Solutions
            106679 by: Fargo Lee
            106689 by: Analysis & Solutions
            106758 by: John Holmes

    banner rotation and advertisement
            106677 by: Andy
            106680 by: vins
            106795 by: Joel Boonstra
            106866 by: Lazor, Ed

    Re: (OT) Our Spam Friend
            106678 by: vins
            106696 by: Brian McGarvie
            106699 by: Alberto Serra
            106704 by: vins
            106707 by: César Aracena
            106742 by: vins
            106829 by: Joshua E Minnie
            106833 by: Scott Fletcher
            106851 by: Joshua E Minnie

    Re: Submitting form in new window!
            106681 by: vins

    Re: Storing values in Session
            106682 by: vins
            106684 by: vins
            106686 by: Rudolf Visagie

    Re: is their a jobs mailing list?
            106683 by: sharif

    Re: hiding submitted variable values in location bar of browser !
            106685 by: Axel Tietje
            106687 by: Sachin Keshavan
            106688 by: Lord Loh.

    Hiding submitted variable-Solution
            106690 by: Lord Loh.

    Re: Executing Script through image
            106691 by: JJ Harrison

    Re: PHP vs. Java
            106692 by: Alberto Serra
            106765 by: robert

    Re: Script File Permissions
            106693 by: Alberto Serra

    Re: $_REQUEST???
            106694 by: Alberto Serra

    Re: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
            106695 by: Alberto Serra

    PHP and Apache2?
            106697 by: Johan Holst Nielsen
            106727 by: Danny Shepherd

    Re: Took the job into my own hands
            106698 by: Brian McGarvie

    IIS Bugs???
            106700 by: Brian McGarvie

    Generate a file
            106701 by: Phillip S. Baker
            106702 by: Alberto Serra
            106736 by: Peter
            106766 by: Jay Blanchard
            106768 by: Marek Kilimajer

    More work for us I Hope!!!
            106703 by: César Aracena

    strange php output
            106705 by: Calvin Spealman
            106710 by: César Aracena
            106715 by: Alberto Serra
            106717 by: liljim

    Operator missing?
            106706 by: Alberto Serra

    How to dectect if a file exist in specific Folder
            106708 by: Jack
            106712 by: César Aracena
            106714 by: Jason Wong

    not parsing vars
            106709 by: richard.mail.softhome.net
            106711 by: Jason Wong
            106716 by: César Aracena
            106754 by: joakim.andersson.cybercom.se

    Re: ????????????????????????? <snip >
            106713 by: Mark Gallagher
            106732 by: Yamin Prabudy

    Re: ############
            106718 by: Mark Gallagher

    cookie ?
            106719 by: richard.mail.softhome.net
            106722 by: Johan Holst Nielsen
            106723 by: César Aracena
            106724 by: Marek Kilimajer
            106725 by: Alberto Serra
            106729 by: Johan Holst Nielsen
            106730 by: Johan Holst Nielsen

    Re: ?????????????????????????????????
            106720 by: Mark Gallagher

    Re: Erik Hegreberg
            106721 by: Marek Kilimajer

    Re: ??????????????????????????????????????????????????????````````````````````ØØØØØØØØØØ
            106726 by: Mark Gallagher

    Re: ???? etc
            106728 by: Danny Shepherd

    Re: Editing Word Documents
            106731 by: Marek Kilimajer
            106779 by: Chris Hewitt

    PHP 4.2.1 / Apache
            106733 by: DSteculorum.xlserv.com
            106735 by: Jason Wong

    PHP 4.2.1 / Mysql
            106734 by: DSteculorum.xlserv.com

    strange stuff in a class
            106737 by: Alex Elderson
            106740 by: Alberto Serra

    cookie ( still not working )
            106738 by: richard.mail.softhome.net
            106739 by: Johan Holst Nielsen
            106741 by: richard.mail.softhome.net
            106743 by: vins

    Wildcard
            106744 by: César Aracena
            106746 by: vins
            106747 by: richard.mail.softhome.net
            106750 by: César Aracena
            106752 by: joakim.andersson.cybercom.se
            106753 by: Richard Black
            106760 by: César Aracena
            106790 by: Chris Hewitt

    (OT) News Reading
            106745 by: vins
            106748 by: Duncan Hill
            106764 by: vins

    ONLY ON VOTE......
            106749 by: vins

    Re: rh 7.3
            106751 by: Chris Hewitt

    Re: Is it so fuckin diffuicult...
            106755 by: Kondwani Spike Mkandawire
            106757 by: vins
            106762 by: richard.mail.softhome.net

    Re: shtml & php in the same file?
            106756 by: John Holmes

    Re: Erik Hegreberg (Moderator)
            106759 by: Kondwani Spike Mkandawire
            106763 by: Mark Charette

    OOPHP more about copies: new and &new
            106761 by: Alberto Serra

    Dos Paths
            106767 by: BB
            106772 by: David Otton
            106774 by: BB
            106782 by: Michael Sims
            106784 by: vins
            106785 by: Michael Sims
            106786 by: Danny Shepherd
            106787 by: David Otton
            106788 by: Michael Sims
            106792 by: Chris Hewitt
            106798 by: Danny Shepherd
            106802 by: BB
            106803 by: joakim.andersson.cybercom.se
            106804 by: Shane Wright
            106809 by: Neil Freeman
            106858 by: Chris Earle

    proba
            106769 by: Djurovski Dejan

    Geting PHP Version
            106770 by: Skyhawk
            106771 by: René Moonen
            106789 by: Mark McCulligh
            106857 by: Skyhawk

    Now a Question for all you ARRAY Junkies
            106773 by: vins
            106776 by: Martin Clifford
            106777 by: vins
            106778 by: Danny Shepherd
            106781 by: Neil Freeman
            106783 by: vins

    Display criteria
            106775 by: DC
            106780 by: Martin Clifford
            106791 by: Chris Hewitt

    cookies
            106793 by: Alexander Ross
            106796 by: Martin Clifford
            106797 by: Danny Shepherd
            106800 by: richard.mail.softhome.net
            106811 by: lherbst.PROPAPPR.MARION.FL.US
            106812 by: vins
            106835 by: Danny Shepherd

    Re: Exporting mySQL Table Data to .csv
            106794 by: Joel Boonstra

    Re: CANT GET STUFF TO WORK
            106799 by: Mike
            106806 by: Jason Wong
            106846 by: Mike

    Re: dumb
            106801 by: Brinkman, Theodore

    if syntax
            106805 by: Alexander Ross
            106808 by: jepadilla.bh-corp.com
            106810 by: Martin Clifford
            106813 by: R'twick Niceorgaw
            106814 by: vins
            106815 by: Chris Hewitt
            106817 by: Chris Hewitt

    Re: Images in Mysql
            106807 by: René Fournier
            106816 by: joakim.andersson.cybercom.se

    Generating word documents based on fields in a browser
            106818 by: Craig
            106822 by: René Moonen
            106825 by: David Otton
            106828 by: Craig
            106836 by: David Otton
            106842 by: Craig
            106843 by: Chris Hewitt
            106885 by: Chris Earle

    count number of downloads
            106819 by: Dietmar Wenglorz
            106823 by: Dietmar Wenglorz

    Help with Configure Options
            106820 by: Jonathan Rosenberg

    Getting PHP to read the mail!
            106821 by: Henry
            106834 by: Henry

    Re: Please Remove this Moron
            106824 by: Scott Fletcher

    fopen() ??
            106826 by: Scott Fletcher
            106827 by: Jay Blanchard
            106830 by: Scott Fletcher
            106838 by: Scott Fletcher
            106840 by: Jay Blanchard
            106841 by: David Otton
            106845 by: Scott Fletcher
            106847 by: Scott Fletcher

    session error ... I think
            106831 by: Alexander Ross
            106832 by: vins

    sessions
            106837 by: Alexander Ross
            106839 by: Martin Clifford
            106844 by: jepadilla.bh-corp.com
            106888 by: colin mcdonald
            106895 by: Djurovski Dejan
            106904 by: Lazor, Ed

    Development Tools
            106848 by: Mark McCulligh
            106849 by: B i g D o g
            106850 by: Martin Clifford
            106852 by: Dan Vande More
            106853 by: Neil Freeman
            106854 by: Bret L Conard
            106855 by: Mark McCulligh
            106856 by: Uwe Birkenhain
            106859 by: Jay Blanchard
            106860 by: Zac Hillier
            106861 by: Alberto Serra
            106862 by: Bret L Conard
            106863 by: Todd Cary
            106864 by: Brian McGarvie
            106865 by: John S. Huggins
            106872 by: Martin Clifford
            106873 by: Philip Hallstrom
            106879 by: Gerard Samuel
            106881 by: Mark McCulligh

    Security with XML
            106867 by: Chris Earle
            106882 by: Andrew Chase
            106890 by: Chris Earle

    (OT) Erik Hegreberg - need headers for abuseonline.no
            106868 by: Jason Soza

    Appending to a file
            106869 by: Chris Earle

    Look below
            106870 by: Chris Earle

    newbie regex question..
            106871 by: Kelly Meeks

    Re: help pls..
            106874 by: Chris Earle

    Accessing multiple List/Menu values
            106875 by: Joseph Szobody
            106876 by: B i g D o g
            106877 by: Martin Clifford

    register_globals, the manual, and you.
            106878 by: Philip Olson

    Automatic Form creation
            106880 by: CM
            106883 by: Martin Clifford

    Date formatting
            106884 by: Rw
            106889 by: Dan Vande More

    reports and reporting options?
            106886 by: Jeff D. Hamann
            106887 by: Rasmus Lerdorf

    Cannot Insert into Paradox Tables...
            106891 by: Kondwani Spike Mkandawire
            106901 by: Chris Hounsell
            106905 by: Alex Piaz

    Re: (OT) Our Spam Friend ;))))))))))))))))) 8PPP
            106892 by: Ricardo Fitzgerald

    SQL field problem
            106893 by: mail.struempf.com
            106896 by: Lazor, Ed
            106897 by: Tyler Longren
            106900 by: Martin Clifford
            106902 by: Chris Earle
            106903 by: Chris Earle

    sort problem
            106894 by: Andy
            106899 by: Lazor, Ed

    Question about PHP
            106898 by: Negin T

    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:


    Globals Globals Globals......
    PHP Needs that
    without globals it's like a man without balls....

    LOL

    Cheerz

    "Richard Lynch" <richphpbootcamp.com> wrote in message
    news:php.general-106620news.php.net...
    > >Server Apache / PHP v.4.1.2
    > >At the moment the parametere register_globals is still set to on;
    > >I'm triyng to use $_POST and $_FILES between different pages, but
    variables
    > >are always empty !!!
    >
    > Is 'track_vars' turned *ON* in php.ini? That's the one that fills in all
    > those variables.
    >
    > If your version of PHP is "too old" you'll need $HTTP_POST_VARS instead of
    > $_POST and similar.
    >
    > --
    > Like Music? http://l-i-e.com/artists.htm
    >

    attached mail follows:


    On Tue, Jul 09, 2002 at 10:59:04PM -0700, Fargo Lee wrote:
    >
    > Thanks but it still returns "Success" on a failure. If anyone knows if it is
    > even possible to assign the output of system, passthru or exec to a variable
    > to check for success or failure and how to do it, please advise. The $status
    > variable seems to always be empty on success or failure when I try to echo
    > it.

    The way you set things up, $status is the last line of text returned by
    executing the command. Add the return_var argument to your system()
    statement. Take a look at the manual again.
    http://www.php.net/manual/en/function.system.php

    You can only make an accurate if() statement if you know what the values
    are you're expecting.

    Now, do some hacking. Set up the test to fail. Echo $status and $return
    to the screen and see what they look like. Set up the test to succeed.
    What do $status and $return look like then?

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    Thanks for pointing me in the right direction. Could not get the output (success or failure) assigned to a variable in front of the system call but got it to assign a 0 (success) or 1 (failure) to the return_var argument as you suggested so I am happy.

    <?php

    system("mysql -u myuserid -pmypassword mydbname < /path/to/mydumpfile.txt", $status);

    if($status == 1){ echo 'Failed'; } else { echo 'Success'; }

    ?>

    What mixed me up and I still don't understand is the manual entry for system() says ...

    "Returns the last line of the command output on success, and FALSE on failure."

    When it says it "Returns", where does it return this information and how can it be captured for comparison? The return_var appears to only return a 0 or a 1. I thought I could capture it by assigning the system call to a variable in front but that appears to capture nothing on success or failure.

    "Analysis & Solutions" <danielcanalysisandsolutions.com> wrote in message news:20020710061213.GB11198panix.com... > On Tue, Jul 09, 2002 at 10:59:04PM -0700, Fargo Lee wrote: > > > > Thanks but it still returns "Success" on a failure. If anyone knows if it is > > even possible to assign the output of system, passthru or exec to a variable > > to check for success or failure and how to do it, please advise. The $status > > variable seems to always be empty on success or failure when I try to echo > > it. > > The way you set things up, $status is the last line of text returned by > executing the command. Add the return_var argument to your system() > statement. Take a look at the manual again. > http://www.php.net/manual/en/function.system.php > > You can only make an accurate if() statement if you know what the values > are you're expecting. > > Now, do some hacking. Set up the test to fail. Echo $status and $return > to the screen and see what they look like. Set up the test to succeed. > What do $status and $return look like then? > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

    attached mail follows:


    On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote:

    > got it to assign a 0 (success) or 1 (failure) to the return_var argument as > you suggested so I am happy.

    Good!

    > What mixed me up and I still don't understand is the manual entry for > system() says ... > > "Returns the last line of the command output on success, and FALSE on > failure." > > When it says it "Returns", where does it return this information and how can > it be captured for comparison?

    The thing that's tripping you up is, I believe, executing MySQL programs at a prompt doesn't produce any visible output. But, if you executed a command that returns some output to STDOUT, like "ls", you'd see the last line of output therefrom in the "Return."

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    Try using backticks, and you don't need spaces after -u and -p

    $result = `MySQL -uuser -ppassword databasename < filename.sql`

    Note that if it succeeds, nothing will be returned. Same as when you run the command on the command line.

    ---John Holmes...

    > -----Original Message----- > From: Fargo Lee [mailto:fargoleeiname.com] > Sent: Wednesday, July 10, 2002 1:27 AM > To: php-generallists.php.net > Subject: Re: [PHP] How do I import tables into MySQL from web page ... > > Thanks for pointing out the syntax error. I added the space after the -u > but > it did not make any difference. It still gives the same result, that is > "Success", when it actually fails. What I am trying to figure out is how I > can tell if it failed (did not create the tables)? The $status variable > does > not appear to hold the output of the system() function. Anyone know how to > get the output of system, passthru or exec into the $status variable to > check for success or failure? > > "Analysis & Solutions" <danielcanalysisandsolutions.com> wrote in message > news:20020710030254.GA10805panix.com... > > On Tue, Jul 09, 2002 at 06:09:36PM -0700, Fargo Lee wrote: > > > > > > $status = system("mysql -umyuserid -pmypassword mydbname < > > > > You need a space between "-u" and "myuserid" > > > > --Dan > > > > -- > > PHP classes that make web design easier > > SQL Solution | Layout Solution | Form Solution > > sqlsolution.info | layoutsolution.info | formsolution.info > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Hello everybody:

    sorry for this kind of off topic question. I hope that someone might point me into the right direction.

    I am operating a web portal and think about advertisement. Unfortunatelly I do not have any idea how to start this. First off all how does the client know how many banner views happend? I mean there must be a system which is proving how often. And second off all how to find the right sponsors fitting to the site.

    Maybe someone knows a third party company which does this for a fee.

    Has anybody a good hint?

    Thank you in advance.

    Andy

    attached mail follows:


    Try phpadsnews.

    "Andy" <news.lettersgmx.de> wrote in message news:20020710061828.77356.qmailpb1.pair.com... > Hello everybody: > > sorry for this kind of off topic question. I hope that someone might point > me into the right direction. > > I am operating a web portal and think about advertisement. Unfortunatelly I > do not have any idea how to start this. First off all how does the client > know how many banner views happend? I mean there must be a system which is > proving how often. And second off all how to find the right sponsors fitting > to the site. > > Maybe someone knows a third party company which does this for a fee. > > Has anybody a good hint? > > Thank you in advance. > > Andy > >

    attached mail follows:


    > Try phpadsnews.

    phpAdsNew can be found on SourceForge here:

    http://sourceforge.net/projects/phpadsnew/

    I've been using it in production for over a year now, and have found it to be quite a handy program.

    -- 
    [ joel boonstra | jboonstragospelcom.net ]
    

    attached mail follows:


    Try SourceForge.net and search for PHP banner rotation. There are several freely available programs doing exactly what you're looking for.

    -----Original Message----- From: Andy [mailto:news.lettersgmx.de] Sent: Tuesday, July 09, 2002 11:20 PM To: php-generallists.php.net Subject: [PHP] banner rotation and advertisement

    Hello everybody:

    sorry for this kind of off topic question. I hope that someone might point me into the right direction.

    I am operating a web portal and think about advertisement. Unfortunatelly I do not have any idea how to start this. First off all how does the client know how many banner views happend? I mean there must be a system which is proving how often. And second off all how to find the right sponsors fitting to the site.

    Maybe someone knows a third party company which does this for a fee.

    Has anybody a good hint?

    Thank you in advance.

    Andy

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
     
    ****************************************************************************
    This message is intended for the sole use of the individual and entity to
    whom it is addressed, and may contain information that is privileged,
    confidential and exempt from disclosure under applicable law.  If you are
    not the intended addressee, nor authorized to receive for the intended
    addressee, you are hereby notified that you may not use, copy, disclose or
    distribute to anyone the message or any information contained in the
    message.  If you have received this message in error, please immediately
    advise the sender by reply email and delete the message.  Thank you very
    much.                                                                       
    

    attached mail follows:


    Good GOod Good.... but hey isn't going to get off that easy. one day it's going to say sorry that mailbox doesn't exist. or even better.... sorry this person doesn't own a computer anymore after his last spam crusade LOL

    "Chris Shiflett" <shiflettphp.net> wrote in message news:3D2B6BB5.2040709php.net... > I just thought this was worth sharing. :-) > > ----- The following addresses had permanent fatal errors ----- > <ehegrebeonline.no> > > ----- Transcript of session follows ----- > RECIPIENTS MAILBOX IS FULL > 554 <ehegrebeonline.no>... Service unavailable > >

    attached mail follows:


    we should make a script that constantly emails him single characters and all of us run it in a back ground process ;)

    > -----Original Message----- > From: Chris Shiflett [mailto:shiflettphp.net] > Sent: 10 July 2002 12:03 AM > To: PHP > Subject: [PHP] (OT) Our Spam Friend > > > I just thought this was worth sharing. :-) > > ----- The following addresses had permanent fatal errors ----- > <ehegrebeonline.no> > > ----- Transcript of session follows ----- > RECIPIENTS MAILBOX IS FULL > 554 <ehegrebeonline.no>... Service unavailable > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    ðÒÉ×ÅÔ!

    Brian McGarvie wrote: > we should make a script that constantly emails him single characters and all of us run it in a back ground process ;)

    He is lucky we have all to much to do in our lives anyway :) But if anyone has got spare time... the guy's mailbox (unlike most russian public mail servers) *will* accept mail from a dial-up SMTP server having f**k.you (or whatever, just take the ** off and replace with proper coding) as an host name. I just happened to check ;)

    Not that I was willing to. But we are having SMTP problems so I just send the mail from the SMTP rauuning on the box I sit at while the trouble gets solved.

    Western addresses will get it (including our friend's address and this list) while my own address returns me the mail saying that "no, you cannot just login from a dial-up and pretend you were an internet server. Now your server is blacklisted" LOL

    My 2 kopeki (cents). :)

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Sign up for a free server somewhere and create a page that just sends the request to the server.....

    <?php while($x != $count) { mail(The Creap, $x) $x++; } ?> Note there isn't a count variable.... then the only person that can stop it is the system op on the free server.

    "Brian McGarvie" <bmcgarvielennox-mckinlay.co.uk> wrote in message news:1E6C09BA9AA33E408D6531ADE236DD01060F66ad2.lan.lennox-mckinlay.co.uk... we should make a script that constantly emails him single characters and all of us run it in a back ground process ;)

    > -----Original Message----- > From: Chris Shiflett [mailto:shiflettphp.net] > Sent: 10 July 2002 12:03 AM > To: PHP > Subject: [PHP] (OT) Our Spam Friend > > > I just thought this was worth sharing. :-) > > ----- The following addresses had permanent fatal errors ----- > <ehegrebeonline.no> > > ----- Transcript of session follows ----- > RECIPIENTS MAILBOX IS FULL > 554 <ehegrebeonline.no>... Service unavailable > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hi all... If you read the latest post from me you will see that it was my intention when creating a looping mail sender. The post was called mail() function. Although I took it off after sending him like 25.000.000 mails that where called Hi0, Hi1, Hi2, Hi3, etc. The sender and the subject also increased by a number in order to difficult him the task of blocking the sender.

    I took it off because I guessed I could get into trouble and because I though that he would have killed his account by then.

    The only problem I see in your scripts, is that the server will time out after a couple of thousand emails. I figure it out when sending 10.000.000 at one ;)

    > -----Original Message----- > From: vins [mailto:vinswebonline.co.za] > Sent: Wednesday, July 10, 2002 5:17 AM > To: php-generallists.php.net > Subject: Re: [PHP] (OT) Our Spam Friend > > Sign up for a free server somewhere and create a page that just sends the > request to the server..... > > <?php > while($x != $count) > { > mail(The Creap, $x) > $x++; > } > ?> > Note there isn't a count variable.... > then the only person that can stop it is the system op on the free server. > > > "Brian McGarvie" <bmcgarvielennox-mckinlay.co.uk> wrote in message > news:1E6C09BA9AA33E408D6531ADE236DD01060F66ad2.lan.lennox- > mckinlay.co.uk... > we should make a script that constantly emails him single characters and > all > of us run it in a back ground process ;) > > > -----Original Message----- > > From: Chris Shiflett [mailto:shiflettphp.net] > > Sent: 10 July 2002 12:03 AM > > To: PHP > > Subject: [PHP] (OT) Our Spam Friend > > > > > > I just thought this was worth sharing. :-) > > > > ----- The following addresses had permanent fatal errors ----- > > <ehegrebeonline.no> > > > > ----- Transcript of session follows ----- > > RECIPIENTS MAILBOX IS FULL > > 554 <ehegrebeonline.no>... Service unavailable > > > > > > > > -- > > 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:


    What just a slap together of how we could make him crazy... but now that someone has pointed out to us that his mailbox is now full to he can't even unsubscribe from the list LOL WOOPS...

    We need to find out how to breakup the mailserver calls into 1000 emails sent every second and pause the server request... then the server is sure not to timeout.....

    "Brian McGarvie" <bmcgarvielennox-mckinlay.co.uk> wrote in message news:1E6C09BA9AA33E408D6531ADE236DD01060F66ad2.lan.lennox-mckinlay.co.uk... we should make a script that constantly emails him single characters and all of us run it in a back ground process ;)

    > -----Original Message----- > From: Chris Shiflett [mailto:shiflettphp.net] > Sent: 10 July 2002 12:03 AM > To: PHP > Subject: [PHP] (OT) Our Spam Friend > > > I just thought this was worth sharing. :-) > > ----- The following addresses had permanent fatal errors ----- > <ehegrebeonline.no> > > ----- Transcript of session follows ----- > RECIPIENTS MAILBOX IS FULL > 554 <ehegrebeonline.no>... Service unavailable > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Serves our spam "friend" right... now we can get on with our lives.

    "Chris Shiflett" <shiflettphp.net> wrote in message news:3D2B6BB5.2040709php.net... > I just thought this was worth sharing. :-) > > ----- The following addresses had permanent fatal errors ----- > <ehegrebeonline.no> > > ----- Transcript of session follows ----- > RECIPIENTS MAILBOX IS FULL > 554 <ehegrebeonline.no>... Service unavailable > >

    attached mail follows:


    Ha ha! Now, what did that spammer do? I don't have the copy of the posting of the last few days. I just flushed it into the garbage bin

    "Joshua E Minnie" <joshacsurf.net> wrote in message news:20020710151415.85864.qmailpb1.pair.com... > Serves our spam "friend" right... now we can get on with our lives. > > "Chris Shiflett" <shiflettphp.net> wrote in message > news:3D2B6BB5.2040709php.net... > > I just thought this was worth sharing. :-) > > > > ----- The following addresses had permanent fatal errors ----- > > <ehegrebeonline.no> > > > > ----- Transcript of session follows ----- > > RECIPIENTS MAILBOX IS FULL > > 554 <ehegrebeonline.no>... Service unavailable > > > > > >

    attached mail follows:


    Why not just use this code: <? while(TRUE) { mail("Our Special Friend",....); } ?>

    "Vins" <vinswebonline.co.za> wrote: > <?php > while($x != $count) > { > mail(The Creap, $x) > $x++; > } > ?> > Note there isn't a count variable.... > then the only person that can stop it is the system op on the free server.

    attached mail follows:


    This is JavaScript you need.

    one example.

    <FORM NAME="Information"> <INPUT TYPE="text" NAME="TextField" VALUE="Nothing Here"> <INPUT TYPE="submit" NAME="go" VALUE=" Go! " onSubmit="FormSubmit()'"> </FORM>

    <SCRIPT LANGUAGE="JavaScript" TYPE="JavaScript/Text"> function FormSubmit() { var textfield = Information.TextField.value; var url = "./processForm.php?textfield=" + textfield;

    window.open(url); } </SCRIPT>

    OR!!!!

    just add this to your form tag. TARGET="_blank"

    "Thomas Edison Jr." <thomasedisonjryahoo.com> wrote in message news:20020710052418.26086.qmailweb14108.mail.yahoo.com... > Glory, > > > Attach a javascript event to the submit button > > Something like : > > <input type="submit" name="go" onSubmit=wow();> > > Wherein wow() defines a the window.open function? > > > and also attach the form values to the url. > How do i do this? Because the 3 or 4 form fields i > have, which are Hidden Fields, contain values coming > in from $myrow[stuff], that is, coming in from a > Database Table. How do i define these values up in the > Javascript function in the <head> of the file? > > Thanks, > T. Edison Jr. > > > > __________________________________________________ > Do You Yahoo!? > Sign up for SBC Yahoo! Dial - First Month Free > http://sbc.yahoo.com

    attached mail follows:


    Try pushing the variables into an array before sending to the session. I never have problems with arrays in sessions.

    "Sachin Keshavan" <Sachin.Keshavansymphserv.com> wrote in message news:B733065B9A56D61194840090274F42CE01AC69INBLREXCH00... > Hello, > > I want to add a set of values to the session variable $BOOKS. This is the > code which I used. > > if($BOOKS=="") > { > #this seems to be the first book which the user has selected > $BOOKS = $bookid; #this param comes from the URL > } > else > { > $BOOKS = $BOOKS+","+$bookid; > } > > Here the 'if..' part gets executed, and because of that I cannot add details > of another book. I have initialised the session and added the registered the > value "BOOKS" in the previous page. > > Thanks in advance, > Sachin.

    attached mail follows:


    Oh an for the if statement. My PHP gets confused, maybe it's just me but give it a try

    if(empty($BOOKS))

    "Sachin Keshavan" <Sachin.Keshavansymphserv.com> wrote in message news:B733065B9A56D61194840090274F42CE01AC69INBLREXCH00... > Hello, > > I want to add a set of values to the session variable $BOOKS. This is the > code which I used. > > if($BOOKS=="") > { > #this seems to be the first book which the user has selected > $BOOKS = $bookid; #this param comes from the URL > } > else > { > $BOOKS = $BOOKS+","+$bookid; > } > > Here the 'if..' part gets executed, and because of that I cannot add details > of another book. I have initialised the session and added the registered the > value "BOOKS" in the previous page. > > Thanks in advance, > Sachin.

    attached mail follows:


    It should be: $BOOKS = $BOOKS.",".$bookid;

    Rudolf Visagie Principal Software Developer Digital Healthcare Solutions <mailto:rudolfdhsolutions.co.za> Tel: 011 2655478 Cell: 082 895 1598

    -----Original Message----- From: Sachin Keshavan [mailto:Sachin.Keshavansymphserv.com] Sent: Wednesday, July 10, 2002 8:03 AM To: php-generallists.php.net Subject: [PHP] Storing values in Session

    Hello,

    I want to add a set of values to the session variable $BOOKS. This is the code which I used.

    if($BOOKS=="") { #this seems to be the first book which the user has selected $BOOKS = $bookid; #this param comes from the URL } else { $BOOKS = $BOOKS+","+$bookid; }

    Here the 'if..' part gets executed, and because of that I cannot add details of another book. I have initialised the session and added the registered the value "BOOKS" in the previous page.

    Thanks in advance, Sachin.

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

    attached mail follows:


    pls... unsubscribe.. me... pls..and pls again....

    sharif. sharifmedhaka.net

    ----- Original Message ----- From: "Bret L Conard" <bretlcdonet.com> To: <php-generallists.php.net> Sent: Monday, July 08, 2002 9:46 PM Subject: Re: [PHP] is their a jobs mailing list?

    The site is called:

    tech-temp.com

    Bret

    attached mail follows:


    > Hi everyone,

    > Is there any way to hide my form submitted variables (like > passwords etc) > in the location > bar "http://somedomain.org/checkpassword.php? > password=mypassword" > or atleast show in an encypted form n the location bar.

    <form method="POST">

    HTH,

    Axel Tietje

    --
    FLYnet     FLYer Kommunikationsgesellschaft mbH
    Weender Landstr. 46 37073 Göttingen 0551-499750
    http://www.flynet.de         a.tietjeflynet.de
    

    attached mail follows:


    It would be better to use POST operation like <FORM ACTION="checkpassword.php" METHOD="POST>

    If you do this, the parameters will not appear in the URL bar at all.

    Hope this helps, Sachin.

    -----Original Message----- From: Axel Tietje [mailto:a.tietjeflynet.de] Sent: Wednesday, July 10, 2002 12:34 PM To: php-generallists.php.net Subject: Re: [PHP] hiding submitted variable values in location bar of browser !

    > Hi everyone,

    > Is there any way to hide my form submitted variables (like > passwords etc) > in the location > bar "http://somedomain.org/checkpassword.php? > password=mypassword" > or atleast show in an encypted form n the location bar.

    <form method="POST">

    HTH,

    Axel Tietje

    --
    FLYnet     FLYer Kommunikationsgesellschaft mbH
    Weender Landstr. 46 37073 Göttingen 0551-499750
    http://www.flynet.de         a.tietjeflynet.de
    

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

    attached mail follows:


    Use the "POST" Method Use MD5 encryption for additional security

    =========== MD5.js============= /* * Convert a 32-bit number to a hex string with ls-byte first */ var hex_chr = "0123456789abcdef"; function rhex(num) { var str = ""; for(var j = 0; j <= 3; j++) str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) + hex_chr.charAt((num >> (j * 8)) & 0x0F); return str; }

    /* * Convert a string to a sequence of 16-word blocks, stored as an array. * Append padding bits and the length, as described in the MD5 standard. */ function str2blks_MD5(str) { var nblk = ((str.length + 8) >> 6) + 1; // number of 16-word blocks var blks = new Array(nblk * 16); for(var i = 0; i < nblk * 16; i++) blks[i] = 0; for(var i = 0; i < str.length; i++) blks[i >> 2] |= str.charCodeAt(i) << ((i % 4) * 8); blks[i >> 2] |= 0x80 << ((i % 4) * 8); blks[nblk * 16 - 2] = str.length * 8; return blks; }

    /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }

    /* * Bitwise rotate a 32-bit number to the left */ function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); }

    /* * These functions implement the basic operation for each round of the * algorithm. */ function cmn(q, a, b, x, s, t) { return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); } function ff(a, b, c, d, x, s, t) { return cmn((b & c) | ((~b) & d), a, b, x, s, t); } function gg(a, b, c, d, x, s, t) { return cmn((b & d) | (c & (~d)), a, b, x, s, t); } function hh(a, b, c, d, x, s, t) { return cmn(b ^ c ^ d, a, b, x, s, t); } function ii(a, b, c, d, x, s, t) { return cmn(c ^ (b | (~d)), a, b, x, s, t); }

    /* * Take a string and return the hex representation of its MD5. */ function calcMD5(str) { var x = str2blks_MD5(str); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878;

    for(i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d;

    a = ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = ff(d, a, b, c, x[i+ 1], 12, -389564586); c = ff(c, d, a, b, x[i+ 2], 17, 606105819); b = ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = ff(b, c, d, a, x[i+ 7], 22, -45705983); a = ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = ff(c, d, a, b, x[i+10], 17, -42063); b = ff(b, c, d, a, x[i+11], 22, -1990404162); a = ff(a, b, c, d, x[i+12], 7 , 1804603682); d = ff(d, a, b, c, x[i+13], 12, -40341101); c = ff(c, d, a, b, x[i+14], 17, -1502002290); b = ff(b, c, d, a, x[i+15], 22, 1236535329);

    a = gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = gg(c, d, a, b, x[i+11], 14, 643717713); b = gg(b, c, d, a, x[i+ 0], 20, -373897302); a = gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = gg(d, a, b, c, x[i+10], 9 , 38016083); c = gg(c, d, a, b, x[i+15], 14, -660478335); b = gg(b, c, d, a, x[i+ 4], 20, -405537848); a = gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = gg(d, a, b, c, x[i+14], 9 , -1019803690); c = gg(c, d, a, b, x[i+ 3], 14, -187363961); b = gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = gg(a, b, c, d, x[i+13], 5 , -1444681467); d = gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = gg(b, c, d, a, x[i+12], 20, -1926607734);

    a = hh(a, b, c, d, x[i+ 5], 4 , -378558); d = hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = hh(c, d, a, b, x[i+11], 16, 1839030562); b = hh(b, c, d, a, x[i+14], 23, -35309556); a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = hh(c, d, a, b, x[i+ 7], 16, -155497632); b = hh(b, c, d, a, x[i+10], 23, -1094730640); a = hh(a, b, c, d, x[i+13], 4 , 681279174); d = hh(d, a, b, c, x[i+ 0], 11, -358537222); c = hh(c, d, a, b, x[i+ 3], 16, -722521979); b = hh(b, c, d, a, x[i+ 6], 23, 76029189); a = hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = hh(d, a, b, c, x[i+12], 11, -421815835); c = hh(c, d, a, b, x[i+15], 16, 530742520); b = hh(b, c, d, a, x[i+ 2], 23, -995338651);

    a = ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = ii(c, d, a, b, x[i+14], 15, -1416354905); b = ii(b, c, d, a, x[i+ 5], 21, -57434055); a = ii(a, b, c, d, x[i+12], 6 , 1700485571); d = ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = ii(c, d, a, b, x[i+10], 15, -1051523); b = ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = ii(d, a, b, c, x[i+15], 10, -30611744); c = ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = ii(b, c, d, a, x[i+13], 21, 1309151649); a = ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = ii(d, a, b, c, x[i+11], 10, -1120210379); c = ii(c, d, a, b, x[i+ 2], 15, 718787259); b = ii(b, c, d, a, x[i+ 9], 21, -343485551);

    a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return rhex(a) + rhex(b) + rhex(c) + rhex(d); } ========================================

    ========== Bogus Function ================ function bogus(strng) { var returnstr=""; for(i=1;i<=strng.length;i++) { returnstr=returnstr+"*"; } return returnstr; } =====================================

    ==========A sample web Page============== <html> ..... ..... <script language="JavaScript" src="md5.js"> </script> <br><br><center><form name="f" method="post" action="login.php"> <p>Username<br><input type="text" name="un"></p> <p>Password<br><input type="hidden" name="pw"><input type="password" name="typedpw"></p> <p><input type="submit" name="Submit" value="Submit" onClick="f.pw.value=calcMD5(f.typedpw.value);f.typedpw.value=bogus(f.typed.v alue)"></p> </form></center> ..... ..... </html> ================================= the bogus function here creates a bogus value tor the 'typedpw' so that the user would not get confused by the sudden change in the password length.

    If skipped, - the real password is still posted (security breach) - If a special hidden field is not used, then the password length suddenly increases.

    Disadvantage - If the user clicks the submit button twice, then the password submitted will be incorrect as it would be MD5(MD5(password))! So to come over it,

    <div id="Layer1" style="position:absolute;"><input type="submit" name="Submit" value="Submit" onClick="f.pw.value=calcMD5(f.typedpw.value);f.typedpw.value=bogus(f.typedpw .value);Layer1.style.visibility='hidden';alert();"></div>

    I dont know if it is compatable with other browsers.......

    Lord Loh

    attached mail follows:


    Use the "POST" Method Use MD5 encryption for additional security

    =========== MD5.js============= /* * Convert a 32-bit number to a hex string with ls-byte first */ var hex_chr = "0123456789abcdef"; function rhex(num) { var str = ""; for(var j = 0; j <= 3; j++) str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) + hex_chr.charAt((num >> (j * 8)) & 0x0F); return str; }

    /* * Convert a string to a sequence of 16-word blocks, stored as an array. * Append padding bits and the length, as described in the MD5 standard. */ function str2blks_MD5(str) { var nblk = ((str.length + 8) >> 6) + 1; // number of 16-word blocks var blks = new Array(nblk * 16); for(var i = 0; i < nblk * 16; i++) blks[i] = 0; for(var i = 0; i < str.length; i++) blks[i >> 2] |= str.charCodeAt(i) << ((i % 4) * 8); blks[i >> 2] |= 0x80 << ((i % 4) * 8); blks[nblk * 16 - 2] = str.length * 8; return blks; }

    /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }

    /* * Bitwise rotate a 32-bit number to the left */ function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); }

    /* * These functions implement the basic operation for each round of the * algorithm. */ function cmn(q, a, b, x, s, t) { return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); } function ff(a, b, c, d, x, s, t) { return cmn((b & c) | ((~b) & d), a, b, x, s, t); } function gg(a, b, c, d, x, s, t) { return cmn((b & d) | (c & (~d)), a, b, x, s, t); } function hh(a, b, c, d, x, s, t) { return cmn(b ^ c ^ d, a, b, x, s, t); } function ii(a, b, c, d, x, s, t) { return cmn(c ^ (b | (~d)), a, b, x, s, t); }

    /* * Take a string and return the hex representation of its MD5. */ function calcMD5(str) { var x = str2blks_MD5(str); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878;

    for(i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d;

    a = ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = ff(d, a, b, c, x[i+ 1], 12, -389564586); c = ff(c, d, a, b, x[i+ 2], 17, 606105819); b = ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = ff(b, c, d, a, x[i+ 7], 22, -45705983); a = ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = ff(c, d, a, b, x[i+10], 17, -42063); b = ff(b, c, d, a, x[i+11], 22, -1990404162); a = ff(a, b, c, d, x[i+12], 7 , 1804603682); d = ff(d, a, b, c, x[i+13], 12, -40341101); c = ff(c, d, a, b, x[i+14], 17, -1502002290); b = ff(b, c, d, a, x[i+15], 22, 1236535329);

    a = gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = gg(c, d, a, b, x[i+11], 14, 643717713); b = gg(b, c, d, a, x[i+ 0], 20, -373897302); a = gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = gg(d, a, b, c, x[i+10], 9 , 38016083); c = gg(c, d, a, b, x[i+15], 14, -660478335); b = gg(b, c, d, a, x[i+ 4], 20, -405537848); a = gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = gg(d, a, b, c, x[i+14], 9 , -1019803690); c = gg(c, d, a, b, x[i+ 3], 14, -187363961); b = gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = gg(a, b, c, d, x[i+13], 5 , -1444681467); d = gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = gg(b, c, d, a, x[i+12], 20, -1926607734);

    a = hh(a, b, c, d, x[i+ 5], 4 , -378558); d = hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = hh(c, d, a, b, x[i+11], 16, 1839030562); b = hh(b, c, d, a, x[i+14], 23, -35309556); a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = hh(c, d, a, b, x[i+ 7], 16, -155497632); b = hh(b, c, d, a, x[i+10], 23, -1094730640); a = hh(a, b, c, d, x[i+13], 4 , 681279174); d = hh(d, a, b, c, x[i+ 0], 11, -358537222); c = hh(c, d, a, b, x[i+ 3], 16, -722521979); b = hh(b, c, d, a, x[i+ 6], 23, 76029189); a = hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = hh(d, a, b, c, x[i+12], 11, -421815835); c = hh(c, d, a, b, x[i+15], 16, 530742520); b = hh(b, c, d, a, x[i+ 2], 23, -995338651);

    a = ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = ii(c, d, a, b, x[i+14], 15, -1416354905); b = ii(b, c, d, a, x[i+ 5], 21, -57434055); a = ii(a, b, c, d, x[i+12], 6 , 1700485571); d = ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = ii(c, d, a, b, x[i+10], 15, -1051523); b = ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = ii(d, a, b, c, x[i+15], 10, -30611744); c = ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = ii(b, c, d, a, x[i+13], 21, 1309151649); a = ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = ii(d, a, b, c, x[i+11], 10, -1120210379); c = ii(c, d, a, b, x[i+ 2], 15, 718787259); b = ii(b, c, d, a, x[i+ 9], 21, -343485551);

    a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return rhex(a) + rhex(b) + rhex(c) + rhex(d); } ========================================

    ========== Bogus Function ================ function bogus(strng) { var returnstr=""; for(i=1;i<=strng.length;i++) { returnstr=returnstr+"*"; } return returnstr; } =====================================

    ==========A sample web Page============== <html> ..... ..... <script language="JavaScript" src="md5.js"> </script> <br><br><center><form name="f" method="post" action="login.php"> <p>Username<br><input type="text" name="un"></p> <p>Password<br><input type="hidden" name="pw"><input type="password" name="typedpw"></p> <p><input type="submit" name="Submit" value="Submit" onClick="f.pw.value=calcMD5(f.typedpw.value);f.typedpw.value=bogus(f.typed.v alue)"></p> </form></center> ..... ..... </html> ================================= the bogus function here creates a bogus value tor the 'typedpw' so that the user would not get confused by the sudden change in the password length.

    If skipped, - the real password is still posted (security breach) - If a special hidden field is not used, then the password length suddenly increases.

    Disadvantage - If the user clicks the submit button twice, then the password submitted will be incorrect as it would be MD5(MD5(password))! So to come over it,

    <div id="Layer1" style="position:absolute;"><input type="submit" name="Submit" value="Submit" onClick="f.pw.value=calcMD5(f.typedpw.value);f.typedpw.value=bogus(f.typedpw .value);Layer1.style.visibility='hidden';alert();"></div>

    I dont know if it is compatable with other browsers.......

    Lord Loh

    attached mail follows:


    It is a couple of seconds slow.

    Treating the file as an image means that the rest of the page can still load while it is doing the reverse DNS lookup and executing the script.

    Anyway I have got the answer now

    --
    JJ Harrison
    webmastertececo.com
    www.tececo.com
    

    "Richard Lynch" <richphpbootcamp.com> wrote in message news:php.general-106623news.php.net... > >When the nessicary include file is included it does a reverse-DNS lookup to > >find the remote host's DNS name. The problem with this is that is seems > >slow(at least on my test server with a DSL connection). > > How slow? > > There's, like, a couple seconds slow, which is just how slow reverse-DNS can > be, and *MINUTES* slow... > > > Minutes slow, most likely, indicates that where-ever you are trying to look > up the DNS records is trying to do a reverse DNS on *YOU* (or, rather, PHP's > web-server) and timing out. > > If you have any control over that machine where you are doing the > reverse-DNS, be sure they have your IP address associated with a name. > > For DSL, you can use something like http://dyndns.org to give your dynamic > IP address a domain name. There are dozens of competitors to > http://dyndns.org, and feel free to shop around. > > >I thought the best > >way to speed things up would be putting the entire script into a file and > >then using <img src="stats.php"> within the page. The problem is that I > >don't know how to output the image with PHP. > > Like, I don't even understand the theory here... > > How would the script being in a file (and where is it now?) make the DNS > lookups any faster? I'm so confused. > > At any rate, a sample of how to dump out an image was already posted in this > thread. > > -- > Like Music? http://l-i-e.com/artists.htm >

    attached mail follows:


    ðÒÉ×ÅÔ!

    IMHO java is to be avoided. fullstop. Still, it might be unavoidable from a commercial point of view. In that case, you should avoid being involved in the project and let the marketing dept have their fun on their own.

    There's a lot of pleasantly paid jobs that won't kill your nerves on this planet. Whatever you say now *you* will be responsible for it. So keep away from suicidal attempts.

    Java *may* properly work (but it will never work half as fast as PHP will) but you are not going to find an adequate number of skilled resources to make that happen.

    And when your unproper underpaid resources will turn your java soup into a sloooow boiling mess, guess who will pay for that? Got a mirror home? :)

    I saw a project based on IBM San Francisco last ONE YEAR before being thrown out of the window (along with its manager). The best result of the project was in that it could query a table of 500 rows in only... 45 seconds. New olympic record.

    And no, I was not the manager. My spider sense told me to keep well away from it :)

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    > I agree with the other reply to your question.

    > (Keep in mind that it will be easier to sell Java to > the corporate guys. Some executives shy away from open > source.)

    Php vs. Java? Why not work together.

    copy from manual: " There are two possible ways to bridge PHP and Java: you can either integrate PHP into a Java Servlet environment, which is the more stable and efficient solution, or integrate Java support into PHP. The former is provided by a SAPI module that interfaces with the Servlet server, the latter by the Java extension.

    PHP 4 ext/java provides a simple and effective means for creating and invoking methods on Java objects from PHP. The JVM is created using JNI, and everything runs in-process. Build instructions for ext/java can be found in php4/ext/java/README. "

    > Good luck!!!

    attached mail follows:


    ðÒÉ×ÅÔ!

    Chris Earle wrote: > Thank you for the reply (I don't speak or read Russian if that's what that > other stuff is). It is, but it's nothing more than "hello" and my signature, so you did not miss any basic content :)

    > I forgot to mention that the server is a Win2k server with > IIS 5 running. Obviously I'm not the server admin (otherwise I would be > using Apache). Dunno. Never had that running myself. BUt as far as I can remember Ms security should be directory based. So the guy actually *might* allow you writing somewhere if you can convince him that it would show how clever he is ;)

    > I hope that I can get permissions, but I bet you're right. Probably just > have to create a database, which I planned on doing (and know how to). I > really did want to use XML though, oh well.

    Besides, sooner or later you might need to just log events out to a flat file, right?

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    ðÒÉ×ÅÔ!

    Patrick Teague wrote: > Hello, > > Considering all of this... Would it be better simply to turn > register_globals = On if the vast majority of the stuff you have on your > site is simple search engine type stuff and/or GET variables?

    Well, such stuff needs NOT security, nedless to say. But *any* site needs to work properly. Besides, having the register_globals off does not require gigantic mental efforts to get your values.

    Personally I think that a register_globals off environment is educative, in that it forces you to think about the way data gets passed a bit more than usually. And an aware programmer is better then one who just "believes" in the fact that his next script is gonna get the stuff it needs.

    But whether you have your register_globals on or off variable content validation is still up to your own code, and that's where 99% of security lies. Blocking the globals just bloks anyone from poisoning an *internal* variable of your scripts, legally passed values must be validated as they where before.

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    ðÒÉ×ÅÔ!

    Daniel Negron/KBE wrote: > Is this retaliation ?

    People are so stupid they cannot even understand that we will simply filter him out of our mail right to trash bin :) I'm just sorry Mozilla is missing an autoresponder. I would have him mailed back with some HUUGE .doc any time he writes (after automatically putting his stuff right on the trash bin, which I already do).

    And nothing would be in the doc apart from infinite copies of the instruction for unsubscribing from the list :) Up to a meg or so :)

    But okay, let the hengy-baby play :) He cannot do any harm LOLOL

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Hi,

    Anyone know how long the developers is from a finale release that support Apache 2?

    Please advice!

    Regards,

    Johan

    attached mail follows:


    Who knows when they'll officially state that PHP runs on Apache2 - I've been running it for a while now without much trouble (4.2.1 + 2.0.36/2.0.39) - the only problem that I've really seen (though not been affected by) is that multiple cookies seem to break - only the last cookie is set (obviously overwriting the previous cookie headers) but PHP know about this and it should be fixed in the next release (it's probably fixed in CVS already).

    I've not found any problems with the common compiled extensions. (check http://phpinfo.kyboshed.com [anon/badpassword] for a list of the ones I'm running)

    If I were running a full scale production server I might think differently and run with Apache 1.3.26 but I'm not, just a pro-development server.

    HTH

    Danny.

    ----- Original Message ----- From: "Johan Holst Nielsen" <johan1way2print.net> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 8:10 AM Subject: [PHP] PHP and Apache2?

    > Hi, > > Anyone know how long the developers is from a finale release that > support Apache 2? > > Please advice! > > Regards, > > Johan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    been trying it for a cuple days now

    > -----Original Message----- > From: Miguel Cruz [mailto:mncstoic.net] > Sent: 09 July 2002 9:24 PM > To: Liam Gibbs > Cc: php-generallists.php.net > Subject: Re: [PHP] Took the job into my own hands > > > On Tue, 9 Jul 2002, Liam Gibbs wrote: > > Mr. Hegreberg will be getting an unsubscription notice > > shortly, telling him how to complete his request. > > I tried that about half an hour ago; I don't think he's smart > enough to > follow the instructions. > > miguel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    OK This is a followon from my Browser thread... on php-generallists.php.net; php-windowslists.php.net

    I have switched the application to run from Apache, and the Browsers that were having trouble now seem (I think - will be doing more testing later) to have dissapeared.

    So, is there a problem with IIS or PHP or IIS with PHP?

    [ http://www.the-local-guide.com :: http://www.mcgarvie.net ]

    attached mail follows:


    Okay here is what I want to do.

    Select the field of a database that I want. Hit submit. Execute a query of a database based on the said form. Gather all the data and rows and plug them into an excel generated file. Display a dialogue box asking the user the save the file. The saved file being an excel file with data generated from a database.

    Make sense?

    Would the header calls be something like this? header("Content-type: application/xls"); header("Content-Disposition: attachment; filename=downloaded.xls");

    Now if that is cool, how would I get the data into the downloaded.xls file to have this work?

    Thanks

    Phillip

    attached mail follows:


    ðÒÉ×ÅÔ!

    Phillip S. Baker wrote: > Now if that is cool, how would I get the data into the downloaded.xls > file to have this work?

    1) Save the data as a comma-separated list (pap.data.csv). 2) make an excel macro that will load it into a preexisting sheet and treat it 3) put the macro as the auto starter of the sheet.

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Maybe this will solve your problem

    This code wil save and excel of word file from an MySql query

    http://www.pscode.com/xq/ASP/txtCodeId.625/lngWid.8/qx/vb/scripts/ShowCode.h tm

    Peter

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

    "Phillip S. Baker" <phillipfreewolf.net> schreef in bericht news:5.1.0.14.2.20020710003925.00b1fc38209.164.73.211... > Okay here is what I want to do. > > Select the field of a database that I want. > Hit submit. > Execute a query of a database based on the said form. > Gather all the data and rows and plug them into an excel generated file. > Display a dialogue box asking the user the save the file. > The saved file being an excel file with data generated from a database. > > Make sense? > > Would the header calls be something like this? > header("Content-type: application/xls"); > header("Content-Disposition: attachment; filename=downloaded.xls"); > > Now if that is cool, how would I get the data into the downloaded.xls file > to have this work? > > Thanks > > Phillip >

    attached mail follows:


    [snip] Select the field of a database that I want. Hit submit. Execute a query of a database based on the said form. Gather all the data and rows and plug them into an excel generated file. Display a dialogue box asking the user the save the file. The saved file being an excel file with data generated from a database.

    Make sense? [/snip]

    Read this article on PHP and Excel, it may help... http://www.evolt.org/article/Using_MySQL_and_PHP_to_Present_Excel_Spreadshee ts/20/26896/index.html

    Jay

    attached mail follows:


    Use BiffWriter, I don't know where it lives, you must find it yourself.

    Phillip S. Baker wrote:

    > Okay here is what I want to do. > > Select the field of a database that I want. > Hit submit. > Execute a query of a database based on the said form. > Gather all the data and rows and plug them into an excel generated file. > Display a dialogue box asking the user the save the file. > The saved file being an excel file with data generated from a database. > > Make sense? > > Would the header calls be something like this? > header("Content-type: application/xls"); > header("Content-Disposition: attachment; filename=downloaded.xls"); > > Now if that is cool, how would I get the data into the downloaded.xls > file to have this work? > > Thanks > > Phillip > >

    attached mail follows:


    Hi all. I got a little carried away when discussing the past subject called *is <http://marc.theaimsgroup.com/?l=php-general&m=102609800510170&w=2> their a jobs mailing list?* started by Peter J. <mailto:peterschoenster.com> Schoenster and started building a site like Brian McGarvie <mailto:bmcgarvielennox-mckinlay.co.uk> suggested. I know most of you people are very busy right now, but some of us aren’t. Is there any of you interested in seeing it and maybe (if lucky I am) collaborate with ideas, thoughts, comments or maybe even be a co-founder while teaming up with me as a group for this. Any one interested can go to http://www.icaam.com.ar/proyects/os-seek/ and see what I’ve done so far. Since I started today, the links won’t work yet nor the map or the search engine (just the template) in order to make the required adjustments to the look & feel of the site before it’s too late ;) I made it using a sort-of-self kind of template to facilitate later changes. After I get some sleep and heard some news from all of you who are interested, I’ll make the code available. Also, I want to make some kind of a mailing list just for this purpose. Maybe also a development forum inside the project’s site. I called it os-seek.org because it is available and can change to .com if necessary. Please feel welcome to drop some lines about this and support it. Thanks a lot, <mailto:webmastericaam.com.ar> Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621

    attached mail follows:


    I'm trying to do a little trick with my new site. i have one main php script, index.php which includes the header and footer scripts and the page script between them. the page script is determined by $page, which is set to "main" if it doesnt exist already. $page . ".php" is then included. I have one other page so far, "datetime.php". I wanted to let datatime run itself by including the headers and footers on its own if it wasnt included by index.php. so, i add this to the top and similar code at the bottom (replaced header with footer):

    <? if (!$page=="datetime") // Not using index.php { include("header.php"); } ?>

    this code works when datetime.php is included by index.php, but on its own the script just outputs <html><body></body></html>. Even ignoring the xhtml code outside the php code in the file. its like the entire file is ignored. i really have no clue why. anyone else have one?

    attached mail follows:


    I don't understand quite well your question, but I guess you are trying to include a page inside other pages containing just a script that shows up the actual Date and Time... Well, you could simplify this just by making a finction called i.e. datetime() and call it from wherever you want.

    It that's the case, do this in other page or inside any of your pages (i.e. main.php):

    function datetime() { echo date ("D, jS F Y \a\t G:i:s"); }

    This code is UNTESTED... I forgot if I have to put a backslash (\) before the : in the time part ;)

    Hope this helps,

    C.

    > -----Original Message----- > From: Calvin Spealman [mailto:calvinironfroggy.com] > Sent: Wednesday, July 10, 2002 5:27 AM > To: php-generallists.php.net > Subject: [PHP] strange php output > > I'm trying to do a little trick with my new site. i have one main php > script, index.php which includes the header and footer scripts and the > page script between them. the page script is determined by $page, which > is set to "main" if it doesnt exist already. $page . ".php" is then > included. I have one other page so far, "datetime.php". I wanted to > let datatime run itself by including the headers and footers on its own > if it wasnt included by index.php. so, i add this to the top and > similar code at the bottom (replaced header with footer): > > <? > if (!$page=="datetime") // Not using index.php > { > include("header.php"); > } > ?> > > this code works when datetime.php is included by index.php, but on its > own the script just outputs <html><body></body></html>. Even ignoring > the xhtml code outside the php code in the file. its like the entire > file is ignored. i really have no clue why. anyone else have one? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    ðÒÉ×ÅÔ!

    Calvin Spealman wrote: > <? > if (!$page=="datetime") // Not using index.php > { > include("header.php"); > } > ?> > > this code works when datetime.php is included by index.php, but on its > own the script just outputs <html><body></body></html>. Even ignoring > the xhtml code outside the php code in the file. its like the entire > file is ignored. i really have no clue why. anyone else have one?

    Before using a variable (in a comparison or wherever) you should make sure it *does* exist.

    try

    if (isset($page) && !($page=="datetime")) // Not using index.php { include("header.php"); }

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Calvin,

    this: (!$page=="datetime")

    (as I interpret it, that means if $page is false, and it's equal to datetime (which should, in this context, also be false))....

    looks like it should read: ($page!="datetime")

    James

    "Calvin Spealman" <calvinironfroggy.com> wrote in message news:3D2BEFC9.2000308ironfroggy.com... > I'm trying to do a little trick with my new site. i have one main php > script, index.php which includes the header and footer scripts and the > page script between them. the page script is determined by $page, which > is set to "main" if it doesnt exist already. $page . ".php" is then > included. I have one other page so far, "datetime.php". I wanted to > let datatime run itself by including the headers and footers on its own > if it wasnt included by index.php. so, i add this to the top and > similar code at the bottom (replaced header with footer): > > <? > if (!$page=="datetime") // Not using index.php > { > include("header.php"); > } > ?> > > this code works when datetime.php is included by index.php, but on its > own the script just outputs <html><body></body></html>. Even ignoring > the xhtml code outside the php code in the file. its like the entire > file is ignored. i really have no clue why. anyone else have one? >

    attached mail follows:


    ðÒÉ×ÅÔ!

    in PHP we have a set of comparison operators going like

    $a == $b (has same value) $a === $b (has same value and type)

    shouldn't we have also something like $a =&= $b (is same instance)?

    Maybe we already have it and I just don't know about it. Is that so? Because of the copy/reference mechanism it would really be helpful in order to check one's work in referencing objects.

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Dear all I had a folder which contain some pdf report, the name of the Report will be : xxx.xxx.20020702.pdf.

    Here is what i want to do : 1. there will be a Form let user to submit the date of reports that he / she wants to view. 2. the php will get the xxx.xxx from a mysql database and add the date at the end of the string as the file name. 3. If the filename exist in that specific folder, then it will show a hyperlink for each exist report, otherwise nothing will shows up!

    I want to know how i can use php to detect if such file is exist in that specific Folder?

    --
    Thx a lot!
    Jack
    nedcor4nedcor.com.hk
    

    attached mail follows:


    Read http://www.php.net/manual/en/function.file-exists.php and get surprised ;)

    C.

    > -----Original Message----- > From: Jack [mailto:nedcor4nedcor.com.hk] > Sent: Wednesday, July 10, 2002 5:27 AM > To: php-generallists.php.net; php-windowslists.php.net > Subject: [PHP] How to dectect if a file exist in specific Folder > > Dear all > I had a folder which contain some pdf report, the name of the Report will > be > : > xxx.xxx.20020702.pdf. > > Here is what i want to do : > 1. there will be a Form let user to submit the date of reports that he / > she > wants to view. > 2. the php will get the xxx.xxx from a mysql database and add the date at > the end of the string as the file name. > 3. If the filename exist in that specific folder, then it will show a > hyperlink for each exist report, otherwise nothing will shows up! > > I want to know how i can use php to detect if such file is exist in that > specific Folder? > > -- > Thx a lot! > Jack > nedcor4nedcor.com.hk > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    On Wednesday 10 July 2002 16:26, Jack wrote: > Dear all > I had a folder which contain some pdf report, the name of the Report will > be > > xxx.xxx.20020702.pdf. > > Here is what i want to do : > 1. there will be a Form let user to submit the date of reports that he / > she wants to view. > 2. the php will get the xxx.xxx from a mysql database and add the date at > the end of the string as the file name. > 3. If the filename exist in that specific folder, then it will show a > hyperlink for each exist report, otherwise nothing will shows up! > > I want to know how i can use php to detect if such file is exist in that > specific Folder?

    is_file()

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* One father is more than a hundred schoolmasters. -- George Herbert */

    attached mail follows:


    hello all,

    i've install php 4.2.1 with apache 1.3.24 but when i do something like : page.php?var=value&var1=value1

    then it does nothing. does any one have a solution ? or is it something that i have tot change in php.ini ?

    thanks in advance,

    Richard Pijnenburg The netherlands

    attached mail follows:


    On Wednesday 10 July 2002 16:29, richard.mailsofthome.net wrote: > hello all, > > i've install php 4.2.1 with apache 1.3.24 > but when i do something like : > page.php?var=value&var1=value1 > > then it does nothing. > does any one have a solution ? > or is it something that i have tot change in php.ini ?

    register_globals

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* A transistor protected by a fast-acting fuse will protect the fuse by blowing first. */

    attached mail follows:


    Goto http://www.php.net/manual/en/language.variables.predefined.php where it says:

    [quote] ...$_GET['id'] from the URL http://www.example.com/test.php?id=3 instead of $id... [/quote]

    C.

    > -----Original Message----- > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > Sent: Wednesday, July 10, 2002 5:29 AM > To: php-generallists.php.net > Subject: [PHP] not parsing vars > > hello all, > > i've install php 4.2.1 with apache 1.3.24 > but when i do something like : > page.php?var=value&var1=value1 > > then it does nothing. > does any one have a solution ? > or is it something that i have tot change in php.ini ? > > thanks in advance, > > Richard Pijnenburg > The netherlands > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Hmm, why post this here when I already answered your question in PHP-DB (where it shouldn't have been in the first place) almost 40 minutes before this post?

    Regards Joakim Andersson

    > -----Original Message----- > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > Sent: Wednesday, July 10, 2002 10:29 AM > To: php-generallists.php.net > Subject: [PHP] not parsing vars > > > hello all, > > i've install php 4.2.1 with apache 1.3.24 > but when i do something like : > page.php?var=value&var1=value1 > > then it does nothing. > does any one have a solution ? > or is it something that i have tot change in php.ini ? > > thanks in advance, > > Richard Pijnenburg > The netherlands > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Rodolfo Gonzalez wrote: > To the kind moderator of the list: please kick off this guy (Erik > Hegreberg <ehegrebeonline.no> ), he's really annoying. Or at least bounce > his e-mails back to him ;) ).

    Go for the bounce option ;-)

    -- 
    Mark gallagher
    

    attached mail follows:


    how about all of us say *hi* to this erik hegreberg .... the fact we a a bunch of guys with manner so we all must say HI to erik ;-)

    On Wednesday 10 July 2002 03:40 pm, Mark Gallagher wrote: > Rodolfo Gonzalez wrote: > > To the kind moderator of the list: please kick off this guy (Erik > > Hegreberg <ehegrebeonline.no> ), he's really annoying. Or at least > > bounce his e-mails back to him ;) ). > > Go for the bounce option ;-)

    attached mail follows:


    Rick Emery wrote: > lets all spam Erik

    No, not spam (unless you define "spam" as what everyone else is doing - sending receipts).

    Send reply receipts all you want ($deity knows I am <g />), and setting something up to bounce his messages back to him'd be great, but in both cases he "asked" for them - he specifically requested the receipts, and he's been spamming the list so it's only fair he receives the bounces.

    But if we resort to our own, separate spamming campaign we're as bad as him.

    -- 
    Mark Gallagher
    

    attached mail follows:


    hi all,

    (yes it's me again)

    i've got an other problem.

    i've got an login system, and it has to put an cookie, but it seems he doesn't do it.

    is it an php.ini problem ??

    thnx in advanced. Richard

    attached mail follows:


    > (yes it's me again) > i've got an other problem. > i've got an login system, and it has to put an cookie, but it seems he > doesn't do it. > is it an php.ini problem ??

    Dont think it a php.ini file.

    First of all. Remember to set the cookie before any other headers is sent to the browser.

    Do you remember to reload the page after the cookie is sent? (some browser cant see the cookie at the page it sent but first after it have been reloaded!).

    Else? Please post an URL to your source, or post some sources here!

    Are your sure about your browser settings? Do your denied websites to set cookies?

    mvh Johan

    attached mail follows:


    Hi Richard. It is very probable I will not be able to solve this kind of problems with my few knowledge, but in order to save everybody's time (specially yours), I will have to advise you that more advanced writers will ask you for a more accurate description of your problem such as Server's Software and versions, what your code looks like, and what problem you see like errors or such.

    C.

    > -----Original Message----- > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > Sent: Wednesday, July 10, 2002 5:50 AM > To: php-generallists.php.net > Subject: [PHP] cookie ? > > hi all, > > (yes it's me again) > > i've got an other problem. > > i've got an login system, and it has to put an cookie, but it seems he > doesn't do it. > > is it an php.ini problem ?? > > thnx in advanced. > Richard > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Johan Holst Nielsen wrote:

    >> (yes it's me again) >> i've got an other problem. >> i've got an login system, and it has to put an cookie, but it seems >> he doesn't do it. >> is it an php.ini problem ?? > > > Dont think it a php.ini file. > > First of all. Remember to set the cookie before any other headers is > sent to the browser. > > Do you remember to reload the page after the cookie is sent? (some > browser cant see the cookie at the page it sent but first after it > have been reloaded!).

    Actualy this is not browser issue but PHP issue

    > > Else? Please post an URL to your source, or post some sources here! > > Are your sure about your browser settings? Do your denied websites to > set cookies? > > mvh > Johan > > >

    attached mail follows:


    ðÒÉ×ÅÔ!

    richard.mailsofthome.net wrote: > hi all, > (yes it's me again) > i've got an other problem. > i've got an login system, and it has to put an cookie, but it seems he > doesn't do it.

    1) users may block your cookie. 2) browsers (they often do) may not respond properly to a setcookie() command when it specifies more than just name and value for the cookie (that is, when you set an expiration date or limit your cookie's visibility scope to a subdirectory)

    If you have problem 1 there's nothing you can do. Change strategy. No user will be able to log to your system if they don't accept cookies.

    If that happens to you when debugging and you know your browser *does* accept cookies, then try and send the cookie in the headers instead of using setcookie()

    Like this:

    // send/refresh cookie $time = mktime()+ YourCookieLifeTimeInDays*86400; $date = date("l, d-M-y H:i:s", ($time)); header("Set-Cookie: yourCookieName=Y; expires=$date GMT");

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ× -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    > it's not the browser or what so ever, > i installed php 4.2.1. with apache 1.3.24 on a Redhat 7.1 server. > > but becuas for some kind a reason it wont work :( > > any body got an idea ??

    try to get the cookie witgh

    $_COOKIE["cookiename"];

    if you have register_globals = off!

    Regards, Johan

    attached mail follows:


    >> Do you remember to reload the page after the cookie is sent? (some >> browser cant see the cookie at the page it sent but first after it >> have been reloaded!). > > > Actualy this is not browser issue but PHP issue

    Aah, sorry... but it doesn't matter in this case, it could be one of the errors? :)

    mvh Johan

    attached mail follows:


    Lazor, Ed wrote: > I wonder if he's using PHP to automate sending the messages. hehe

    And in the blink of an eye we're back on topic :o)

    -- 
    Mark Gallagher
    

    attached mail follows:


    Well, he likely never be able to unsubscribe himself, as he needs to reply to the unsubscribe notice, but his account is now full.

    R'twick Niceorgaw wrote:

    >I just setup a rule in OE to forward his own mail to himself and delete it >form my machine >----- Original Message ----- >From: "Jeff Lewis" <jeffhyrum.net> >To: "R'twick Niceorgaw" <rtwickniceorgaw.com>; <php-generallists.php.net> >Sent: Tuesday, July 09, 2002 12:42 PM >Subject: Re: [PHP]Erik Hegreberg > > > > >>He is both, he has been emailed how to get off. For now, I keep just >> >> >sending > > >>my read receipts :) >> >> >>----- Original Message ----- >>From: "R'twick Niceorgaw" <rtwickniceorgaw.com> >>To: "Erik Hegreberg" <ehegrebeonline.no>; <php-generallists.php.net> >>Sent: Tuesday, July 09, 2002 6:30 PM >>Subject: Re: [PHP] >> >> >> >wwwwwwwwwwwwwwwwwwwwipoh'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > >>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> >> >> >> >>>are you doped or mentally challenged ? >>>----- Original Message ----- >>>From: "Erik Hegreberg" <ehegrebeonline.no> >>>To: <php-generallists.php.net> >>>Sent: Tuesday, July 09, 2002 12:26 PM >>>Subject: [PHP] >>> >>> >>> >wwwwwwwwwwwwwwwwwwwwipoh'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > >>>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>> >>> >>> >>> >>> >>> >>>-- >>>PHP General Mailing List (http://www.php.net/) >>>To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>> >>> >>> >> >> > > > > >

    attached mail follows:


    Ben Ramsey wrote: > I've just joined this mailing list this afternoon. Does this kind of thing > happen often? If so, I'm going to leave the list.

    I've been on the list for about two months, and it's the first time *I've* seen it happen. Usually the real morons stick to newsgroups :-).

    The list really can be a valuable resource (I don't know much PHP, so I don't contribute often - but I read a lot of it), so I'd urge you not to unsubscribe. Or, if you do unsubscribe, to wait out until Erik is likely to have finally worked out how to leave, then re-subscribe.

    If you can't bring yourself to do this, then at least get into contact with Richard Lynch and John Holmes (if they're willing) - they seem to be the most helpful and knowledgeable contributors :o).

    HTH, HAND

    -- 
    Mark Gallagher
    http://cyberfuddle.com/infinitebabble/
    

    attached mail follows:


    ----- Original Message ----- From: "Mark Gallagher" <markcyberfuddle.com> To: "Ben Ramsey" <beneureka-interactive.com> Cc: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 10:14 AM Subject: Re: [PHP] ??????????????????????????????????????????????????????````````````````````ØØ ØØØØØØØØ

    > The list really can be a valuable resource (I don't know much PHP, so I > don't contribute often - but I read a lot of it), so I'd urge you not to > unsubscribe. Or, if you do unsubscribe, to wait out until Erik is > likely to have finally worked out how to leave, then re-subscribe.

    Zeev's already banned him from all php.net lists - he can't post now, even if he wanted too!

    Danny.

    attached mail follows:


    Now I reminded myself of WebDAV (http://www.webdav.org/), it is a filesystem over http. There is an apache module available (http://www.webdav.org/mod_dav/). It should be easier to set up then VPN.

    Chris Hewitt wrote:

    > Thanks > > Marek Kilimajer wrote: > >> If you can use virtual private network, it is secure. But I don't >> know about plain Samba solution. >> > > >

    attached mail follows:


    Marek,

    Thanks to you and all the others who have responded on this, its really appreciated.

    Regards

    Chris

    Marek Kilimajer wrote:

    > Now I reminded myself of WebDAV (http://www.webdav.org/), it is a > filesystem over http. > There is an apache module available (http://www.webdav.org/mod_dav/). > It should be easier > to set up then VPN. > > Chris Hewitt wrote: > >> Thanks >> >> Marek Kilimajer wrote: >> >>> If you can use virtual private network, it is secure. But I don't >>> know about plain Samba solution. >>> >> >> >> > > >

    attached mail follows:


    HELLO,

    I just installed PHP 4.2.1. I am using a Redhat 7.3, installed as server with Apache.

    My problem is I can t compile it as a module for Apache :

    ./configure --with-apache=/usr/include/apache

    configure: error: Invalid Apache directory - unable to find httpd.h under /usr/include/apache

    But hhtpd.h is really under /usr/inclu/apache [rootlocalhost php-4.2.1]# slocate httpd.h /usr/include/apache/httpd.h

    Any idea ?

    David.

    The information contained in this e-mail message may be privileged and confidential information and is intended only for the use of the individual and/or entity identified in the alias address of this message. If the reader of this message is not the intended recipient, or an employee or agent responsible to deliver it to the intended recipient, you are hereby requested not to distribute or copy this communication. If you have received this communication in error, please notify us immediately by telephone or return e-mail and delete the original message from your system.

    attached mail follows:


    On Wednesday 10 July 2002 17:25, DSteculorumxlserv.com wrote: > HELLO, > > I just installed PHP 4.2.1. I am using a Redhat 7.3, installed as server > with Apache. > > My problem is I can t compile it as a module for Apache : > > ./configure --with-apache=/usr/include/apache > > configure: error: Invalid Apache directory - unable to find httpd.h under > /usr/include/apache > > > > But hhtpd.h is really under /usr/inclu/apache > [rootlocalhost php-4.2.1]# slocate httpd.h > /usr/include/apache/httpd.h

    Try:

    --with-apache=/usr/include OR --with-apache=/usr

    But you're better off using apxs instead:

    --with-apxs=/usr/local/apache/bin/apxs

    Obviously the path to apxs on your system may differ.

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* Necessity has no law. -- St. Augustine */

    attached mail follows:


    Hello,

    I just installed PHP 4.2.1. I am using a Redhat 7.3, installed as server with Apache. I went to setup a distributed IDS (SNORT/MySQL/PHP/ACID).

    My second problem is the connection with my MySQL DB.

    ./configure --with-mysql

    ./configure --with-mysql --with-gd=../gd-1.8.4 --enable-sockets --with-config-file-path=/etc/httpd/conf --enable-track-vars

    [rootlocalhost php-4.2.1]# ./configure --with-mysql | grep mysql checking for MySQL UNIX socket... /var/lib/mysql/mysql.sock fastgen.sh: creating ext/mysql/Makefile fastgen.sh: creating ext/mysql/libmysql/Makefile

    The compilation with mysql seems fine. But when I check my Web page (Acid)

    PHP ERROR: PHP build incomplete: the prerequisite MySQL support required to read the alert database was not built into PHP. Please recompile PHP with the necessary library (--with-mysql)

    What can I do ?

    Regards,

    The information contained in this e-mail message may be privileged and confidential information and is intended only for the use of the individual and/or entity identified in the alias address of this message. If the reader of this message is not the intended recipient, or an employee or agent responsible to deliver it to the intended recipient, you are hereby requested not to distribute or copy this communication. If you have received this communication in error, please notify us immediately by telephone or return e-mail and delete the original message from your system.

    attached mail follows:


    Hi,

    Do anybody know a work a round for this:

    <?php

    class test { function test() { $globals['test2'] = &$this; } }

    $test1 = new test();

    ?>

    The problem hier is that $globals['test2'] is a copy of $globals['test1'] not a references.

    Anybody an idee?

    attached mail follows:


    ðÒÉ×ÅÔ!

    > <?php > > class test { > function test() { > $globals['test2'] = &$this; > } > } > > $test1 = new test(); > > ?> > > The problem hier is that $globals['test2'] is a copy of $globals['test1'] not a > references.

    It is, but you are looking in the wrong direction. the copy is in test1, test2 holds the reference.

    This should work:

    <?php > > class test { > function &test() { > $globals['test2'] = &$this; > } > } > > $test1 = new test(); > > ?>

    To output a reference instead of a copy a function *must* be declared with an &. Not sure whether you might also need it here:

    $test1 = new &test();

    check it out

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    my cookie problem is still not solved :( my browser settings are correct, and the script has worked.

    but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :(

    does any one have an solution ??

    thnx in advance,

    Richard

    attached mail follows:


    > my cookie problem is still not solved :( > my browser settings are correct, and the script has worked. > but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :( > does any one have an solution ?? > thnx in advance,

    Sure about your register_globals = off?

    please show us the source, or a link to at phps file... And a link to a phpinfo() file?

    I cant help you without further information!

    Regards, Johan

    attached mail follows:


    Johan Holst Nielsen writes:

    > >> my cookie problem is still not solved :( >> my browser settings are correct, and the script has worked. >> but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :( >> does any one have an solution ?? >> thnx in advance, > > > Sure about your register_globals = off? > > please show us the source, or a link to at phps file... > And a link to a phpinfo() file? > > I cant help you without further information! > > Regards, > Johan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > the setting in php.ini :

    register_globals = on

    i simpley put an cookie with :

    setcookie("gfo_cms" ,$sessid , '');

    and i read it with :

    <?

    if (isset($HTTP_COOKIE_VARS["gfo_cms"])) { $sessid = $HTTP_COOKIE_VARS["gfo_cms"]; if (!check_valid_sessid($sessid)) { login_form(); } if (!check_ip($sessid, $REMOTE_ADDR)) { login_form(); } $rights = get_user_rights($sessid); $user_id = get_userid_from_sessid($sessid);

    } if (!isset($HTTP_COOKIE_VARS["gfo_cms"])) { login_form(); }

    ?>

    the last code looks if the cookie exists ... but it look likes it won't even create the cookie

    an idea's ?

    attached mail follows:


    My experience with cookies is really unhappy. I've once developed a website that needed to store information. I though hey cookies are the quicker option.... to hell with sessions.

    Now today.... after all of my problems with the cookies environment i've turned back to sessions. Sessions can store a much higher amount of data... and that doesn't have to rely on the client browser either.

    I mean if i visit a site that needs to have cookies enabled... i'm pretty stuffed.... I can't see nothing but if the site uses sessions dam i'm organized....

    If you feel you have too many problems with cookies.... refer back to sessions it's the best option... well that i've come down to.

    "Richard Mail" <richard.mailsofthome.net> wrote in message news:courier.3D2C05CA.00007C88softhome.net... > my cookie problem is still not solved :( > my browser settings are correct, and the script has worked. > > but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :( > > does any one have an solution ?? > > thnx in advance, > > Richard

    attached mail follows:


    Hi all. I’m trying to figure out how to do a search trough a MySQL db using LIKE or = but the thing is that I have 3 select boxes from where to choose the search terms. Can I use something like a wildcard instead of making several IF statements like this? SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 = % % goes for an unselected select box (default value = %) in case the user doesn’t want to make an *advanced* search, so it fetches all rows which does contains values 1 & 2. Thanks, <mailto:webmastericaam.com.ar> Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621

    attached mail follows:


    Shit..... Doesn't really make sense Sorry... I probably don't understand

    do you have an online example.

    "César aracena" <icaamicaam.com.ar> wrote in message news:000101c227fb$74eed940$68ed0dd1gateway... Hi all.

    I'm trying to figure out how to do a search trough a MySQL db using LIKE or = but the thing is that I have 3 select boxes from where to choose the search terms. Can I use something like a wildcard instead of making several IF statements like this?

    SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 = %

    % goes for an unselected select box (default value = %) in case the user doesn't want to make an *advanced* search, so it fetches all rows which does contains values 1 & 2.

    Thanks,

    <mailto:webmastericaam.com.ar> Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621

    attached mail follows:


    why put in your query you want to look for an value .. if they don't want to look for it ?..

    vins writes:

    > Shit..... > Doesn't really make sense > Sorry... I probably don't understand > > do you have an online example. > > > "César aracena" <icaamicaam.com.ar> wrote in message > news:000101c227fb$74eed940$68ed0dd1gateway... > Hi all. > > I'm trying to figure out how to do a search trough a MySQL db using LIKE > or = but the thing is that I have 3 select boxes from where to choose > the search terms. Can I use something like a wildcard instead of making > several IF statements like this? > > SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 > = % > > % goes for an unselected select box (default value = %) in case the user > doesn't want to make an *advanced* search, so it fetches all rows which > does contains values 1 & 2. > > Thanks, > > <mailto:webmastericaam.com.ar> Cesar Aracena > CE / MCSE+I > Neuquen, Argentina > +54.299.6356688 > +54.299.4466621 > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Ok. Maybe I didn't express myself well (must be the 3-4 days awake ;)

    No, I don't have an example on-line 'couse this is something I'll start doing in a few days or hours. Well, just what it will probably be the search options at: http://www.icaam.com.ar/proyects/os-seek/ which I posted a few hours ago.

    What I want, is to let the visitor search for an OS developer by WORK-AROUND and/or LANGUAGE and/or LOCATION and have just ONE static query to handle all this. The thing is that if I make the query like this:

    SELECT * FROM table_name WHERE col1 = $elect1 AND col2 = $select2 AND col3 = $select3

    I think maybe the script will go nuts if no option was selected (remember the and/or?). So I figured out that maybe by telling HTML that the default value of each SELECT box is % (or any kind of wildcard) the query might run as predicted. Does this makes ant sense now?

    Please go to the site I've mentioned before and afterwards (if have the time and will) go back a couple of dozens post back and read the post called *MORE WORK FOR US I HOPE* so you have a more clear understanding of what my need will be.

    Thanks, C.

    > -----Original Message----- > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > Sent: Wednesday, July 10, 2002 7:27 AM > To: php-generallists.php.net > Subject: [PHP] Re: Wildcard > > why put in your query you want to look for an value .. if they don't want > to > look for it ?.. > > > vins writes: > > > Shit..... > > Doesn't really make sense > > Sorry... I probably don't understand > > > > do you have an online example. > > > > > > "César aracena" <icaamicaam.com.ar> wrote in message > > news:000101c227fb$74eed940$68ed0dd1gateway... > > Hi all. > > > > I'm trying to figure out how to do a search trough a MySQL db using LIKE > > or = but the thing is that I have 3 select boxes from where to choose > > the search terms. Can I use something like a wildcard instead of making > > several IF statements like this? > > > > SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 > > = % > > > > % goes for an unselected select box (default value = %) in case the user > > doesn't want to make an *advanced* search, so it fetches all rows which > > does contains values 1 & 2. > > > > Thanks, > > > > <mailto:webmastericaam.com.ar> Cesar Aracena > > CE / MCSE+I > > Neuquen, Argentina > > +54.299.6356688 > > +54.299.4466621 > > > > > > > > > > > > -- > > 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:


    <?php $separator = "WHERE "; $sql_query = "SELECT * FROM table_name "; if(isset($_POST['select1'])) // Or maybe if($_POST['select1'] != "")) { $sql_query .= $separator; $sql_query .= "col1 = '{$_POST['select1']}' "; $separator = "AND "; } if(isset($_POST['select2'])) { $sql_query .= $separator; $sql_query .= "col2 = '{$_POST['select2']}' "; $separator = "AND "; } if(isset($_POST['select3'])) { $sql_query .= $separator; $sql_query .= "col3 = '{$_POST['select3']}' "; $separator = "AND "; }

    run_sql_query_here(...)

    ?>

    Regards Joakim Andersson

    > -----Original Message----- > From: César Aracena [mailto:icaamicaam.com.ar] > Sent: Wednesday, July 10, 2002 12:50 PM > To: richard.mailsofthome.net; php-generallists.php.net > Subject: RE: [PHP] Re: Wildcard > > > Ok. Maybe I didn't express myself well (must be the 3-4 days awake ;) > > No, I don't have an example on-line 'couse this is something > I'll start > doing in a few days or hours. Well, just what it will probably be the > search options at: http://www.icaam.com.ar/proyects/os-seek/ which I > posted a few hours ago. > > What I want, is to let the visitor search for an OS developer by > WORK-AROUND and/or LANGUAGE and/or LOCATION and have just ONE static > query to handle all this. The thing is that if I make the query like > this: > > SELECT * FROM table_name WHERE col1 = $elect1 AND col2 = $select2 AND > col3 = $select3 > > I think maybe the script will go nuts if no option was selected > (remember the and/or?). So I figured out that maybe by > telling HTML that > the default value of each SELECT box is % (or any kind of > wildcard) the > query might run as predicted. Does this makes ant sense now? > > Please go to the site I've mentioned before and afterwards > (if have the > time and will) go back a couple of dozens post back and read the post > called *MORE WORK FOR US I HOPE* so you have a more clear > understanding > of what my need will be. > > Thanks, C. > > > -----Original Message----- > > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > > Sent: Wednesday, July 10, 2002 7:27 AM > > To: php-generallists.php.net > > Subject: [PHP] Re: Wildcard > > > > why put in your query you want to look for an value .. if they don't > want > > to > > look for it ?.. > > > > > > vins writes: > > > > > Shit..... > > > Doesn't really make sense > > > Sorry... I probably don't understand > > > > > > do you have an online example. > > > > > > > > > "César aracena" <icaamicaam.com.ar> wrote in message > > > news:000101c227fb$74eed940$68ed0dd1gateway... > > > Hi all. > > > > > > I'm trying to figure out how to do a search trough a > MySQL db using > LIKE > > > or = but the thing is that I have 3 select boxes from where to > choose > > > the search terms. Can I use something like a wildcard instead of > making > > > several IF statements like this? > > > > > > SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND > col3 > > > = % > > > > > > % goes for an unselected select box (default value = %) > in case the > user > > > doesn't want to make an *advanced* search, so it fetches all rows > which > > > does contains values 1 & 2. > > > > > > Thanks, > > > > > > <mailto:webmastericaam.com.ar> Cesar Aracena > > > CE / MCSE+I > > > Neuquen, Argentina > > > +54.299.6356688 > > > +54.299.4466621 > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Theres no point selecting on a value if they've not specified one. The following code should generate a valid query, assumin that the default value for each value select value is an empty string:

    $query = "SELECT * FROM table_name ";

    $where_string = "WHERE "; $and = ""; if ($select1 != "") { $where_string .= $and."col1 = '".addslashes($select1)."'"; $and = " AND "; } if ($select2 != "") { $where_string .= $and."col2 = '".addslashes($select2)."'"; $and = " AND "; } if ($select3 != "") { $where_string .= $and."col3 = '".addslashes($select3)."'"; $and = " AND "; }

    if ($where_string != "WHERE ") { $query .= $where_string; }

    And then run the query as normal.

    HTH,

    Richy

    ========================================== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: rblackdatavisibility.co.uk

    -----Original Message----- From: César Aracena [mailto:icaamicaam.com.ar] Sent: 10 July 2002 11:50 To: richard.mailsofthome.net; php-generallists.php.net Subject: RE: [PHP] Re: Wildcard

    Ok. Maybe I didn't express myself well (must be the 3-4 days awake ;)

    No, I don't have an example on-line 'couse this is something I'll start doing in a few days or hours. Well, just what it will probably be the search options at: http://www.icaam.com.ar/proyects/os-seek/ which I posted a few hours ago.

    What I want, is to let the visitor search for an OS developer by WORK-AROUND and/or LANGUAGE and/or LOCATION and have just ONE static query to handle all this. The thing is that if I make the query like this:

    SELECT * FROM table_name WHERE col1 = $elect1 AND col2 = $select2 AND col3 = $select3

    I think maybe the script will go nuts if no option was selected (remember the and/or?). So I figured out that maybe by telling HTML that the default value of each SELECT box is % (or any kind of wildcard) the query might run as predicted. Does this makes ant sense now?

    Please go to the site I've mentioned before and afterwards (if have the time and will) go back a couple of dozens post back and read the post called *MORE WORK FOR US I HOPE* so you have a more clear understanding of what my need will be.

    Thanks, C.

    > -----Original Message----- > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > Sent: Wednesday, July 10, 2002 7:27 AM > To: php-generallists.php.net > Subject: [PHP] Re: Wildcard > > why put in your query you want to look for an value .. if they don't want > to > look for it ?.. > > > vins writes: > > > Shit..... > > Doesn't really make sense > > Sorry... I probably don't understand > > > > do you have an online example. > > > > > > "César aracena" <icaamicaam.com.ar> wrote in message > > news:000101c227fb$74eed940$68ed0dd1gateway... > > Hi all. > > > > I'm trying to figure out how to do a search trough a MySQL db using LIKE > > or = but the thing is that I have 3 select boxes from where to choose > > the search terms. Can I use something like a wildcard instead of making > > several IF statements like this? > > > > SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 > > = % > > > > % goes for an unselected select box (default value = %) in case the user > > doesn't want to make an *advanced* search, so it fetches all rows which > > does contains values 1 & 2. > > > > Thanks, > > > > <mailto:webmastericaam.com.ar> Cesar Aracena > > CE / MCSE+I > > Neuquen, Argentina > > +54.299.6356688 > > +54.299.4466621 > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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

    attached mail follows:


    Thanks everyone for your attention but still at the 1st step. What I want (not need but want) is to keep my code as short as possible for future referencing from others. Looking at some on-line manuals I found this just now:

    (^|[^a-zA-Z])foo([^a-zA-Z]|$)

    which Works if you want to find "foo" in "foo bar", "bar foo", "bar foo bar", or "foo" but NOT in "foobar" or "barfoo".

    I guess that just by taking out the *foo* word between them can make it work for quite a useful wildcard. What do you think pals?

    C.

    > -----Original Message----- > From: Richard Black [mailto:rblackdatavisibility.co.uk] > Sent: Wednesday, July 10, 2002 8:06 AM > To: 'César Aracena' > Cc: php-generallists.php.net > Subject: RE: [PHP] Re: Wildcard > > Theres no point selecting on a value if they've not specified one. The > following code should generate a valid query, assumin that the default > value for each value select value is an empty string: > > $query = "SELECT * FROM table_name "; > > $where_string = "WHERE "; > $and = ""; > if ($select1 != "") { > $where_string .= $and."col1 = '".addslashes($select1)."'"; > $and = " AND "; > } > if ($select2 != "") { > $where_string .= $and."col2 = '".addslashes($select2)."'"; > $and = " AND "; > } > if ($select3 != "") { > $where_string .= $and."col3 = '".addslashes($select3)."'"; > $and = " AND "; > } > > if ($where_string != "WHERE ") { > $query .= $where_string; > } > > And then run the query as normal. > > HTH, > > Richy > > ========================================== > Richard Black > Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com > Tel: 0141 435 3504 > Email: rblackdatavisibility.co.uk > > -----Original Message----- > From: César Aracena [mailto:icaamicaam.com.ar] > Sent: 10 July 2002 11:50 > To: richard.mailsofthome.net; php-generallists.php.net > Subject: RE: [PHP] Re: Wildcard > > > Ok. Maybe I didn't express myself well (must be the 3-4 days awake ;) > > No, I don't have an example on-line 'couse this is something I'll start > doing in a few days or hours. Well, just what it will probably be the > search options at: http://www.icaam.com.ar/proyects/os-seek/ which I > posted a few hours ago. > > What I want, is to let the visitor search for an OS developer by > WORK-AROUND and/or LANGUAGE and/or LOCATION and have just ONE static > query to handle all this. The thing is that if I make the query like > this: > > SELECT * FROM table_name WHERE col1 = $elect1 AND col2 = $select2 AND > col3 = $select3 > > I think maybe the script will go nuts if no option was selected > (remember the and/or?). So I figured out that maybe by telling HTML that > the default value of each SELECT box is % (or any kind of wildcard) the > query might run as predicted. Does this makes ant sense now? > > Please go to the site I've mentioned before and afterwards (if have the > time and will) go back a couple of dozens post back and read the post > called *MORE WORK FOR US I HOPE* so you have a more clear understanding > of what my need will be. > > Thanks, C. > > > -----Original Message----- > > From: richard.mailsofthome.net [mailto:richard.mailsofthome.net] > > Sent: Wednesday, July 10, 2002 7:27 AM > > To: php-generallists.php.net > > Subject: [PHP] Re: Wildcard > > > > why put in your query you want to look for an value .. if they don't > want > > to > > look for it ?.. > > > > > > vins writes: > > > > > Shit..... > > > Doesn't really make sense > > > Sorry... I probably don't understand > > > > > > do you have an online example. > > > > > > > > > "César aracena" <icaamicaam.com.ar> wrote in message > > > news:000101c227fb$74eed940$68ed0dd1gateway... > > > Hi all. > > > > > > I'm trying to figure out how to do a search trough a MySQL db using > LIKE > > > or = but the thing is that I have 3 select boxes from where to > choose > > > the search terms. Can I use something like a wildcard instead of > making > > > several IF statements like this? > > > > > > SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND > col3 > > > = % > > > > > > % goes for an unselected select box (default value = %) in case the > user > > > doesn't want to make an *advanced* search, so it fetches all rows > which > > > does contains values 1 & 2. > > > > > > Thanks, > > > > > > <mailto:webmastericaam.com.ar> Cesar Aracena > > > CE / MCSE+I > > > Neuquen, Argentina > > > +54.299.6356688 > > > +54.299.4466621 > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP 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:


    Cesar,

    Yes, its: select * from table_name where col1 like '%' and col2 like '%' and col3 like '%'; As your default is %, then this is easy.

    Its all in the mysql manual, Section 6.3.2.1 String Comparison Functions.

    HTH Chris

    César Aracena wrote:

    >Hi all. > >I'm trying to figure out how to do a search trough a MySQL db using LIKE >or = but the thing is that I have 3 select boxes from where to choose >the search terms. Can I use something like a wildcard instead of making >several IF statements like this? > >SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 >= % > >% goes for an unselected select box (default value = %) in case the user >doesn't want to make an *advanced* search, so it fetches all rows which >does contains values 1 & 2. > >Thanks, > > <mailto:webmastericaam.com.ar> Cesar Aracena >CE / MCSE+I >Neuquen, Argentina >+54.299.6356688 >+54.299.4466621 > >

    attached mail follows:


    2nd attempt LOL Rejected first request coz this message is (ot)

    What is the best news reader that there is out there on the I-net??? Please submit your votes.... then we can all seee.

    I'm sick of outlook express handling this news on php and all the other lists i'm subscribed to...

    Please Please Please

    Cheerz Vins ;)

    attached mail follows:


    On Wed, 10 Jul 2002, Vincent Kruger wrote:

    > I'm sick of outlook express handling this news on php and all the other > lists i'm subscribed to...

    Ahh, then you mean best for a W32 platform. Options include Free Agent, Agent and Xnews.

    attached mail follows:


    OK.. I've checked out the following TIN Xnews Free Agent....

    They seem to be very popular but don't look good and you have to used them for a while to get to know them. Don't get me wrong.... I've stuck with outlook just for the look... I mean comon.... i use windows xp... look is everything on this system atm. LOL

    Thanx for the posts.

    "Vincent Kruger" <vinswebonline.co.za> wrote in message news:004601c227fb$a9c9e290$0100007flocalhost... > 2nd attempt > LOL > Rejected first request coz this message is (ot) > > What is the best news reader that there is out there on the I-net??? > Please submit your votes.... > then we can all seee. > > I'm sick of outlook express handling this news on php and all the other > lists i'm subscribed to... > > Please Please Please > > Cheerz > Vins > ;) > > > >

    attached mail follows:


    Lets get this out.... the best reader out there.

    "Vincent Kruger" <vinswebonline.co.za> wrote in message news:004601c227fb$a9c9e290$0100007flocalhost... > 2nd attempt > LOL > Rejected first request coz this message is (ot) > > What is the best news reader that there is out there on the I-net??? > Please submit your votes.... > then we can all seee. > > I'm sick of outlook express handling this news on php and all the other > lists i'm subscribed to... > > Please Please Please > > Cheerz > Vins > ;) > > > >

    attached mail follows:


    Yamin,

    You probably chose not to install bison or flex when you installed RedHat. They are on your CDs.

    HTH Chris

    Yamin Prabudy wrote:

    >Hi guys,... In configure PHP 4.2.1 on RedHat 7.3 I found this problem >checking for ranlib... ranlib >checking whether ln -s works... yes >checking for gawk... (cached) 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: lex: command not found >configure: error: cannot find output from lex; giving up >[yamindusak php-4.2.1]$ > >what's wrong with it ??? > >thanks in advance > >Yamin > >

    attached mail follows:


    Wow the vulgarities... Anywayz, I guess that's how you gotta address people like Erik Hegreberg... "Ashley M. Kirchner" <ashleypcraft.com> wrote in message news:3D2B4B4C.CCE9617Fpcraft.com... > vins wrote: > > > Is it so fucking difficult to do the fucking unsubscribing yourself..... > > Stop being a fucking baby and click your fucking mouse to the php website > > and unsubscribe... > > > > This fucking spamming business is going to get you into big shit.... there > > are a ton of hackers out there on this mailing list so stop being a fucking > > jerk. > > Ya, and your 'fucking' e-mail certainly helps him a lot better, eh? > > -- > W | I haven't lost my mind; it's backed up on tape somewhere. > +-------------------------------------------------------------------- > Ashley M. Kirchner <mailto:ashleypcraft.com> . 303.442.6410 x130 > IT Director / SysAdmin / WebSmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 > http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. > > >

    attached mail follows:


    So sorry about that.... Didn't mean to affend anyone other than the "SPAMMER CREEP" Really do appologize.

    Kindest Regards Vins vinswebonline.co.za

    "Kondwani Spike Mkandawire" <kondwanics.mun.ca> wrote in message news:20020710113857.12342.qmailpb1.pair.com... > Wow the vulgarities... Anywayz, I guess that's how you gotta > address people like Erik Hegreberg... > "Ashley M. Kirchner" <ashleypcraft.com> wrote in message > news:3D2B4B4C.CCE9617Fpcraft.com... > > vins wrote: > > > > > Is it so fucking difficult to do the fucking unsubscribing yourself..... > > > Stop being a fucking baby and click your fucking mouse to the php > website > > > and unsubscribe... > > > > > > This fucking spamming business is going to get you into big shit.... > there > > > are a ton of hackers out there on this mailing list so stop being a > fucking > > > jerk. > > > > Ya, and your 'fucking' e-mail certainly helps him a lot better, eh? > > > > -- > > W | I haven't lost my mind; it's backed up on tape somewhere. > > +-------------------------------------------------------------------- > > Ashley M. Kirchner <mailto:ashleypcraft.com> . 303.442.6410 x130 > > IT Director / SysAdmin / WebSmith . 800.441.3873 x130 > > Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 > > http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. > > > > > > > >

    attached mail follows:


    none taken :) your not the only one that realy hate spammers :)

    vins writes:

    > So sorry about that.... > Didn't mean to affend anyone other than the "SPAMMER CREEP" > Really do appologize. > > Kindest Regards > Vins > vinswebonline.co.za > > "Kondwani Spike Mkandawire" <kondwanics.mun.ca> wrote in message > news:20020710113857.12342.qmailpb1.pair.com... >> Wow the vulgarities... Anywayz, I guess that's how you gotta >> address people like Erik Hegreberg... >> "Ashley M. Kirchner" <ashleypcraft.com> wrote in message >> news:3D2B4B4C.CCE9617Fpcraft.com... >> > vins wrote: >> > >> > > Is it so fucking difficult to do the fucking unsubscribing > yourself..... >> > > Stop being a fucking baby and click your fucking mouse to the php >> website >> > > and unsubscribe... >> > > >> > > This fucking spamming business is going to get you into big shit.... >> there >> > > are a ton of hackers out there on this mailing list so stop being a >> fucking >> > > jerk. >> > >> > Ya, and your 'fucking' e-mail certainly helps him a lot better, eh? >> > >> > -- >> > W | I haven't lost my mind; it's backed up on tape somewhere. >> > +-------------------------------------------------------------------- >> > Ashley M. Kirchner <mailto:ashleypcraft.com> . 303.442.6410 x130 >> > IT Director / SysAdmin / WebSmith . 800.441.3873 x130 >> > Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 >> > http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. >> > >> > >> > >> >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    > >ending in .php and add the same thing for .shtml. Then, both will be > >parsed by PHP first. > > But then will it be parsed by SSI second, as we would like? Doesn't seem > to...

    If you're using PHP, you don't need SSI. PHP can do whatever you are doing in SSI.

    ---John Holmes...

    attached mail follows:


    Surely there ought to be some simple code that could check for this joker's e-mail address when it reaches the Server and simply prevent it from being distributed... Isn't every e-mail address verified anywayz before it goes to the mailing list?

    "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message news:3D2BF67B.3070509webglobe.sk... > Well, he likely never be able to unsubscribe himself, as he needs to > reply to the unsubscribe notice, but his account is now full. > > R'twick Niceorgaw wrote: > > >I just setup a rule in OE to forward his own mail to himself and delete it > >form my machine > >----- Original Message ----- > >From: "Jeff Lewis" <jeffhyrum.net> > >To: "R'twick Niceorgaw" <rtwickniceorgaw.com>; <php-generallists.php.net> > >Sent: Tuesday, July 09, 2002 12:42 PM > >Subject: Re: [PHP]Erik Hegreberg > > > > > > > > > >>He is both, he has been emailed how to get off. For now, I keep just > >> > >> > >sending > > > > > >>my read receipts :) > >> > >> > >>----- Original Message ----- > >>From: "R'twick Niceorgaw" <rtwickniceorgaw.com> > >>To: "Erik Hegreberg" <ehegrebeonline.no>; <php-generallists.php.net> > >>Sent: Tuesday, July 09, 2002 6:30 PM > >>Subject: Re: [PHP] > >> > >> > >> > >wwwwwwwwwwwwwwwwwwwwipoh'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % > > > > > >>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > >> > >> > >> > >> > >>>are you doped or mentally challenged ? > >>>----- Original Message ----- > >>>From: "Erik Hegreberg" <ehegrebeonline.no> > >>>To: <php-generallists.php.net> > >>>Sent: Tuesday, July 09, 2002 12:26 PM > >>>Subject: [PHP] > >>> > >>> > >>> > >wwwwwwwwwwwwwwwwwwwwipoh'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % > > > > > >>>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > >>> > >>> > >>> > >>> > >>> > >>> > >>>-- > >>>PHP General Mailing List (http://www.php.net/) > >>>To unsubscribe, visit: http://www.php.net/unsub.php > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > > > > > > > > >

    attached mail follows:


    Of course not on an open list that's crossed to the newsgroups ...

    However, there's a "deny" list on ezmlm that the moderator can add addresses to. As a manager of a number of ezmlm mailing lists I've done that - which really infuriates the "spammers" - they still get the posts until they unsubscribe (or ask me to help them) but they can't post in the meantime.

    There are times, especially when someone's changed email addresses but has forwarding, or whose mail system doesn't believe that any email address should be longer than (some number of characters), when it is difficult or impossible for someone to unsubscribe. In that case the list owner gets involved.

    > Isn't every e-mail address > verified anywayz before it goes to the mailing list?

    attached mail follows:


    ðÒÉ×ÅÔ!

    when your instances contain references and you prepare ther references in the constructor, you should remember to call the *new* function with an &.

    Otherwise all you get is a copy, and all the references you prepared are invalid.

    use *new and all you trouble vanishes away :)

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    I've got an application that requires dos folder names (8.3 standard) as input.

    I also have PHP, which quite happily can cope with both.

    Can someone help me write a function to translate full paths to dos paths

    Thanks

    attached mail follows:


    On Wed, 10 Jul 2002 13:14:44 +0100, you wrote:

    >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths

    You may have to drop down to C/C++ and ask the OS to lookup the short version of the path for you (GetShortPathName and GetShortPathNameW). But if you want to do it "by hand", Knowledge Base article Q142982 might be a place to start.

    attached mail follows:


    It doesn't matter how fast it does it. It matters what language it does it. C and C++ are a big no no as our company doesn't have a compiler (winblows).

    Thanks for the pointer

    "David Otton" <david.ottonovernetdata.com> wrote in message news:qs9oiugp9e2hl2k0qv6o1h9aloln99vg8s4ax.com... > On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: > > >I've got an application that requires dos folder names (8.3 standard) as > >input. > > > >I also have PHP, which quite happily can cope with both. > > > >Can someone help me write a function to translate full paths to dos paths > > You may have to drop down to C/C++ and ask the OS to lookup the short > version of the path for you (GetShortPathName and GetShortPathNameW). > But if you want to do it "by hand", Knowledge Base article Q142982 > might be a place to start. >

    attached mail follows:


    On Wed, 10 Jul 2002 13:14:44 +0100, you wrote:

    >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths > >Thanks

    Maybe this can get you started. I don't have access to a PHP parser right now so this is completely off the top of my head, but maybe it will help a bit.

    The function below assumes that the path contains backslashes (not forward slashes). It also does not verify that the path is legal in the first place (i.e. that it doesn't contain illegal characters). Additionally, it doesn't deal with filenames, just directory names. Maybe you can extend to handle filenames. :)

    One last thing. You can't really create a function like this without accessing the filesystem that these files are going to be stored on. For example, let's say you have a file called "my resume.doc" The DOS equivalent to this would be "myresu~1.doc" UNLESS there was already another file in the same directory that had that DOS name. So, let's say there was already another file by the name of "my results.doc" in the directory. Then your "my resume.doc" would be called "myresu~2.doc" The function below does not account for this.

    Come to think of it, maybe this isn't all that helpful. :-P

    function fullpath2dospath ($fullpath) {

    if(preg_match("/^([A-Za-z]:)(.*)$/",$fullpath)) { $driveletter = $matches[1]; $fullpath = $matches[2]; }

    $dirs = explode("\",$fullpath);

    foreach($dirs as $index => $dir) { /* Directory only needs to be modified if it contains spaces or is longer than 8 characters */ if(strlen($dir) > 8 || strpos($dir," ")) { $dir = strtr($dir," ",""); $dir = substr($dir,0,6); $dirs[$index] = $dir."~1"; } }

    $dospath = $driveletter.implode("\",$dirs); return $dospath;

    }

    attached mail follows:


    Whats the difference ???? I'm lost ?

    "Bb" <benthemidwestgroup.com> wrote in message news:20020710121520.54663.qmailpb1.pair.com... > I've got an application that requires dos folder names (8.3 standard) as > input. > > I also have PHP, which quite happily can cope with both. > > Can someone help me write a function to translate full paths to dos paths > > Thanks > >

    attached mail follows:


    On Wed, 10 Jul 2002 13:14:44 +0100, you wrote:

    >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths

    Also, go to groups.google.com and plug "convert long 8.3 filenames" into the search box. Most of the discussions involve VB, VBScript, Perl, etc. but maybe they can give you some ideas.

    attached mail follows:


    The problem with this method is assuming the ~1 part. What if I have:

    'My Directory' -> MYDIRE~1 'My DirectoryForPics' -> MYDIRE~2

    Now if your path has 'My DirectoryForPics' it's going to translate that into MYDIRE~1 which won't work.

    HTH

    Danny.

    ----- Original Message ----- From: "Michael Sims" <mhsimsmidsouth.rr.com> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 1:48 PM Subject: Re: [PHP] Dos Paths

    On Wed, 10 Jul 2002 13:14:44 +0100, you wrote:

    >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths > >Thanks

    Maybe this can get you started. I don't have access to a PHP parser right now so this is completely off the top of my head, but maybe it will help a bit.

    The function below assumes that the path contains backslashes (not forward slashes). It also does not verify that the path is legal in the first place (i.e. that it doesn't contain illegal characters). Additionally, it doesn't deal with filenames, just directory names. Maybe you can extend to handle filenames. :)

    One last thing. You can't really create a function like this without accessing the filesystem that these files are going to be stored on. For example, let's say you have a file called "my resume.doc" The DOS equivalent to this would be "myresu~1.doc" UNLESS there was already another file in the same directory that had that DOS name. So, let's say there was already another file by the name of "my results.doc" in the directory. Then your "my resume.doc" would be called "myresu~2.doc" The function below does not account for this.

    Come to think of it, maybe this isn't all that helpful. :-P

    function fullpath2dospath ($fullpath) {

    if(preg_match("/^([A-Za-z]:)(.*)$/",$fullpath)) { $driveletter = $matches[1]; $fullpath = $matches[2]; }

    $dirs = explode("\",$fullpath);

    foreach($dirs as $index => $dir) {

    /* Directory only needs to be modified if it contains spaces or is longer than 8 characters */ if(strlen($dir) > 8 || strpos($dir," ")) { $dir = strtr($dir," ",""); $dir = substr($dir,0,6); $dirs[$index] = $dir."~1"; } }

    $dospath = $driveletter.implode("\",$dirs); return $dospath;

    }

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

    attached mail follows:


    On Wed, 10 Jul 2002 13:35:50 +0100, you wrote:

    >"David Otton" <david.ottonovernetdata.com> wrote in message >news:qs9oiugp9e2hl2k0qv6o1h9aloln99vg8s4ax.com... >> On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: >> >> >I've got an application that requires dos folder names (8.3 standard) as >> >input. >> > >> >I also have PHP, which quite happily can cope with both. >> > >> >Can someone help me write a function to translate full paths to dos paths

    >> You may have to drop down to C/C++ and ask the OS to lookup the short >> version of the path for you (GetShortPathName and GetShortPathNameW). >> But if you want to do it "by hand", Knowledge Base article Q142982 >> might be a place to start.

    >It doesn't matter how fast it does it. It matters what language it does it.

    It's nothing to do with speed... Windows uses (used?) a hack to introduce long filename support while not breaking 8.3 filenames, and it stores both on the disc. If you had three files named :

    LongFilenameA.dat LongFilenameB.dat LongFilenameC.dat

    they would be converted to

    LongFi~1.dat LongFi~2.dat LongFi~3.dat

    but you can't guarantee which long name maps to which short name. You really have to ask the OS to do the lookup for you if you want correct results.

    AFAIK your choices to get at Windows stuff from PHP are the COM functions, or writing a new function for PHP itself and recompiling. (Someone'll be along in a minute to correct me if I'm wrong).

    >C and C++ are a big no no as our company doesn't have a compiler (winblows).

    *boggle*

    Different worlds :)

    Hmm. How about Java? The API there might be rich enough to do what you want.

    >Thanks for the pointer

    Good luck.

    attached mail follows:


    On Wed, 10 Jul 2002 13:56:39 +0100, you wrote:

    >The problem with this method is assuming the ~1 part. What if I have: > >'My Directory' -> MYDIRE~1 >'My DirectoryForPics' -> MYDIRE~2 > >Now if your path has 'My DirectoryForPics' it's going to translate that into >MYDIRE~1 which won't work. > >HTH > >Danny.

    Yeah, I mentioned that in my original post (see below). I left that particular issue as an exercise for the reader. :-)

    >----- Original Message ----- >From: "Michael Sims" <mhsimsmidsouth.rr.com> >To: <php-generallists.php.net> >Sent: Wednesday, July 10, 2002 1:48 PM >Subject: Re: [PHP] Dos Paths [...] >One last thing. You can't really create a function like this without >accessing the filesystem that these files are going to be stored on. >For example, let's say you have a file called "my resume.doc" The DOS >equivalent to this would be "myresu~1.doc" UNLESS there was already >another file in the same directory that had that DOS name. So, let's >say there was already another file by the name of "my results.doc" in >the directory. Then your "my resume.doc" would be called >"myresu~2.doc" The function below does not account for this. [...]

    attached mail follows:


    I don't know of a conversion routine that will do exactly what DOS does, but if you need to use 8.3 filenames and receive them as vfat32 filenames then you could do a conversion yourself before using the name. As long as the conversion is 8.3 compliant it does not matter that your conversion routine ends up with a different name.

    Having converted it, then use the name and you write out the 8.3 filename, never the long one. Note the translation between the two in an array or db table.

    HTH Chris

    BB wrote:

    >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths > >Thanks > > >

    attached mail follows:


    Ah, that'll teach me to actually read the post next time, not just the code :)

    Danny.

    ----- Original Message ----- From: "Michael Sims" <mhsimsmidsouth.rr.com> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 2:02 PM Subject: Re: [PHP] Dos Paths

    On Wed, 10 Jul 2002 13:56:39 +0100, you wrote:

    Yeah, I mentioned that in my original post (see below). I left that particular issue as an exercise for the reader. :-)

    >----- Original Message ----- >From: "Michael Sims" <mhsimsmidsouth.rr.com> >To: <php-generallists.php.net> >Sent: Wednesday, July 10, 2002 1:48 PM >Subject: Re: [PHP] Dos Paths [...] >One last thing. You can't really create a function like this without >accessing the filesystem that these files are going to be stored on. >For example, let's say you have a file called "my resume.doc" The DOS >equivalent to this would be "myresu~1.doc" UNLESS there was already >another file in the same directory that had that DOS name. So, let's >say there was already another file by the name of "my results.doc" in >the directory. Then your "my resume.doc" would be called >"myresu~2.doc" The function below does not account for this. [...]

    attached mail follows:


    Thanks to all, I actually found a work around with the program I am using and I'm much happier!

    Thanks for all your input, it'll be useful if i ever need to convert long names to 8.3 :oP

    --BB

    "Bb" <benthemidwestgroup.com> wrote in message news:20020710121520.54663.qmailpb1.pair.com... > I've got an application that requires dos folder names (8.3 standard) as > input. > > I also have PHP, which quite happily can cope with both. > > Can someone help me write a function to translate full paths to dos paths > > Thanks > >

    attached mail follows:


    Hi all,

    It's actually rather easy.

    <?php $str_test = passthru("dir /x c:\\myfolder\\"); >?

    After this it's just a matter of parsing the dirlist and extracting the right string...

    Regards Joakim Andersson

    PS. dir /x works in Windows 2000, not sure about the others... DS.

    > -----Original Message----- > From: BB [mailto:benthemidwestgroup.com] > Sent: Wednesday, July 10, 2002 2:15 PM > To: php-generallists.php.net > Subject: [PHP] Dos Paths > > > I've got an application that requires dos folder names (8.3 > standard) as > input. > > I also have PHP, which quite happily can cope with both. > > Can someone help me write a function to translate full paths > to dos paths > > Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    Hi

    I have a problem that's somewhat related to this - I can get short filenames from the OS but I really need long filenames. Does anyone know how to do this?

    Thanks

    Shane

    On Wednesday 10 July 2002 1:14 pm, BB wrote: > I've got an application that requires dos folder names (8.3 standard) as > input. > > I also have PHP, which quite happily can cope with both. > > Can someone help me write a function to translate full paths to dos paths > > Thanks

    - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQE9LEBu5DXg6dCMBrQRAk7bAKCS10F8NjFrStSaha0Dkno0uwGE0QCgjdFi gNzKf3kaWjP5h2rWtImS6Xw= =I22O -----END PGP SIGNATURE-----

    attached mail follows:


    FYI - Works in Windows NT 4 SP 6a as well.

    joakim.anderssoncybercom.se wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 8th July 2002 > ************************************************************************** > > Hi all, > > It's actually rather easy. > > <?php > $str_test = passthru("dir /x c:\\myfolder\\"); > >>? > > > After this it's just a matter of parsing the dirlist and extracting the > right string... > > Regards > Joakim Andersson > > PS. dir /x works in Windows 2000, not sure about the others... DS. > > > >>-----Original Message----- >>From: BB [mailto:benthemidwestgroup.com] >>Sent: Wednesday, July 10, 2002 2:15 PM >>To: php-generallists.php.net >>Subject: [PHP] Dos Paths >> >> >>I've got an application that requires dos folder names (8.3 >>standard) as >>input. >> >>I also have PHP, which quite happily can cope with both. >> >>Can someone help me write a function to translate full paths >>to dos paths >> >>Thanks >> >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php >> > >

    -- 
    ----------------------------
    Work: neil.freemanasa.co.uk
    Home: neilcurvedvision.com
    

    Web: www.curvedvision.com ----------------------------

    attached mail follows:


    By Winblows does that mean you think Windows blows or that you guys don't have a compiler for Windows?

    Borland gives out a free C++ compiler for Win...

    If you're running Linux, then get gcc/g++, it's free.

    "Bb" <benthemidwestgroup.com> wrote in message news:20020710123624.82756.qmailpb1.pair.com... > It doesn't matter how fast it does it. It matters what language it does it. > C and C++ are a big no no as our company doesn't have a compiler (winblows). > > Thanks for the pointer > > "David Otton" <david.ottonovernetdata.com> wrote in message > news:qs9oiugp9e2hl2k0qv6o1h9aloln99vg8s4ax.com... > > On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: > > > > >I've got an application that requires dos folder names (8.3 standard) as > > >input. > > > > > >I also have PHP, which quite happily can cope with both. > > > > > >Can someone help me write a function to translate full paths to dos paths > > > > You may have to drop down to C/C++ and ask the OS to lookup the short > > version of the path for you (GetShortPathName and GetShortPathNameW). > > But if you want to do it "by hand", Knowledge Base article Q142982 > > might be a place to start. > > > >

    attached mail follows:


    --
    

    ------------------------ ------------------------ Ðurovski Dejan dejanyuEUnet.yu

    attached mail follows:


    Please,

    How do I make to get version information of MySql in runtime ? I would like to show the version of MySql in my website. For example:

    Version PHP : <? echo phpversion(); ?> Version MySql : ??????

    Thanks

    Skyhawk

    attached mail follows:


    run this MySQL query

    SELECT VERSION();

    René

    Skyhawk wrote:

    >Please, > >How do I make to get version information of MySql in runtime ? >I would like to show the version of MySql in my website. For example: > >Version PHP : <? echo phpversion(); ?> >Version MySql : ?????? > >Thanks > >Skyhawk > > >

    attached mail follows:


    You a use the command mysql_get_server_info().

    Example: <?php mysql_connect("localhost", "user", "password") or die("could not connect"); echo "MySQL server version:".mysql_get_server_info()"; ?> prints: - MySQL server version: 4.0.1-alpha

    Also see link below for more details: http://www.php.net/manual/en/function.mysql-get-server-info.php _________________________________________ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 mmcculliSykesCanada.com ----- Original Message ----- From: "Skyhawk" <tecnicodoiscliques.com> Newsgroups: php.general To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 8:29 AM Subject: Geting PHP Version

    Please,

    How do I make to get version information of MySql in runtime ? I would like to show the version of MySql in my website. For example:

    Version PHP : <? echo phpversion(); ?> Version MySql : ??????

    Thanks

    Skyhawk

    attached mail follows:


    Thanks, bye

    Skyhawk

    "Mark McCulligh" <mmccullisykescanada.com> escreveu na mensagem news:009801c22813$bd5a5a20$5714c50asykescanada.com... > You a use the command mysql_get_server_info(). > > Example: > <?php > mysql_connect("localhost", "user", "password") or > die("could not connect"); > echo "MySQL server version:".mysql_get_server_info()"; > ?> > prints: - MySQL server version: 4.0.1-alpha > > Also see link below for more details: > http://www.php.net/manual/en/function.mysql-get-server-info.php > _________________________________________ > Mark McCulligh, Application Developer / Analyst > Sykes Canada Corporation www.SykesCanada.com > (888)225-6824 ex. 3262 > mmcculliSykesCanada.com > ----- Original Message ----- > From: "Skyhawk" <tecnicodoiscliques.com> > Newsgroups: php.general > To: <php-generallists.php.net> > Sent: Wednesday, July 10, 2002 8:29 AM > Subject: Geting PHP Version > > > Please, > > How do I make to get version information of MySql in runtime ? > I would like to show the version of MySql in my website. For example: > > Version PHP : <? echo phpversion(); ?> > Version MySql : ?????? > > Thanks > > Skyhawk > >

    attached mail follows:


    I have an array $Lang = array('English','German','French','Zulu'); I want it in alphabetical order....

    do i reset the arrray first or usort it first ????

    attached mail follows:


    Since it's not an associative array, you can just use sort($Lang); and that should work just fine.

    Martin

    >>> "vins" <vinswebonline.co.za> 07/10/02 08:36AM >>> I have an array $Lang = array('English','German','French','Zulu'); I want it in alphabetical order....

    do i reset the arrray first or usort it first ????

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

    attached mail follows:


    oh ok... thanx

    "Martin Clifford" <MLC1nrc.gov> wrote in message news:sd2bf248.004nrcgwia.nrc.gov... Since it's not an associative array, you can just use sort($Lang); and that should work just fine.

    Martin

    >>> "vins" <vinswebonline.co.za> 07/10/02 08:36AM >>> I have an array $Lang = array('English','German','French','Zulu'); I want it in alphabetical order....

    do i reset the arrray first or usort it first ????

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

    attached mail follows:


    just sort($Lang);

    A question: wouldn't it have been quicker to knock out a couple of test files to see which is the right way?

    HTH

    Danny.

    ----- Original Message ----- From: "vins" <vinswebonline.co.za> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 1:36 PM Subject: [PHP] Now a Question for all you ARRAY Junkies

    > I have an array > $Lang = array('English','German','French','Zulu'); > I want it in alphabetical order.... > > do i reset the arrray first or usort it first ???? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Have a look at sort()

    vins wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 8th July 2002 > ************************************************************************** > > I have an array > $Lang = array('English','German','French','Zulu'); > I want it in alphabetical order.... > > do i reset the arrray first or usort it first ???? > > >

    -- 
    ----------------------------
    Work: neil.freemanasa.co.uk
    Home: neilcurvedvision.com
    

    Web: www.curvedvision.com ----------------------------

    attached mail follows:


    i ONLY ask when i can't get summing to work... i saw when someone reported the sort() function that i had sord() My bad...

    But thanx anyways

    "Danny Shepherd" <dannykyboshed.com> wrote in message news:081601c2280f$1c552dc0$0200a8c0DANNYS... > just sort($Lang); > > A question: wouldn't it have been quicker to knock out a couple of test > files to see which is the right way? > > HTH > > Danny. > > ----- Original Message ----- > From: "vins" <vinswebonline.co.za> > To: <php-generallists.php.net> > Sent: Wednesday, July 10, 2002 1:36 PM > Subject: [PHP] Now a Question for all you ARRAY Junkies > > > > I have an array > > $Lang = array('English','German','French','Zulu'); > > I want it in alphabetical order.... > > > > do i reset the arrray first or usort it first ???? > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    Hi

    I want to display data based on the criteria selected by the user eg click on size to display smallest to largest, or by price smallest to highest, location etc etc

    what is the code I need?

    Thanks.

    DC

    attached mail follows:


    You're gonna have to give me quite a bit more to go on than that. What are you using to store the data? An array, flatfile, database, etc?

    Also, we're not really all about telling you what code you need, as much as helping you to find the answer (without GIVING the answer), you know? At least that is how I work :o)

    Martin

    >>> "DC" <dcurranpowerup.com.au> 07/10/02 08:42AM >>> Hi

    I want to display data based on the criteria selected by the user eg click on size to display smallest to largest, or by price smallest to highest, location etc etc

    what is the code I need?

    Thanks.

    DC

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

    attached mail follows:


    I don't think you are explaining what you are after too well, so my understanding of it may be wrong. If you are displaying a table and want to display it in a different order, then its the "ORDER BY" clause in the database select statement that determines what order the data is given in.

    To a more specific question but similar to this I gave an outline of storing results on a temporary basis in another table a couple of days ago. You should be able to find it in the archives.

    I think it will help if you read some more on programming, particularly the php functions to get data from a database, sql in general, and the manual on the specific database you want to use.

    HTH Chris

    DC wrote:

    >Hi > >I want to display data based on the criteria selected by the user eg click >on size to display smallest to largest, or by price smallest to highest, >location etc etc > >what is the code I need? > >Thanks. > >DC > > >

    attached mail follows:


    How can I set a cookie which expires when the borwser is closed?? How can I delete a cookie via PHP?

    Thanks

    attached mail follows:


    Set the cookies expiration to a date that has already passed. The cookie will only last until the browser is closed, since the browser must have just created it. Then it's deleted from the computer since it's past due.

    Martin

    >>> "Alexander Ross" <alexrossbleen.net> 07/10/02 09:43AM >>> How can I set a cookie which expires when the borwser is closed?? How can I delete a cookie via PHP?

    Thanks

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

    attached mail follows:


    To set a session cookie (one that is deleted when the browser window is closed) set a cookie without any expire date/time.

    To delete a cookie set a cookie of the same name with an expire date in the past.

    HTH

    Danny.

    ----- Original Message ----- From: "Alexander Ross" <alexrossbleen.net> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 2:43 PM Subject: [PHP] cookies

    > How can I set a cookie which expires when the borwser is closed?? How can I > delete a cookie via PHP? > > Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Alexander Ross writes:

    > How can I set a cookie which expires when the borwser is closed?? How can I > delete a cookie via PHP? > > Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > simply give it no experation time. then it will expire when your browser is closed :)

    ( and yes it works, i use it to )

    attached mail follows:


    My experience with cookies that have no expiration date has not been as successful. It seems that (in IE6 anyway) the behavior is inconsistent. Sometimes the cookie would last until I closed the browser, sometimes the cookie would expire in the middle of the session for no apparent reason. This behavior may not occur in other browsers though. I'd test the cookies with the browser(s) that you will be using for your application.

    Lee

    richard.mailso fthome.net To: php-generallists.php.net cc: 07/10/2002 Subject: [PHP] Re: cookies 09:58 AM

    Alexander Ross writes:

    > How can I set a cookie which expires when the borwser is closed?? How can I > delete a cookie via PHP? > > Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > simply give it no experation time. then it will expire when your browser is closed :)

    ( and yes it works, i use it to )

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

    attached mail follows:


    Nope thats not they way.... If you don't specify a expire date it will live for ever or until you delete it.

    The only way is to set it with an expiry date and then it will delete it'self when the browser closes. Check this by running a file on the same domain with phpinfo();

    "Alexander Ross" <alexrossbleen.net> wrote in message news:20020710134339.68660.qmailpb1.pair.com... > How can I set a cookie which expires when the borwser is closed?? How can I > delete a cookie via PHP? > > Thanks > >

    attached mail follows:


    No, I just tested it myself - if you set a cookie with no expire date it exists until the browser window is closed.

    My code:

    <?php

    if (!isset($_COOKIE['TestCookie'])) { setcookie ("TestCookie", "FUD"); echo "Just Set a cookie - reload the page"; } else { echo "Cookie is : {$_COOKIE['TestCookie']}<br>Close the window then return and the cookie should be gone"; }

    ?>

    HTH

    Danny.

    ----- Original Message ----- From: "vins" <vinswebonline.co.za> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 3:34 PM Subject: [PHP] Re: cookies

    > Nope thats not they way.... > If you don't specify a expire date it will live for ever or until you delete > it. > > The only way is to set it with an expiry date and then it will delete > it'self when the browser closes. > Check this by running a file on the same domain with phpinfo(); > > > "Alexander Ross" <alexrossbleen.net> wrote in message > news:20020710134339.68660.qmailpb1.pair.com... > > How can I set a cookie which expires when the borwser is closed?? How can > I > > delete a cookie via PHP? > > > > Thanks > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hello,

    > I use phpMyAdmin which enables me to take dump of > mySQL Table Data into Comma Seperated Values file > (.csv) > > Now, i have to create such a program that accomplishes > this, without using phpMyAdmin. Can someone guide me > to this procedure..

    This isn't a PHP script (it's Perl), but it does exactly what you want:

    http://oss.gospelcom.net/staff.php

    The first tool listed there is called 'cvsdump' -- it dumps, processes, and mails a MySQL table in CVS.

    HTH!

    -- 
    [ joel boonstra | jboonstragospelcom.net ]
    

    attached mail follows:


    Running Slakware linux 2.4.7 kernel... if you want more info you can go to http://www.funyon.com/phpinfo.php and see the phpinfo page. Thanks, Mike

    ----- Original Message ----- From: "Naintara Jain" <naintaradel6.vsnl.net.in> To: "Mike" <funyonfunyon.com>; <php-generallists.php.net> Sent: Wednesday, July 10, 2002 12:22 PM Subject: RE: [PHP] CANT GET STUFF TO WORK

    > what OS are you running on? > > -----Original Message----- > From: php-general-return-106481-naintara=del6.vsnl.net.inlists.php.net > [mailto:php-general-return-106481-naintara=del6.vsnl.net.inlists.php.ne > t]On Behalf Of Mike > Sent: Tuesday, July 09, 2002 12:37 PM > To: Jay Blanchard; php-generallists.php.net > Subject: Re: [PHP] CANT GET STUFF TO WORK > > > I have read that, I am still confused, I have made it so that the > session_start is at the top of all the pages, and I can't get some of the > variables out of the script (i.e. I set a variable with > session_register('user')) and on the next page I could not get the user > variable out of the session on the next page.. does that help out? > Thank You, > Mike > > ----- Original Message ----- > From: "Jay Blanchard" <jay.blanchardniicommunications.com> > To: "'Mike'" <funyonfunyon.com>; <php-generallists.php.net> > Sent: Tuesday, July 09, 2002 3:25 PM > Subject: RE: [PHP] CANT GET STUFF TO WORK > > > > http://www.php.net/manual/en/ref.session.php > > > > Start there, and then when you can tell us what the more specific problems > > are with your sessions we will be able to help. > > > > Jay > > > > -----Original Message----- > > From: Mike [mailto:funyonfunyon.com] > > Sent: Tuesday, July 09, 2002 2:20 PM > > To: php-generallists.php.net > > Subject: [PHP] CANT GET STUFF TO WORK > > > > > > Hello, I am wondering if you could help me... I can't seem to figure out > how > > to get sessions working. > > Thank You, > > Mike > > > > > > > > > -- > 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:


    On Wednesday 10 July 2002 21:58, Mike wrote:

    Please do not top post (ie add your comments/reply at the top), it makes it difficult to follow who said what and when.

    > Running Slakware linux 2.4.7 kernel... if you want more info you can go to > http://www.funyon.com/phpinfo.php and see the phpinfo page.

    Have you managed to get the examples in the manual to work? Always start with something simple and work your way up. The examples in the manual are an ideal reference point as they _should_ work, so if they don't work for you you'll know you're doing something wrong.

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* I'm mentally OVERDRAWN! What's that SIGNPOST up ahead? Where's ROD STERLING when you really need him? */

    attached mail follows:


    ----- Original Message ----- From: "Jason Wong" <php-generalgremlins.com.hk> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 10:25 AM Subject: Re: [PHP] CANT GET STUFF TO WORK

    > On Wednesday 10 July 2002 21:58, Mike wrote: > > Please do not top post (ie add your comments/reply at the top), it makes it > difficult to follow who said what and when. > > > Running Slakware linux 2.4.7 kernel... if you want more info you can go to > > http://www.funyon.com/phpinfo.php and see the phpinfo page. > > Have you managed to get the examples in the manual to work? Always start with > something simple and work your way up. The examples in the manual are an > ideal reference point as they _should_ work, so if they don't work for you > you'll know you're doing something wrong. >

    I figured it out... it was me being stupid ;( I was looking for the docs and didn't have the most recent version of php. therefore I was using $_SESSION when I should have been using $HTTP_SESSION_VARS.. I talked to my isp and they don't want to upgrade the version of php that is running ;( Thanks, Mike

    > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > I'm mentally OVERDRAWN! What's that SIGNPOST up ahead? Where's ROD > STERLING when you really need him? > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Doesn't work for those of us who are on the digest.

    - Theo

    -----Original Message----- From: Kevin Stone [mailto:kevinhelpelf.com] Sent: Tuesday, July 09, 2002 4:59 PM To: Brendan P. Caulfield; PHP Subject: Re: [PHP] dumb

    Thank you brendan my point from the beginning. Outlook users Message->Block Sender. Takes you two seconds. -Kevin

    ----- Original Message ----- From: "Brendan P. Caulfield" <brendan1431caulfieldweb.com> To: "PHP " <php-generallists.php.net> Sent: Tuesday, July 09, 2002 2:53 PM Subject: [PHP] dumb

    > this is dumb. can we just ignore this and move. we are all smart enough > to block his posts. let's just do it and quit wasting all of our time and > get back to doing what we do here. > > respectfully, > > -brendan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I know this is correct:

    if ($something) { ... } else { ... }

    But I recently saw someone use this instead:

    if($something): ... else: ...

    Is that also correct?? No brackets needed?

    attached mail follows:


    This will only work if you have a single line of code after the else and if. At least that is my understanding of all languages :)

    J

    "Alexander Ross" <alexrossbleen.net> 07/10/2002 08:25 AM

    To: php-generallists.php.net cc: Subject: [PHP] if syntax

    I know this is correct:

    if ($something) { ... } else { ... }

    But I recently saw someone use this instead:

    if($something): ... else: ...

    Is that also correct?? No brackets needed?

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

    attached mail follows:


    There are no brackets necessary if you only have one line of code to be executed in the case. For example:

    if($var == 1) echo "Var equals 1"; } else { echo Var does not equal 1"; }

    But this is not valid:

    if($var == 1) echo "Var equals "; echo "1"; } else { .... }

    HTH

    Martin

    >>> "Alexander Ross" <alexrossbleen.net> 07/10/02 10:25AM >>> I know this is correct:

    if ($something) { ... } else { ... }

    But I recently saw someone use this instead:

    if($something): ... else: ...

    Is that also correct?? No brackets needed?

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

    attached mail follows:


    read here for the alternative control structures in php http://www.php.net/manual/en/control-structures.alternative-syntax.php ----- Original Message ----- From: <jepadillabh-corp.com> To: "Alexander Ross" <alexrossbleen.net> Cc: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 7:28 AM Subject: Re: [PHP] if syntax

    > This will only work if you have a single line of code after the else and > if. At least that is my understanding of all languages :) > > J > > > > > > "Alexander Ross" <alexrossbleen.net> > 07/10/2002 08:25 AM > > > To: php-generallists.php.net > cc: > Subject: [PHP] if syntax > > > I know this is correct: > > if ($something) > { > ... > } > else > { > ... > } > > But I recently saw someone use this instead: > > if($something): > ... > else: > ... > > Is that also correct?? No brackets needed? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

    attached mail follows:


    OK... This is another easy question that everyone has an answer for. Here's mine :D

    the if statement has many ways of being formed. 1 line code: (Echo or exit command)

    if(empty($Variable)) exit; else echo "Variable exists

    Multiple line code: if(empty($Variable)) { header("Location: Here.com"); exit; } else { echo "Valid variable"; eixt; }

    Combined: if(empty($Variable)) echo "Variable empty"; else { Header("Location: Here.com"); exit; }

    or the other alternative

    (empty($Variable)) ? echo "Empty" : echo "Contains Something";

    <jepadillabh-corp.com> wrote in message news:OFF48BDDD0.BCC82414-ON87256BF2.004F65C2-87256BF2.004F6811blackhillscor p.com... > This will only work if you have a single line of code after the else and > if. At least that is my understanding of all languages :) > > J > > > > > > "Alexander Ross" <alexrossbleen.net> > 07/10/2002 08:25 AM > > > To: php-generallists.php.net > cc: > Subject: [PHP] if syntax > > > I know this is correct: > > if ($something) > { > ... > } > else > { > ... > } > > But I recently saw someone use this instead: > > if($something): > ... > else: > ... > > Is that also correct?? No brackets needed? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

    attached mail follows:


    Alexander,

    The thing to do is to try it yourself. Yes its OK for single statements (I assume the colon after the "$condition):" is a typo. The first two examples in the manual (Chapter 11, if) show this syntax though not with "else".

    HTH Chris

    Alexander Ross wrote:

    > >if($something): > ... >else: >... > >Is that also correct?? No brackets needed? > > >

    attached mail follows:


    Hmm. I should read a bit further myself! I did not know about the colon indicating that there can be many statements before "else" or "endif". I've learnt something as a result, thanks. I should do some more engaging brain before keyboard!

    Chris

    Chris Hewitt wrote:

    > ----------snip----------------

    > (I assume the colon after the "$condition):" is a typo.

    attached mail follows:


    Hi Asaf,

    Thanks for the advice. That sounds like a good solution. One thing I was wondering about is... when my PHP script saves the uploaded image to the web server, how should the image be named [uniquely]? The problem is that if the user specifes the name of the image file, there's a chance he'll name another one the same way (and thus overwrite the original). I was thinking of maybe a dual approach, where the user gives the image file a name, but then the PHP script appends, say, the table name and record ID--so as to make the filename unique.

    What do you think? Is that how you do it? (Or is there a better way??)

    ...Rene

    On Wednesday, July 10, 2002, at 07:34 AM, Asaf Maruf Ali wrote:

    > Hello Rene > > We used a similar approach albeit both our PHP scripts and data were on > the > same server. We however opted to place html links to the images in the > MySQL > db and actual images (GIF's, JPG's)files on the server harddisk. > > It works fine with no performance issues. > > > Hope this helps > > Regards > Asaf Maruf > PING > > > I'm working on a simple content management system that uses PHP and > MySQL for updating a web site's text (stored in a MySQL database). (The > PHP scripts that do the updating (my stuf) live on one web server, the > actual DB data to be updated (my client's stuff) live on another.) So > far, I've only had to he able to update the text content of a > site--therefore, I've only had to bother to store textual data in the > client's DB. But now the client wants to be able to upload/change/delete > certain pictures on their web site--using my CMS tool--so I am faced > with the following problem: > > Do I store all such images in the DB? (Which I understand reduces > performance.) > > Or do I--somehow--store the images as files on the client's web server? > And if so, how? (Because my PHP scripts are being executed on a > different server.) > > ...Rene > > --- > René Fournier, > renesmartslitters.com > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.361 / Virus Database: 199 - Release Date: 5/7/02 > > >

    ---
    René Fournier,
    renesmartslitters.com
    

    Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com

    SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada

    attached mail follows:


    > Hi Asaf, > > Thanks for the advice. That sounds like a good solution. One > thing I was > wondering about is... when my PHP script saves the uploaded image to > the web server, how should the image be named [uniquely]? The > problem is > that if the user specifes the name of the image file, there's > a chance > he'll name another one the same way (and thus overwrite the > original). I > was thinking of maybe a dual approach, where the user gives the image > file a name, but then the PHP script appends, say, the table name and > record ID--so as to make the filename unique. > > What do you think? Is that how you do it? (Or is there a better way??)

    If you have a table that stores information about the images then I suggest you use the record ID alone (with the correct file-extension) as a filename. This will allways be unique, otherwise you probably have trouble with your dB aswell...

    This is how I do it.

    Regards Joakim Andersson

    attached mail follows:


    Is this possible I want to create a form, similar to an invoicing system that generates a word document that the user can print out

    Any help would be gratefully appreciated.

    craig

    attached mail follows:


    Is this what you mean?

    <?php header("Content-type: application/rtf"); echo "Hello World"; ?>

    René

    Craig wrote:

    >Is this possible >I want to create a form, similar to an invoicing system that generates a >word document that the user can print out > >Any help would be gratefully appreciated. > >craig > > > > >

    attached mail follows:


    On Wed, 10 Jul 2002 15:53:36 +0100, you wrote:

    >I want to create a form, similar to an invoicing system that generates a >word document that the user can print out

    You may have better luck with RTF (http://www.phpbuilder.com/columns/nair20020523.php3) or PDF (http://www.php.net/manual/en/ref.cpdf.php)...

    (but what can the Word format do that HTML can't? Why can't they print out an HTML invoice?)

    attached mail follows:


    I know that php can open files. What I was wondering is if it can :- Start Word Open a Word template Generate fields in the template based on hidden fields and generate the page

    "David Otton" <david.ottonovernetdata.com> wrote in message news:s9joiucootj7g0lud1jift7hc3iqmpbovp4ax.com... > On Wed, 10 Jul 2002 15:53:36 +0100, you wrote: > > >I want to create a form, similar to an invoicing system that generates a > >word document that the user can print out > > You may have better luck with RTF > (http://www.phpbuilder.com/columns/nair20020523.php3) or PDF > (http://www.php.net/manual/en/ref.cpdf.php)... > > (but what can the Word format do that HTML can't? Why can't they print > out an HTML invoice?) >

    attached mail follows:


    On Wed, 10 Jul 2002 16:13:53 +0100, you wrote:

    >"David Otton" <david.ottonovernetdata.com> wrote in message >news:s9joiucootj7g0lud1jift7hc3iqmpbovp4ax.com... >> On Wed, 10 Jul 2002 15:53:36 +0100, you wrote:

    >> >I want to create a form, similar to an invoicing system that generates a >> >word document that the user can print out

    >> You may have better luck with RTF >> (http://www.phpbuilder.com/columns/nair20020523.php3)

    [hint: Word can read RTF files]

    >> (but what can the Word format do that HTML can't? Why can't they print >> out an HTML invoice?)

    >I know that php can open files. >What I was wondering is if it can :- >Start Word >Open a Word template >Generate fields in the template based on hidden fields and generate the page

    Yeuch. Maybe. Ask a Word expert if it's possible to manipulate it in that way. But you're better off modifying the file yourself in PHP, not asking Word to do it for you.

    But again, /why/? What benefit does this get you that's not offered by regular HTML?

    attached mail follows:


    I need to be able to keep a record of documents created.

    I have found this but failed to get it to work

    <? $word=new COM("word.application") or die("Cannot start MS Word"); print "Loaded word version ($word->Version)\n"; $word->visible = 1 ; $word->Documents->Add(); $word->Selection->Typetext("This is a test"); ?>

    does anyone recognise this?????

    attached mail follows:


    Craig,

    Its not PHP but HTML. I do this for a client. Make a Word document as needed, save it as rtf. Put a link onto my html page calling a particular routine. The routine reads the .rtf file, looking for replaceable parameters, replacing them with the customised values for this customer and saves the file under a new name indicating it is for this customer (still .rtf).

    A new page has a link to this new file. When the user clicks it, as their browser has the mime type for .rtf set to MS Word, Word starts up and opens the file.

    OK, in the application I did this in I used pl/sql (as the database was Oracle and there was no php) but there is no reason why you should not write a php routine to replace the parameters and resave the file.

    HTH Chris

    Craig wrote:

    >I know that php can open files. >What I was wondering is if it can :- >Start Word >Open a Word template >Generate fields in the template based on hidden fields and generate the page >

    attached mail follows:


    Ya, I did it with ASP (customer requested) about 2 months ago...

    "Chris Hewitt" <g0paemanordat.demon.co.uk> wrote in message news:3D2C5495.6060001manordat.demon.co.uk... > Craig, > > Its not PHP but HTML. I do this for a client. Make a Word document as > needed, save it as rtf. Put a link onto my html page calling a > particular routine. The routine reads the .rtf file, looking for > replaceable parameters, replacing them with the customised values for > this customer and saves the file under a new name indicating it is for > this customer (still .rtf). > > A new page has a link to this new file. When the user clicks it, as > their browser has the mime type for .rtf set to MS Word, Word starts up > and opens the file. > > OK, in the application I did this in I used pl/sql (as the database was > Oracle and there was no php) but there is no reason why you should not > write a php routine to replace the parameters and resave the file. > > HTH > Chris > > Craig wrote: > > >I know that php can open files. > >What I was wondering is if it can :- > >Start Word > >Open a Word template > >Generate fields in the template based on hidden fields and generate the page > > > >

    attached mail follows:


    I have a php-script with which one can download a file with a specific format like this:

    header("Content-type: application/specific"); header("Content-Disposition: attachment; filename=$name.sqrfld"); echo ("output funny stuff...");

    and i will count the number of downloads in a database. When i write the code for counting after the "echo ..." statement it will be executed regardless if the user aborted the download or not. How can i guarantee that i update the database when the download is complete?

    attached mail follows:


    I have a php-script with which one can download a file with a specific format like this:

    header("Content-type: application/specific"); header("Content-Disposition: attachment; filename=$name.sqrfld"); echo ("output funny stuff...");

    and i will count the number of downloads in a database. When i write the code for counting after the "echo ..." statement it will be executed regardless if the user aborted the download or not. How can i guarantee that i update the database when the download is complete?

    attached mail follows:


    I am thinking of moving PHP-based web site to a new server. In doing my due diligence, I see that the new server has some different PHP configure options.

    I was able to make sense of most of them by looking through the PHP web site. But I'm still stumped by some of them. I'm hoping people here can tell me what they mean:

    --enable-libgcc: I found the 1-line explanation on www.php.net, but I'm unclear as to the implications of this option. Can anyone explain?

    --enable-pic: likewise. What does this mean?

    --enable-inline-optimization: ??

    --with-regex=system: the online docs say this is deprecated. Could this cause me trouble?

    --with-flex: ?

    --with-png: I know what PNG is, but I don't know hat this option does.

    --with-layout=GNU: I see the explanation in the docs, but I don't know if this has any implications for me as a PHP programmer.

    Thanks for any help you can provide.

    --
    JR
    

    attached mail follows:


    Dear all,

    I'm writting an autoresponder system in PHP. and I'm using wget in my cron jobs to process it. Is there a way that I can process incoming mail in PHP and call the PHP using a similar method?

    Basically I want to go through all the email messages checking if they are to autoresponderblah.com and if they are I would like to processes the mail body and subject line.

    I'm sure there are different languages to do all this in; mmmm, Perl 5.0 for example but I like PHP ;-)

    Henry

    Thanks in advance

    attached mail follows:


    I have --with-imap for my php installation. Does that help?

    Henry

    "Henry" <henry-php-general-newsteacake.f9.co.uk> wrote in message news:20020710145326.53300.qmailpb1.pair.com... > Dear all, > > I'm writting an autoresponder system in PHP. and I'm using wget in my cron > jobs to process it. Is there a way that I can process incoming mail in PHP > and call the PHP using a similar method? > > Basically I want to go through all the email messages checking if they are > to autoresponderblah.com and if they are I would like to processes the mail > body and subject line. > > I'm sure there are different languages to do all this in; mmmm, Perl 5.0 > for example but I like PHP ;-) > > Henry > > Thanks in advance > >

    attached mail follows:


    Grin!!!! Actually, it is not too hard to unsubscribe if you're using MS-Outlook Express. "Ashley M. Kirchner" <ashleypcraft.com> wrote in message news:3D2B4A0B.58000268pcraft.com... > Kevin Diffily wrote: > > > on 7/9/02 3:29 PM, Erik Hegreberg at ehegrebeonline.no wrote: > > <sarcasm> > But why remove him? We're all having so much fun bouncing his > messages back to his own email. :) > </sarcasm> > > -- > W | I haven't lost my mind; it's backed up on tape somewhere. > +-------------------------------------------------------------------- > Ashley M. Kirchner <mailto:ashleypcraft.com> . 303.442.6410 x130 > IT Director / SysAdmin / WebSmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 > http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. > > >

    attached mail follows:


    Didn't I read the article somewhere on PHP.net that said that? Using fopen() to open a file, does it attempt to create a file if the file does not exist? I use the fopen() and I get the error message. What is the workaround to it?

    Thanks, FletchSOD

    attached mail follows:


    [snip] Didn't I read the article somewhere on PHP.net that said that? Using fopen() to open a file, does it attempt to create a file if the file does not exist? I use the fopen() and I get the error message. What is the workaround to it? [/snip]

    fopen("filename", "w+"); open the filename or create if it does not exist. http://www.php.net/manual/en/function.fopen.php

    HTH!

    Jay

    attached mail follows:


    Thanks a million!!!

    "Jay Blanchard" <jay.blanchardniicommunications.com> wrote in message news:002401c22824$2b1e87b0$8102a8c0niigziuo4ohhdt... > [snip] > Didn't I read the article somewhere on PHP.net that said that? Using > fopen() to open a file, does it attempt to create a file if the file does > not exist? I use the fopen() and I get the error message. What is the > workaround to it? > [/snip] > > fopen("filename", "w+"); open the filename or create if it does not exist. > http://www.php.net/manual/en/function.fopen.php > > HTH! > > Jay > >

    attached mail follows:


    That doesnt' work! Never mind! I'll manually create a blank file and put it there!

    "Scott Fletcher" <scottabcoa.com> wrote in message news:20020710151510.89444.qmailpb1.pair.com... > Thanks a million!!! > > "Jay Blanchard" <jay.blanchardniicommunications.com> wrote in message > news:002401c22824$2b1e87b0$8102a8c0niigziuo4ohhdt... > > [snip] > > Didn't I read the article somewhere on PHP.net that said that? Using > > fopen() to open a file, does it attempt to create a file if the file does > > not exist? I use the fopen() and I get the error message. What is the > > workaround to it? > > [/snip] > > > > fopen("filename", "w+"); open the filename or create if it does not exist. > > http://www.php.net/manual/en/function.fopen.php > > > > HTH! > > > > Jay > > > > > >

    attached mail follows:


    You need to have permission to write to the file. Might I also suggest that you include the full path to the file.

    -----Original Message----- From: Scott Fletcher [mailto:scottabcoa.com] Sent: Wednesday, July 10, 2002 10:34 AM To: php-generallists.php.net Subject: Re: [PHP] fopen() ??

    That doesnt' work! Never mind! I'll manually create a blank file and put it there!

    "Scott Fletcher" <scottabcoa.com> wrote in message news:20020710151510.89444.qmailpb1.pair.com... > Thanks a million!!! > > "Jay Blanchard" <jay.blanchardniicommunications.com> wrote in message > news:002401c22824$2b1e87b0$8102a8c0niigziuo4ohhdt... > > [snip] > > Didn't I read the article somewhere on PHP.net that said that? Using > > fopen() to open a file, does it attempt to create a file if the file does > > not exist? I use the fopen() and I get the error message. What is the > > workaround to it? > > [/snip] > > > > fopen("filename", "w+"); open the filename or create if it does not exist. > > http://www.php.net/manual/en/function.fopen.php > > > > HTH! > > > > Jay > > > > > >

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

    attached mail follows:


    On Wed, 10 Jul 2002 11:33:52 -0400, you wrote: > >"Scott Fletcher" <scottabcoa.com> wrote in message >news:20020710151510.89444.qmailpb1.pair.com... >> Thanks a million!!!

    >> > Didn't I read the article somewhere on PHP.net that said that? Using >> > fopen() to open a file, does it attempt to create a file if the file >does >> > not exist? I use the fopen() and I get the error message. What is the >> > workaround to it?

    >That doesnt' work! Never mind! I'll manually create a blank file and put >it there!

    Check that your script has permission to write to that directory.

    attached mail follows:


    I have the full file path already. It is the permission. Everytime I move the website to a different machine, the permission is set back to the default.

    "David Otton" <david.ottonovernetdata.com> wrote in message news:20loius13gobotmkfea7u6ihjstj959db44ax.com... > On Wed, 10 Jul 2002 11:33:52 -0400, you wrote: > > > >"Scott Fletcher" <scottabcoa.com> wrote in message > >news:20020710151510.89444.qmailpb1.pair.com... > >> Thanks a million!!! > > >> > Didn't I read the article somewhere on PHP.net that said that? Using > >> > fopen() to open a file, does it attempt to create a file if the file > >does > >> > not exist? I use the fopen() and I get the error message. What is the > >> > workaround to it? > > >That doesnt' work! Never mind! I'll manually create a blank file and put > >it there! > > Check that your script has permission to write to that directory. >

    attached mail follows:


    So, manually create a file took care of that. "David Otton" <david.ottonovernetdata.com> wrote in message news:20loius13gobotmkfea7u6ihjstj959db44ax.com... > On Wed, 10 Jul 2002 11:33:52 -0400, you wrote: > > > >"Scott Fletcher" <scottabcoa.com> wrote in message > >news:20020710151510.89444.qmailpb1.pair.com... > >> Thanks a million!!! > > >> > Didn't I read the article somewhere on PHP.net that said that? Using > >> > fopen() to open a file, does it attempt to create a file if the file > >does > >> > not exist? I use the fopen() and I get the error message. What is the > >> > workaround to it? > > >That doesnt' work! Never mind! I'll manually create a blank file and put > >it there! > > Check that your script has permission to write to that directory. >

    attached mail follows:


    what does this mean:

    Warning: Cannot send session cache limiter - headers already sent (output started at /home/.edy/alexross/bleen.net/forum/discussion_fns.php:88) in /home/.edy/alexross/bleen.net/forum/index.php on line 5

    attached mail follows:


    did you echo anything or place this session cache command after any html ?????????? coz if you did it means you can't change any header information once you've displayed something kinda like this.... you can change the header information on an email you just sent....

    "Alexander Ross" <alexrossbleen.net> wrote in message news:20020710151555.91514.qmailpb1.pair.com... > what does this mean: > > Warning: Cannot send session cache limiter - headers already sent (output > started at /home/.edy/alexross/bleen.net/forum/discussion_fns.php:88) in > /home/.edy/alexross/bleen.net/forum/index.php on line 5 > >

    attached mail follows:


    I'm trying to understand sessions so I can set session variables. I set up 2 very simple pages:

    Page 1:

    <? session_start(); $test_var = "froggy"; session_register('test_var'); ?> <a href="page2.php">Click here</a>

    Page 2:

    <? print $test_var."!"; ?>

    This doesn't seem to work though. $test_var doesn't seem to have a value when I go the second page. What am I missing. Thanks for helping a newbie.

    Alex

    attached mail follows:


    Hi Alexander :o)

    You have to have session_start() at the top of EACH page that will hold session registered variables. So just rewrite it like this:

    Page 1:

    <? session_start(); $test_var = "froggy"; session_register('test_var'); ?> <a href="page2.php">Click here</a>

    Page 2:

    <? session_start(); print $test_var."!"; ?>

    Hope this helps!

    Martin

    >>> "Alexander Ross" <alexrossbleen.net> 07/10/02 11:23AM >>> I'm trying to understand sessions so I can set session variables. I set up 2 very simple pages:

    Page 1:

    <? session_start(); $test_var = "froggy"; session_register('test_var'); ?> <a href="page2.php">Click here</a>

    Page 2:

    <? print $test_var."!"; ?>

    This doesn't seem to work though. $test_var doesn't seem to have a value when I go the second page. What am I missing. Thanks for helping a newbie.

    Alex

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

    attached mail follows:


    After redoing my entire site because of session let me give ya some help.

    $_SESSION["test_var"] = "froggy";

    then on page two session_start(); print $_SESSION["test_var"]."!";

    a few tips I have run into SESSION needs to be all caps, otherwise php gets cranky. I am fairly sure in forms you need POST and GET capitalized. session_start() on EVERY page also.

    if you need more help let me know J

    "Alexander Ross" <alexrossbleen.net> 07/10/2002 09:23 AM

    To: php-generallists.php.net cc: Subject: [PHP] sessions

    I'm trying to understand sessions so I can set session variables. I set up 2 very simple pages:

    Page 1:

    <? session_start(); $test_var = "froggy"; session_register('test_var'); ?> <a href="page2.php">Click here</a>

    Page 2:

    <? print $test_var."!"; ?>

    This doesn't seem to work though. $test_var doesn't seem to have a value when I go the second page. What am I missing. Thanks for helping a newbie.

    Alex

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

    attached mail follows:


    try this (I think you have register_globals turned off)

    > Page 2: > > <? > print $_SESSION['test_var']."!"; > ?> >

    Alexander Ross wrote: > I'm trying to understand sessions so I can set session variables. I set up 2 > very simple pages: > > Page 1: > > <? > session_start(); > $test_var = "froggy"; > session_register('test_var'); > ?> > <a href="page2.php">Click here</a> > > > Page 2: > > <? > print $test_var."!"; > ?> > > > This doesn't seem to work though. $test_var doesn't seem to have a value > when I go the second page. What am I missing. Thanks for helping a newbie. > > Alex > >

    attached mail follows:


    How can I configure my scripts to store sessions in MySQL?

    --
    

    ------------------------ ------------------------ Ðurovski Dejan dejanyuEUnet.yu

    attached mail follows:


    session_set_save_handler()

    http://www.zend.com/zend/tut/session.php

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

    attached mail follows:


    I am looking for a good Development tool to write my PHP in and was wondering what people are using out there.

    I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. I know UltraDev 4 well with ASP, but the new MX now supports PHP. This MX/PHP any good? Zend looks good with the integrated documentation and debugging tools.

    Thanks, Mark. _________________________________________ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 mmcculliSykesCanada.com

    attached mail follows:


    PHPED is really good if you have the money to spend...

    B i g D o g

    ----- Original Message ----- From: "Mark McCulligh" <mmccullisykescanada.com> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 9:42 AM Subject: [PHP] Development Tools

    > I am looking for a good Development tool to write my PHP in and was > wondering what people are using out there. > > I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. > I know UltraDev 4 well with ASP, but the new MX now supports PHP. This > MX/PHP any good? Zend looks good with the integrated documentation and > debugging tools. > > Thanks, Mark. > _________________________________________ > Mark McCulligh, Application Developer / Analyst > Sykes Canada Corporation www.SykesCanada.com > (888)225-6824 ex. 3262 > mmcculliSykesCanada.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    I use the almighty Notepad for my coding. When I'm at home, however, I typically use Macromedia Homesite 5 (simply because it has PHP syntax highlighting). I tried using PHPEdit, but I thought it was horrible. It was buggy, and annoying.

    PHP Master Editor is VERY good, and you can probably find it on downloads.com. I've never tried Zend, but it does look very interesting. And since they created the engine for PHP, you would think they're editor would be god, but that, unfortunately, doesn't seem to be the case very often.

    HTH

    Martin

    >>> "Mark McCulligh" <mmccullisykescanada.com> 07/10/02 11:42AM >>> I am looking for a good Development tool to write my PHP in and was wondering what people are using out there.

    I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. I know UltraDev 4 well with ASP, but the new MX now supports PHP. This MX/PHP any good? Zend looks good with the integrated documentation and debugging tools.

    Thanks, Mark. _________________________________________ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 mmcculliSykesCanada.com

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

    attached mail follows:


    Mark,

    I have been developing with PHP for 1 year now, and about 1 month ago got DMX, I have to say that I spend much much less time on building forms and little repetitive work, and more on building applications. I would have to say that DMX increased my productivity by at least 5 times.(I suck at building forms because I spend to much time perfecting them) There is an initial learning curve, because DMX does some things different from what I had known, and some weird behaviors at times, and it certainly cannot be your entire application builder but I can safely say that I love it. Do not attempt to work with it if you do not have a fundamental understanding of PHP, because it has some weird quirks that I were hard to pinpoint for myself. But for building dynamic drop down lists, and recordsets, and update pages, it is great. I wish they had built in some kind of form checker where you could say, "check this field because it is a date" and "check this field when submitted because it is required" I also wish you could customize your mysql error messages, instead every one of them ends in "or die(mysql_error())" Maybe they do have these, and I have not yet found them, so forgive me if my statements are incorrect.( and help me cause I'd love them!) Again, it won't do user error checking, and when forms get complicated you have to do some manual editing, and the errors are generic. But it is certainly worth that money.

    Thanks Dan

    -----Original Message----- From: Mark McCulligh [mailto:mmccullisykescanada.com] Sent: Wednesday, July 10, 2002 9:43 AM To: php-generallists.php.net Subject: [PHP] Development Tools

    I am looking for a good Development tool to write my PHP in and was wondering what people are using out there.

    I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. I know UltraDev 4 well with ASP, but the new MX now supports PHP. This MX/PHP any good? Zend looks good with the integrated documentation and debugging tools.

    Thanks, Mark. _________________________________________ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 mmcculliSykesCanada.com

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

    attached mail follows:


    Maguma Studio Light is pretty good - www.maguma.com

    Mark McCulligh wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 8th July 2002 > ************************************************************************** > > I am looking for a good Development tool to write my PHP in and was > wondering what people are using out there. > > I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. > I know UltraDev 4 well with ASP, but the new MX now supports PHP. This > MX/PHP any good? Zend looks good with the integrated documentation and > debugging tools. > > Thanks, Mark. > _________________________________________ > Mark McCulligh, Application Developer / Analyst > Sykes Canada Corporation www.SykesCanada.com > (888)225-6824 ex. 3262 > mmcculliSykesCanada.com > > >

    -- 
    ----------------------------
    Work: neil.freemanasa.co.uk
    Home: neilcurvedvision.com
    

    Web: www.curvedvision.com ----------------------------

    attached mail follows:


    >When I'm at home, however, I typically use Macromedia Homesite 5 >(simply because it has PHP syntax highlighting).

    Ditto (except v4.0) I like it for support of lots of languages. Javascript, ASP, PHP, CFM etc.

    Bret

    ----- Original Message ----- From: "Martin Clifford" <MLC1nrc.gov> To: <php-generallists.php.net>; <mmccullisykescanada.com> Sent: Wednesday, July 10, 2002 11:46 AM Subject: Re: [PHP] Development Tools

    I use the almighty Notepad for my coding. When I'm at home, however, I typically use Macromedia Homesite 5 (simply because it has PHP syntax highlighting). I tried using PHPEdit, but I thought it was horrible. It was buggy, and annoying.

    PHP Master Editor is VERY good, and you can probably find it on downloads.com. I've never tried Zend, but it does look very interesting. And since they created the engine for PHP, you would think they're editor would be god, but that, unfortunately, doesn't seem to be the case very often.

    HTH

    Martin

    >>> "Mark McCulligh" <mmccullisykescanada.com> 07/10/02 11:42AM >>> I am looking for a good Development tool to write my PHP in and was wondering what people are using out there.

    I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. I know UltraDev 4 well with ASP, but the new MX now supports PHP. This MX/PHP any good? Zend looks good with the integrated documentation and debugging tools.

    Thanks, Mark. _________________________________________ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 mmcculliSykesCanada.com

    --
    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 have been using UltraDev for the last year with my ASP code and it is great. The best I have seen let for ASP. But UltraDev with PHP is mainly just a fancy Notepad. But it sounds like they did a good job with MX/PHP.

    Also if MX work the same way they did UltraDev you can edit the code it writes for you. Example your question about customizing your MySQL error "or die(mysql_error())". This is build by script installed on your machine and are editable. For you can find the MySQL script and change "or die(mysql_error())" too what you want. You can do a search on macromedia's site on how. I have never did let, but read about it in a book on Ultrradev once.

    Thanks for you input, Mark. _________________________________________ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 mmcculliSykesCanada.com ----- Original Message ----- From: "Dan Vande More" <dvmgwtr.com> To: "Mark McCulligh" <mmccullisykescanada.com>; <php-generallists.php.net> Sent: Wednesday, July 10, 2002 11:56 AM Subject: RE: [PHP] Development Tools

    > Mark, > > I have been developing with PHP for 1 year now, and about 1 month ago got DMX, I have to say that I spend much much less time on building forms and little repetitive work, and more on building applications. I would have to say that DMX increased my productivity by at least 5 times.(I suck at building forms because I spend to much time perfecting them) > There is an initial learning curve, because DMX does some things different from what I had known, and some weird behaviors at times, and it certainly cannot be your entire application builder but I can safely say that I love it. > Do not attempt to work with it if you do not have a fundamental understanding of PHP, because it has some weird quirks that I were hard to pinpoint for myself. > But for building dynamic drop down lists, and recordsets, and update pages, it is great. > I wish they had built in some kind of form checker where you could say, "check this field because it is a date" and "check this field when submitted because it is required" > I also wish you could customize your mysql error messages, instead every one of them ends in "or die(mysql_error())" > Maybe they do have these, and I have not yet found them, so forgive me if my statements are incorrect.( and help me cause I'd love them!) > Again, it won't do user error checking, and when forms get complicated you have to do some manual editing, and the errors are generic. > But it is certainly worth that money. > > Thanks > Dan > > -----Original Message----- > From: Mark McCulligh [mailto:mmccullisykescanada.com] > Sent: Wednesday, July 10, 2002 9:43 AM > To: php-generallists.php.net > Subject: [PHP] Development Tools > > > I am looking for a good Development tool to write my PHP in and was > wondering what people are using out there. > > I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. > I know UltraDev 4 well with ASP, but the new MX now supports PHP. This > MX/PHP any good? Zend looks good with the integrated documentation and > debugging tools. > > Thanks, Mark. > _________________________________________ > Mark McCulligh, Application Developer / Analyst > Sykes Canada Corporation www.SykesCanada.com > (888)225-6824 ex. 3262 > mmcculliSykesCanada.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I think that - on windows - nothing is better than textpad (www.textpad.com). Simply the best editor the world has seen so far!

    What makes development tools better than a good editor? (serious question)

    Uwe

    attached mail follows:


    [snip] What makes development tools better than a good editor? (serious question) [/snip]

    Over the course of time (I have been writing code for 25 years, many languages, some compiled, some not) I have found that the most useful tool in the arsenal is a good editor with no more features than line numbering. When I find myself in times of code trouble (props to John Lennon) I will almost always turn to an editor first. I have used many, and for my money where web application development is concerned, Programmers File Editor (no longer supported) http://www.lancs.ac.uk/people/cpaap/pfe/ for Windows, and vi or pico on *nix are the editors of choice. I do use PHPedit from time to time because, while it is buggy, it does do syntax highlighting and matches brackets and other curly thingies well, which is especially helpful when viewing large scripts with lots of code.

    I have and continue to use some IDE's for certain projects (Visual C++, UltraDev for ASP code) but often find myself using an editor on the code created by these.

    So to answer the question above ... nothing beats a good editor.

    Jay

    attached mail follows:


    Can't agree more, it's fine having Ultradev and the rest to get you started but the best end results come from understanding and writing code that is not bloated.

    For a great text editor that has all the features identified in PHPEdit but none of the bugs try JEdit www.jedit.org

    Zac

    ----- Original Message ----- From: "Jay Blanchard" <jay.blanchardniicommunications.com> To: "'Uwe Birkenhain'" <uwe.birkenhainberlin.de>; <php-generallists.php.net> Sent: Wednesday, July 10, 2002 5:21 PM Subject: RE: [PHP] Development Tools

    > [snip] > What makes development tools better than a good editor? (serious question) > [/snip] > > Over the course of time (I have been writing code for 25 years, many > languages, some compiled, some not) I have found that the most useful tool > in the arsenal is a good editor with no more features than line numbering. > When I find myself in times of code trouble (props to John Lennon) I will > almost always turn to an editor first. I have used many, and for my money > where web application development is concerned, Programmers File Editor (no > longer supported) http://www.lancs.ac.uk/people/cpaap/pfe/ for Windows, and > vi or pico on *nix are the editors of choice. I do use PHPedit from time to > time because, while it is buggy, it does do syntax highlighting and matches > brackets and other curly thingies well, which is especially helpful when > viewing large scripts with lots of code. > > I have and continue to use some IDE's for certain projects (Visual C++, > UltraDev for ASP code) but often find myself using an editor on the code > created by these. > > So to answer the question above ... nothing beats a good editor. > > Jay > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    ðÒÉ×ÅÔ!

    gEdit rulez! :) well, I seldom make files any bigger than a couple of scrolls, so... much depends on your programming style. And habits. But I am with Uwe. Nothing like a plain text editor.

    Maybe I am just too old to understand novelty LOL

    ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ× -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    snip/ but often find myself using an editor on the code created by these. So to answer the question above ... nothing beats a good editor. Jay /snip

    Hence the happy medium of Homesite..... acts as a basic text editor but allows some support for coding when needed/wanted..... IMHP

    Bret ----- Original Message ----- From: "Jay Blanchard" <jay.blanchardniicommunications.com> To: "'Uwe Birkenhain'" <uwe.birkenhainberlin.de>; <php-generallists.php.net> Sent: Wednesday, July 10, 2002 12:21 PM Subject: RE: [PHP] Development Tools

    > [snip] > What makes development tools better than a good editor? (serious question) > [/snip] > > Over the course of time (I have been writing code for 25 years, many > languages, some compiled, some not) I have found that the most useful tool > in the arsenal is a good editor with no more features than line numbering. > When I find myself in times of code trouble (props to John Lennon) I will > almost always turn to an editor first. I have used many, and for my money > where web application development is concerned, Programmers File Editor (no > longer supported) http://www.lancs.ac.uk/people/cpaap/pfe/ for Windows, and > vi or pico on *nix are the editors of choice. I do use PHPedit from time to > time because, while it is buggy, it does do syntax highlighting and matches > brackets and other curly thingies well, which is especially helpful when > viewing large scripts with lots of code. > > I have and continue to use some IDE's for certain projects (Visual C++, > UltraDev for ASP code) but often find myself using an editor on the code > created by these. > > So to answer the question above ... nothing beats a good editor. > > Jay > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    I agree completely. Here is an editor I like because it can be customized.

    http://www.gwdsoft.com/

    Todd

    --
    Todd Cary
    Ariste Software
    2200 D Street Extension
    Petaluma, CA 94952
    707-773-4523
    toddaristesoftware.com
    

    attached mail follows:


    HTML-Kit does it for me... great customisability...

    > -----Original Message----- > From: Bret L Conard [mailto:bretlcdonet.com] > Sent: 10 July 2002 5:25 PM > To: php-generallists.php.net > Subject: Re: [PHP] Development Tools > > > snip/ > but often find myself using an editor on the code > created by these. > So to answer the question above ... nothing beats a good editor. > Jay > /snip > > Hence the happy medium of Homesite..... acts as a basic text > editor but > allows some support for coding when needed/wanted..... IMHP > > > Bret > ----- Original Message ----- > From: "Jay Blanchard" <jay.blanchardniicommunications.com> > To: "'Uwe Birkenhain'" <uwe.birkenhainberlin.de>; > <php-generallists.php.net> > Sent: Wednesday, July 10, 2002 12:21 PM > Subject: RE: [PHP] Development Tools > > > > [snip] > > What makes development tools better than a good editor? > (serious question) > > [/snip] > > > > Over the course of time (I have been writing code for 25 years, many > > languages, some compiled, some not) I have found that the > most useful tool > > in the arsenal is a good editor with no more features than > line numbering. > > When I find myself in times of code trouble (props to John > Lennon) I will > > almost always turn to an editor first. I have used many, > and for my money > > where web application development is concerned, Programmers > File Editor > (no > > longer supported) http://www.lancs.ac.uk/people/cpaap/pfe/ > for Windows, > and > > vi or pico on *nix are the editors of choice. I do use > PHPedit from time > to > > time because, while it is buggy, it does do syntax highlighting and > matches > > brackets and other curly thingies well, which is especially > helpful when > > viewing large scripts with lots of code. > > > > I have and continue to use some IDE's for certain projects > (Visual C++, > > UltraDev for ASP code) but often find myself using an > editor on the code > > created by these. > > > > So to answer the question above ... nothing beats a good editor. > > > > Jay > > > > > > > > -- > > 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:


    Dreamweaver has come along nicely. I have only dabbled at the MX version.

    Ultraedit, http://www.ultraedit.com/, has proven to be very nice at handling editing tasks of PHP, HTML, SQL, and hundreds of other languages. It can edit files via FTP which was useful to me years ago and continues to be a requrement; Probably any editor does that now.

    I use both of the above to attack web design projects.

    John

    On Wed, 10 Jul 2002, Mark McCulligh wrote:

    >-I am looking for a good Development tool to write my PHP in and was >-wondering what people are using out there. >- >-I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. >-I know UltraDev 4 well with ASP, but the new MX now supports PHP. This >-MX/PHP any good? Zend looks good with the integrated documentation and >-debugging tools. >- >-Thanks, Mark. >-_________________________________________ >-Mark McCulligh, Application Developer / Analyst >-Sykes Canada Corporation www.SykesCanada.com >-(888)225-6824 ex. 3262 >-mmcculliSykesCanada.com >- >- >- >--- >-PHP General Mailing List (http://www.php.net/) >-To unsubscribe, visit: http://www.php.net/unsub.php >-

    **************************************

    John Huggins VANet

    jhugginsva.net http://www.va.net/

    **************************************

    attached mail follows:


    Exactly. Homesite is, in essence, Dreamweaver MX without the WYSIWYG. Syntax highlighting and code completion make it a very viable editor. I can't stand that WYSIWYG crap. I'm plenty good at messing up my own code without assistance, thank you very much! :o)

    Martin

    >>> "Bret L Conard" <bretlcdonet.com> 07/10/02 12:24PM >>>

    Hence the happy medium of Homesite..... acts as a basic text editor but allows some support for coding when needed/wanted..... IMHP

    Bret ----- Original Message ----- From: "Jay Blanchard" <jay.blanchardniicommunications.com> To: "'Uwe Birkenhain'" <uwe.birkenhainberlin.de>; <php-generallists.php.net> Sent: Wednesday, July 10, 2002 12:21 PM Subject: RE: [PHP] Development Tools

    > [snip] > What makes development tools better than a good editor? (serious question) > [/snip] > > Over the course of time (I have been writing code for 25 years, many > languages, some compiled, some not) I have found that the most useful tool > in the arsenal is a good editor with no more features than line numbering. > When I find myself in times of code trouble (props to John Lennon) I will > almost always turn to an editor first. I have used many, and for my money > where web application development is concerned, Programmers File Editor (no > longer supported) http://www.lancs.ac.uk/people/cpaap/pfe/ for Windows, and > vi or pico on *nix are the editors of choice. I do use PHPedit from time to > time because, while it is buggy, it does do syntax highlighting and matches > brackets and other curly thingies well, which is especially helpful when > viewing large scripts with lots of code. > > I have and continue to use some IDE's for certain projects (Visual C++, > UltraDev for ASP code) but often find myself using an editor on the code > created by these. > > So to answer the question above ... nothing beats a good editor. > > Jay > > > > -- > 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:


    Well, this will start a war, but vim is available for windows... take a bit of getting used to, but once you do it's awesome. and if you end up on a unix box that has it you don't have to relearn anything.

    -philip

    On Wed, 10 Jul 2002, Mark McCulligh wrote:

    > I am looking for a good Development tool to write my PHP in and was > wondering what people are using out there. > > I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. > I know UltraDev 4 well with ASP, but the new MX now supports PHP. This > MX/PHP any good? Zend looks good with the integrated documentation and > debugging tools. > > Thanks, Mark. > _________________________________________ > Mark McCulligh, Application Developer / Analyst > Sykes Canada Corporation www.SykesCanada.com > (888)225-6824 ex. 3262 > mmcculliSykesCanada.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Absolutely true. Even though I haven't learned vi, I have to soon. IMHO, I think I learned php the best way by coding with a no frills editor.... ee With only line numbering and basic search (not search/replace), I think I picked up on php rather quickly, than depending on a debugger to tell me where I went wrong... :) Just my 2cents..

    Philip Hallstrom wrote:

    >Well, this will start a war, but vim is available for windows... take a >bit of getting used to, but once you do it's awesome. and if you end up >on a unix box that has it you don't have to relearn anything. > >-philip > >On Wed, 10 Jul 2002, Mark McCulligh wrote: > > > >>I am looking for a good Development tool to write my PHP in and was >>wondering what people are using out there. >> >>I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit. >>I know UltraDev 4 well with ASP, but the new MX now supports PHP. This >>MX/PHP any good? Zend looks good with the integrated documentation and >>debugging tools. >> >>Thanks, Mark. >>_________________________________________ >>Mark McCulligh, Application Developer / Analyst >>Sykes Canada Corporation www.SykesCanada.com >>(888)225-6824 ex. 3262 >>mmcculliSykesCanada.com >> >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > > > >

    -- 
    Gerard Samuel
    http://www.trini0.org:81/
    http://dev.trini0.org:81/
    

    attached mail follows:


    I agree about WYSIWYG. I use UltraDev a lot, but don't use the WYSIWYG very much again more. UltraDev is great at managing your site and syntax highlighting. I love the update feature (change a file/image name and it updates all pages that use them to the new name)

    Also about plain programming editors, I like PFE too. Didn't know it was unsupported now(see Jay Blanchard comment above)

    --
    _________________________________________
    Mark McCulligh, Application Developer / Analyst
    Sykes Canada Corporation www.SykesCanada.com
    (888)225-6824 ex. 3262
    mmcculliSykesCanada.com
    "Martin Clifford" <MLC1nrc.gov> wrote in message
    news:sd2c2e4e.016nrcgwia.nrc.gov...
    Exactly.  Homesite is, in essence, Dreamweaver MX without the WYSIWYG.
    Syntax highlighting and code completion make it a very viable editor.  I
    can't stand that WYSIWYG crap.  I'm plenty good at messing up my own code
    without assistance, thank you very much! :o)
    

    Martin

    >>> "Bret L Conard" <bretlcdonet.com> 07/10/02 12:24PM >>>

    Hence the happy medium of Homesite..... acts as a basic text editor but allows some support for coding when needed/wanted..... IMHP

    Bret ----- Original Message ----- From: "Jay Blanchard" <jay.blanchardniicommunications.com> To: "'Uwe Birkenhain'" <uwe.birkenhainberlin.de>; <php-generallists.php.net> Sent: Wednesday, July 10, 2002 12:21 PM Subject: RE: [PHP] Development Tools

    > [snip] > What makes development tools better than a good editor? (serious question) > [/snip] > > Over the course of time (I have been writing code for 25 years, many > languages, some compiled, some not) I have found that the most useful tool > in the arsenal is a good editor with no more features than line numbering. > When I find myself in times of code trouble (props to John Lennon) I will > almost always turn to an editor first. I have used many, and for my money > where web application development is concerned, Programmers File Editor (no > longer supported) http://www.lancs.ac.uk/people/cpaap/pfe/ for Windows, and > vi or pico on *nix are the editors of choice. I do use PHPedit from time to > time because, while it is buggy, it does do syntax highlighting and matches > brackets and other curly thingies well, which is especially helpful when > viewing large scripts with lots of code. > > I have and continue to use some IDE's for certain projects (Visual C++, > UltraDev for ASP code) but often find myself using an editor on the code > created by these. > > So to answer the question above ... nothing beats a good editor. > > Jay > > > > -- > 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've created a db like system with XML and PHP, and I want to require a username/password to change the contents of the file.

    How should I go about documenting the username/password? The contents of the site aren't really all to important (no financial info or anything like that, mostly just links actually), but I don't want someone's information stolen because someone found the "users.xml" file and opened it.

    Running on a Windows 2k server with IIS5.

    attached mail follows:


    You could store passwords as MD5 hashes which of course is NOT really encryption, but it would obfuscate the users' passwords. They would still be vulnerable to social engineering ("Hmm, I'll try his wife's name, then his dog's name, then his phone#," etc) and brute force ("I'm going to run every word in the pspell dictionary through MD5 and see if anything matches") attacks, but it would be better than plain text, at least.

    So, instead of

    <user> <name>Foo</name> <password>bar</password> </user>

    you would have <user> <name>Foo</name> <password>37b51d194a7513e45b56f6524f2d51f2</password> </user>

    When 'Foo' tries to log in, you would just use MD5() on the password he entered in the web form and compare it to the value in the XML file. If it matches, he's in... otherwise, it's not the right password.

    I'm sure others will come up with more secure ideas, but anything is more secure than passwords in plain text. :)

    -Andy

    > -----Original Message----- > From: Chris Earle [mailto:chrisearleweb.com] > Sent: Wednesday, July 10, 2002 9:42 AM > To: php-generallists.php.net > Subject: [PHP] Security with XML > > > I've created a db like system with XML and PHP, and I want to require a > username/password to change the contents of the file. > > How should I go about documenting the username/password? The contents of > the site aren't really all to important (no financial info or > anything like > that, mostly just links actually), but I don't want someone's information > stolen because someone found the "users.xml" file and opened it.

    attached mail follows:


    Are you telling me that you cannot look at "37b51d194a7513e45b56f6524f2d51f2" and see that the is the same as "bar"? ... Just kidding.

    Thanks for the tip, that makes a lot of sense.

    "Andrew Chase" <andrew.chasevalleypres.org> wrote in message news:NGBBLCLNFOGFEGNEMCCCIEOKELAA.andrew.chasevalleypres.org... > You could store passwords as MD5 hashes which of course is NOT really > encryption, but it would obfuscate the users' passwords. They would still > be vulnerable to social engineering ("Hmm, I'll try his wife's name, then > his dog's name, then his phone#," etc) and brute force ("I'm going to run > every word in the pspell dictionary through MD5 and see if anything > matches") attacks, but it would be better than plain text, at least. > > So, instead of > > <user> > <name>Foo</name> > <password>bar</password> > </user> > > you would have > <user> > <name>Foo</name> > <password>37b51d194a7513e45b56f6524f2d51f2</password> > </user> > > When 'Foo' tries to log in, you would just use MD5() on the password he > entered in the web form and compare it to the value in the XML file. If it > matches, he's in... otherwise, it's not the right password. > > I'm sure others will come up with more secure ideas, but anything is more > secure than passwords in plain text. :) > > -Andy > > > -----Original Message----- > > From: Chris Earle [mailto:chrisearleweb.com] > > Sent: Wednesday, July 10, 2002 9:42 AM > > To: php-generallists.php.net > > Subject: [PHP] Security with XML > > > > > > I've created a db like system with XML and PHP, and I want to require a > > username/password to change the contents of the file. > > > > How should I go about documenting the username/password? The contents of > > the site aren't really all to important (no financial info or > > anything like > > that, mostly just links actually), but I don't want someone's information > > stolen because someone found the "users.xml" file and opened it. >

    attached mail follows:


    Hey,

    I got a response from abuseonline.no regarding Erik Hegreberg's little stunt yesterday and they want full headers from the message in question. I thought all headers were going with my message to abuseonline.no when I forwarded, but apparently they got stripped by my client.

    Unfortunately, I deleted all of Erik's messages as they came in, so I'm hoping someone out there that still has at least one copy can either forward me a copy with all headers intact, or can copy/paste headers into a new message and send those to me.

    Just want to make sure Erik is properly dealt with by his ISP. Thanks,

    Jason Soza

    attached mail follows:


    I'm just curious if there's a function that allows you to see how many lines there are in a file. I could just set up a while(!feof($fp)) { fgets($fp); count++; } obviously, but I'm curious if there's a function built in like "flines($fp)" that I haven't noticed at php.net?

    attached mail follows:


    There's a bunch of headers below that have been replied to... some still have his information inside.

    attached mail follows:


    Hi folks,

    I'm trying my hand at some pattern matching, and I have a question.

    I need to take all the text between the title tags of a page, and replace it. This I can do, with the following:

    $fixedfile=ereg_replace("<title>.*</title>","<title><? echo \$bstitle; ?></title>", $fixedfile); works like a charm....

    Now I want to delete everything in the src section of an image tag, so I'm trying this:

    $fixedfile=ereg_replace("src=\".*\">","src=\"<!---image goes here--->\"", $fixedfile);

    but this doesn't work.

    What am I doing wrong?

    Kelly

    attached mail follows:


    I'd create an array that held the Change value (0 [false] or 1 [true]) for each. Then I'd make a loop that just set up the table with an if statement: "if ($Change[$count]) { echo $bg; }". $Change[0] would correspond with ph1, unless you started the array(1 => ...).

    "Peter" <phpvfsa.com.au> wrote in message news:DPEPKCNEFOKBCNNANCIPAEMHCEAA.phpvfsa.com.au... > howdy all > > my aim is to have a user submit a form and then from there replace cell colours with in a table. I'm referencing the cells by cell id's eg > > <tr> > <td height="10" bgcolor=<? echo $bg; ?> id="ph1"><font size="-2" face="Arial, Helvetica, sans-serif">1</font> > </td> > <td height="10" bgcolor=<? echo $bg; ?> id="ph2"><font size="-2" face="Arial, Helvetica, sans-serif">2</font> > </td> > <td height="10" bgcolor=<? echo $bg; ?> id="ph3"><font size="-2" face="Arial, Helvetica, sans-serif">3</font> > </td> > <td height="10" bgcolor=<? echo $bg; ?> id="ph4"><font size="-2" face="Arial, Helvetica, sans-serif">4</font> > </td> > </tr> > > now using a switch statement eg > > switch( $bg ) > { > case "red": > print( "#FF0000" ); > break; > //a few more colours in here > default: > print( "#FFFFFF" ); > break; > } > what would be the best way to tell it what cell colours to replace on submit would it be an if, for or a do/while statement that would be the better option ( or any others that 4 that matter) if i wanted to have just the cells with the ids of ph2 & ph3 to be changed? > > > Cheers > > Peter > "the only dumb question is the one that wasn't asked" >

    attached mail follows:


    This is sorta OT, but involves PHP.

    I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be able to use cntrl/shift-click to select a bunch of items. Let's say this List is called 'list'. Now when I submit the form, how does the processing script access all these different values in 'list'? If I try to echo '$list' it only show *one* of the selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but that doesn't work either.

    How do I get at the different values?

    Thanks,

    -- 
    : Joseph Szobody :
    "Computers are like airconditioners: They stop working properly if you open windows."
    

    attached mail follows:


    Search the archives...this has been answered by me and many others...

    B i g D o g

    ----- Original Message ----- From: "Joseph Szobody" <jszobodyexcite.com> To: <php-generallists.php.net> Sent: Wednesday, July 10, 2002 12:02 PM Subject: [PHP] Accessing multiple List/Menu values

    > This is sorta OT, but involves PHP. > > I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be able to use cntrl/shift-click to select a bunch of items. Let's say this List is called 'list'. Now when I submit the form, how does the processing script access all these different values in 'list'? If I try to echo '$list' it only show *one* of the selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but that doesn't work either. > > How do I get at the different values? > > Thanks, > > -- > : Joseph Szobody : > "Computers are like airconditioners: They stop working properly if you open windows." > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Have you tried like this?

    <select name="list[]" size="5" multiple> <option value="yahoo">Yahoo!</option> ... <option value="phpnet">PHP.net</option> </select>

    Then access the array on the processing page.

    Martin

    >>> "Joseph Szobody" <jszobodyexcite.com> 07/10/02 02:02PM >>> This is sorta OT, but involves PHP.

    I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be able to use cntrl/shift-click to select a bunch of items. Let's say this List is called 'list'. Now when I submit the form, how does the processing script access all these different values in 'list'? If I try to echo '$list' it only show *one* of the selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but that doesn't work either.

    How do I get at the different values?

    Thanks,

    -- 
    : Joseph Szobody :
    "Computers are like airconditioners: They stop working properly if you open windows."
    

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

    attached mail follows:


    The manual is up-to-date on this topic, for questions related to register_globals and form variables please feel free to point to:

    http://www.php.net/manual/en/language.variables.external.php

    Or the shortcut (all man pages work this way):

    http://www.php.net/variables.external

    In fact, it should answer most any register_globals related question. It also links to the manuals definition of this directive which has been updated too:

    http://www.php.net/manual/en/configuration.php#ini.register-globals

    These two manual pages _should_ explain it, even to newbies. They contain examples and various links.

    Regards, Philip Olson

    attached mail follows:


    Are there any php scripts or classes that do Automatic Form Creation? If it worked from a MySQL datbase that would be a plus.

    attached mail follows:


    That all depends on what the form is for, what it has to do, how many fields it needs, etc. You'd be better off writing a function to create your forms, if you ask me.

    Just my $20.00 (big mouth)

    Martin

    >>> "CM" <chillman80hotmail.com> 07/10/02 01:14PM >>> Are there any php scripts or classes that do Automatic Form Creation? If it worked from a MySQL datbase that would be a plus.

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

    attached mail follows:


    Had trouble getting this posed at the newsgroup - will try on the maillist here:

    I have a date field passed in a form like this:

    "01-02-2003"

    Is there a handy function to convert that to other ways of expressing the date such as:

    "01/02/03"

    OR

    "2003-01-02"

    I know the syntax of the date formatting expressions ... just not for the converting.

    Thanks!

    attached mail follows:


    To convert from user format to mysql I use:

    $training_date=$_POST["training_date"]; $training_date=str_replace("-", "/", $training_date);//strtotime doesnt seem to work right if it has 12-25-2002, but does if it has 12/25/2002 $training_date=strtotime($training_date); $training_date=date("Y-m-d",$training_date);

    To convert from mysql to user I do:

    $field_hire_date=$row_current_emps['field_hire_date']; $field_hire_date=strtotime($field_hire_date); $field_hire_date=date("m/d/Y" , $field_hire_date);

    -----Original Message----- From: Rw [mailto:phpwiegmann.net] Sent: Wednesday, July 10, 2002 11:25 AM To: php-generallists.php.net Subject: [PHP] Date formatting

    Had trouble getting this posed at the newsgroup - will try on the maillist here:

    I have a date field passed in a form like this:

    "01-02-2003"

    Is there a handy function to convert that to other ways of expressing the date such as:

    "01/02/03"

    OR

    "2003-01-02"

    I know the syntax of the date formatting expressions ... just not for the converting.

    Thanks!

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

    attached mail follows:


    I've got a project that requires lots of "goofy" reports. These reports are more than a simple html table (which would be nice) that the client wants to print out on standard 8.5x11 paper. Crystal Reports type of reports. I need to be able to produce these from PHP scripts and I'm looking for a solution. What are people using to accomplish this?

    --
    Jeff D. Hamann
    Hamann, Donald & Associates, Inc.
    PO Box 1421
    Corvallis, Oregon USA 97339-1421
    Bus. 541-753-7333
    Cell. 541-740-5988
    jeff_hamannhamanndonald.com
    www.hamanndonald.com
    

    attached mail follows:


    php.net/pdf

    On Wed, 10 Jul 2002, Jeff D. Hamann wrote:

    > I've got a project that requires lots of "goofy" reports. These reports are > more than a simple html table (which would be nice) that the client wants to > print out on standard 8.5x11 paper. Crystal Reports type of reports. I need > to be able to produce these from PHP scripts and I'm looking for a solution. > What are people using to accomplish this? > > > -- > Jeff D. Hamann > Hamann, Donald & Associates, Inc. > PO Box 1421 > Corvallis, Oregon USA 97339-1421 > Bus. 541-753-7333 > Cell. 541-740-5988 > jeff_hamannhamanndonald.com > www.hamanndonald.com > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I am trying to insert info. into a paradox table but receive the following message after inputting the data into the approriate fields...

    Warning: SQL error: [Microsoft][ODBC Paradox Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\coopstudent.php on line 47

    I am able to retrieve info. from the table but when I write some Insertion Code I receive the above message...

    This is what the code looks like... Please help...

    $db = odbc_connect("MyDNS", "who", "null"); $dreq = "INSERT INTO myTablet.db (field1, field2, field3...) VALUES ('$field1', '$field2', '$field3'...)"; odbc_exec($db, $dreq);

    Thanks in advance...

    Kondwani

    attached mail follows:


    You ask a lot of questions! Doh!!!

    "Kondwani Spike Mkandawire" <kondwanics.mun.ca> wrote in message news:20020710173800.9174.qmailpb1.pair.com... > I am trying to insert info. into a paradox table but receive the following > message after inputting the data into the approriate fields... > > Warning: SQL error: [Microsoft][ODBC Paradox Driver] Operation > must use an updateable query., SQL state S1000 in SQLExecDirect > in c:\program files\apache group\apache\htdocs\coopstudent.php > on line 47 > > I am able to retrieve info. from the table but when I write some Insertion > Code I receive the above message... > > This is what the code looks like... Please help... > > $db = odbc_connect("MyDNS", "who", "null"); > $dreq = "INSERT INTO myTablet.db (field1, field2, field3...) VALUES > ('$field1', '$field2', '$field3'...)"; > odbc_exec($db, $dreq); > > Thanks in advance... > > Kondwani > >

    attached mail follows:


    >"Kondwani Spike Mkandawire" <kondwanics.mun.ca> wrote in message >news:20020710173800.9174.qmailpb1.pair.com... > > I am trying to insert info. into a paradox table but receive the following > > message after inputting the data into the approriate fields... > > > > Warning: SQL error: [Microsoft][ODBC Paradox Driver] Operation > > must use an updateable query., SQL state S1000 in SQLExecDirect > > in c:\program files\apache group\apache\htdocs\coopstudent.php > > on line 47

    Your problem should be about file permissions. Try to give full permissions to the IIS_USR for the Paradox tabel you want to extract data from.

    Let me know if you have any other questions

    Regards

    Alex

    > > I am able to retrieve info. from the table but when I write some Insertion > > Code I receive the above message... > > > > This is what the code looks like... Please help... > > > > $db = odbc_connect("MyDNS", "who", "null"); > > $dreq = "INSERT INTO myTablet.db (field1, field2, field3...) VALUES > > ('$field1', '$field2', '$field3'...)"; > > odbc_exec($db, $dreq); > > > > Thanks in advance... > > > > Kondwani > > > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    heheheehhee ;))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

    > Serves our spam "friend" right... now we can get on with our lives. > > "Chris Shiflett" <shiflettphp.net> wrote in message > news:3D2B6BB5.2040709php.net... > > I just thought this was worth sharing. :-) > > > > ----- The following addresses had permanent fatal errors ----- > > <ehegrebeonline.no> > > > > ----- Transcript of session follows ----- > > RECIPIENTS MAILBOX IS FULL > > 554 <ehegrebeonline.no>... Service unavailable > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hello

    I have a problem with mysql.I create a table with a field "kat".In this field are entries like this :

    Light Dark Dark Light Robot Find Dark Light

    You see that all entries are not unique.So i want to list as output all entries but only once.If the word "Dark" is in the table 6 times php should output dark only 1 time. How should i solve this problem ?

    Thanks! chris

    attached mail follows:


    You can refer to fields by their number.

    $Row[3];

    -----Original Message----- From: mailstruempf.com [mailto:mailstruempf.com] Sent: Wednesday, July 10, 2002 10:40 AM To: php-generallists.php.net Subject: [PHP] SQL field problem

    Hello

    I have a problem with mysql.I create a table with a field "kat".In this field are entries like this :

    Light Dark Dark Light Robot Find Dark Light

    You see that all entries are not unique.So i want to list as output all entries but only once.If the word "Dark" is in the table 6 times php should output dark only 1 time. How should i solve this problem ?

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

    attached mail follows:


    I think you want to use group by: SELECT * FROM table GROUP BY kat;

    -- 
    Tyler Longren
    Captain Jack Communications
    tylercaptainjack.com
    www.captainjack.com
    

    On Wed, 10 Jul 2002 19:40:11 +0200 <mailstruempf.com> wrote:

    > Hello > > I have a problem with mysql.I create a table with a field "kat".In > this field are entries like this : > > Light > Dark > Dark > Light > Robot > Find > Dark > Light > > You see that all entries are not unique.So i want to list as output > all entries but only once.If the word "Dark" is in the table 6 times > php should output dark only 1 time. How should i solve this problem ? > > Thanks! > chris >

    attached mail follows:


    SELECT DISTINCT kat FROM tablename; should work.

    Martin

    >>> <mailstruempf.com> 07/10/02 01:40PM >>> Hello

    I have a problem with mysql.I create a table with a field "kat".In this field are entries like this :

    Light Dark Dark Light Robot Find Dark Light

    You see that all entries are not unique.So i want to list as output all entries but only once.If the word "Dark" is in the table 6 times php should output dark only 1 time. How should i solve this problem ?

    Thanks! chris

    attached mail follows:


    I'd make another array that I can refer to and check for a value from the original query (which with a huge array could become cumbersome, but it doesn't look like you have will have too many duplicate names). Every time you come across a new value, add it to the 2nd array (if it's not new, then don't add it), then put the pointer of the array back to the start. Return whether it was added or not, if it was added, then return 1 (true -- you can display that word), or else return 0 (false -- it was already in the list and thus has been displayed).

    Of course you might not want to do this if both arrays are going to become huge (if the first is going to be like 10000 long, but the 2nd is only 4 long then it might still be slow). I believe there is a SQL Query that can cancel out duplicates for you.

    "Ed Lazor" <ELazorprovidence.org> wrote in message news:C8891DEC2698D411A91B00508BF9898806E118E3phsormsg04.phsor.org... > You can refer to fields by their number. > > $Row[3]; > > -----Original Message----- > From: mailstruempf.com [mailto:mailstruempf.com] > Sent: Wednesday, July 10, 2002 10:40 AM > To: php-generallists.php.net > Subject: [PHP] SQL field problem > > > Hello > > I have a problem with mysql.I create a table with a field "kat".In this > field are entries like this : > > Light > Dark > Dark > Light > Robot > Find > Dark > Light > > You see that all entries are not unique.So i want to list as output all > entries but only once.If the word "Dark" is in the table 6 times php should > output dark only 1 time. > How should i solve this problem ? > > Thanks! > chris > > **************************************************************************** > This message is intended for the sole use of the individual and entity to > whom it is addressed, and may contain information that is privileged, > confidential and exempt from disclosure under applicable law. If you are > not the intended addressee, nor authorized to receive for the intended > addressee, you are hereby notified that you may not use, copy, disclose or > distribute to anyone the message or any information contained in the > message. If you have received this message in error, please immediately > advise the sender by reply email and delete the message. Thank you very > much.

    attached mail follows:


    Martin's post is what you want... knew there was a query (just couldn't remember it).

    "Chris Earle" <chrisearleweb.com> wrote in message news:20020710175704.43780.qmailpb1.pair.com... > I'd make another array that I can refer to and check for a value from the > original query (which with a huge array could become cumbersome, but it > doesn't look like you have will have too many duplicate names). Every time > you come across a new value, add it to the 2nd array (if it's not new, then > don't add it), then put the pointer of the array back to the start. Return > whether it was added or not, if it was added, then return 1 (true -- you can > display that word), or else return 0 (false -- it was already in the list > and thus has been displayed). > > Of course you might not want to do this if both arrays are going to become > huge (if the first is going to be like 10000 long, but the 2nd is only 4 > long then it might still be slow). I believe there is a SQL Query that can > cancel out duplicates for you. > > "Ed Lazor" <ELazorprovidence.org> wrote in message > news:C8891DEC2698D411A91B00508BF9898806E118E3phsormsg04.phsor.org... > > You can refer to fields by their number. > > > > $Row[3]; > > > > -----Original Message----- > > From: mailstruempf.com [mailto:mailstruempf.com] > > Sent: Wednesday, July 10, 2002 10:40 AM > > To: php-generallists.php.net > > Subject: [PHP] SQL field problem > > > > > > Hello > > > > I have a problem with mysql.I create a table with a field "kat".In this > > field are entries like this : > > > > Light > > Dark > > Dark > > Light > > Robot > > Find > > Dark > > Light > > > > You see that all entries are not unique.So i want to list as output all > > entries but only once.If the word "Dark" is in the table 6 times php > should > > output dark only 1 time. > > How should i solve this problem ? > > > > Thanks! > > chris > > > > > **************************************************************************** > > This message is intended for the sole use of the individual and entity to > > whom it is addressed, and may contain information that is privileged, > > confidential and exempt from disclosure under applicable law. If you are > > not the intended addressee, nor authorized to receive for the intended > > addressee, you are hereby notified that you may not use, copy, disclose or > > distribute to anyone the message or any information contained in the > > message. If you have received this message in error, please immediately > > advise the sender by reply email and delete the message. Thank you very > > much. > >

    attached mail follows:


    Hi guys,

    I have a problem sorting values comming out of a db. It is not as easy.

    Here is the prob: One table containing user points. Other table containing reports with rankings For each top 10 report (the 10 reports with the most ranking) there are 20 extra points granted

    Now I would like to get the top 5 members out of the db. If I only pull out the user table ordered by points desc limit 5 I might miss a user with a top 10 report and 20 extra points.

    So I thought about sorting the array afterwards with asort, but then I loose the asoziation with the user_id.

    Maybe there is a way to sort the other arrays with the same sorting algo? Or a way to include a iff clause in the query?

    currently I am doing: SELECT u_name, id, points FROM user WHERE points > 0 ORDER by points desc LIMIT 5

    and the top10 reports extra.

    Has anybody a good idea on that?

    Andy

    attached mail follows:


    I'm not sure if I completely understand what you're asking, but....

    It sounds like one table has user information. The second table has a record for each user and a field for the total number of points of each user. Something like this:

    Users (Table 1) ------------- ID Name Address etc.

    Scores (Table 2) ------------- ID UserID Points

    If this isn't the case, well, you'll probably want to adjust your database structure. This approach allows you to do a simple SQL query like this:

    select Users.*, Scores.* from Users, Scores where Users.ID = Scores.UserID ORDER BY Scores.Points limit 5

    -----Original Message----- From: andy [mailto:news.lettersgmx.de] Sent: Wednesday, July 10, 2002 10:52 AM To: php-generallists.php.net; php-dblists.php.net Subject: [PHP] sort problem

    Hi guys,

    I have a problem sorting values comming out of a db. It is not as easy.

    Here is the prob: One table containing user points. Other table containing reports with rankings For each top 10 report (the 10 reports with the most ranking) there are 20 extra points granted

    Now I would like to get the top 5 members out of the db. If I only pull out the user table ordered by points desc limit 5 I might miss a user with a top 10 report and 20 extra points.

    So I thought about sorting the array afterwards with asort, but then I loose the asoziation with the user_id.

    Maybe there is a way to sort the other arrays with the same sorting algo? Or a way to include a iff clause in the query?

    currently I am doing: SELECT u_name, id, points FROM user WHERE points > 0 ORDER by points desc LIMIT 5

    and the top10 reports extra.

    Has anybody a good idea on that?

    Andy

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
     
    ****************************************************************************
    This message is intended for the sole use of the individual and entity to
    whom it is addressed, and may contain information that is privileged,
    confidential and exempt from disclosure under applicable law.  If you are
    not the intended addressee, nor authorized to receive for the intended
    addressee, you are hereby notified that you may not use, copy, disclose or
    distribute to anyone the message or any information contained in the
    message.  If you have received this message in error, please immediately
    advise the sender by reply email and delete the message.  Thank you very
    much.                                                                       
    

    attached mail follows:


    Hi, I am not sure if it is a right email address to ask question, if it is not plz disregard this email :) if it is this is my Q: I am reading a book about php, in its security section, it says " it is more secure, as well as more efficient when installing PHP, to install PHP as a SAPI module for your Web server that to run it via the CGI interface" do you know how can I do that? what is SAPI? Thank you for your time

    _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com