OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Mon Apr 09 2001 - 08:16:54 CDT

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

    php-general Digest 9 Apr 2001 13:16:54 -0000 Issue 617

    Topics (messages 47701 through 47774):

    Dynamic Module Load
            47701 by: Jochen Kaechelin

    Re: PHPSESSID sticks to every link after upgrate of Apache/PHP
            47702 by: trogers
            47716 by: Benjamin Munoz

    Where to get php_pdf.so?
            47703 by: Jochen Kaechelin

    Re: Apache latest + PHP latest + GD latest + Freetype latest + Jpeg latest
            47704 by: trogers
            47705 by: Rasmus Lerdorf

    Re: "configure" not doing anything and file not found
            47706 by: Yasuo Ohgaki

    Asking for input from shell?
            47707 by: enthalpy
            47708 by: Jason Brooke
            47709 by: enthalpy
            47741 by: enthalpy
            47767 by: Knut H. Hassel Nielsen

    double byte problem
            47710 by: Subhrajyoti Moitra
            47718 by: Benjamin Munoz

    date/time in wrong zone
            47711 by: Duke
            47712 by: Duke

    This loop is screwed up totally. Why o why o why....
            47713 by: Yo Bro
            47717 by: David Robley
            47719 by: Yo Bro
            47720 by: David Robley
            47723 by: Yo Bro
            47725 by: David Robley
            47728 by: Philip Olson

    Re: Inputing data to a relational database
            47714 by: Jason Lotito

    select as
            47715 by: Christopher Allen

    Re: mail() limit? Use aliases table
            47721 by: Manuel Lemos

    Re: Row colors
            47722 by: Manuel Lemos
            47724 by: Harshdeep S Jawanda
            47750 by: Rikul
            47757 by: Maxim Maletsky
            47763 by: Jason Stechschulte

    at the begining
            47726 by: Fernando Buitrago
            47730 by: elias
            47734 by: Mukul Sabharwal
            47739 by: Philip Olson

    apostrophe checks
            47727 by: Wade Halsey
            47748 by: Renze Munnik
            47749 by: Philip Olson
            47755 by: Christian Reiniger
            47770 by: Antti Boman

    Re: how do i...?
            47729 by: elias

    Re: mystery line
            47731 by: Stuart J. Browne

    php search xml-file
            47732 by: Jan Grafström
            47735 by: elias

    Re: Redirect
            47733 by: elias

    Re: Validate forms into PHP file
            47736 by: elias

    validating form data via javaScript when stored in an array
            47737 by: Joseph Blythe
            47740 by: Morten Winkler Jørgensen
            47743 by: Joseph Blythe
            47747 by: elias

    Re: nested loops and PHPLIB templates
            47738 by: Maxim Derkachev

    Re: putting a list of data into 3 columns?
            47742 by: Stewart Taylor

    Re: newbie question about variables
            47744 by: Cheng, Kynan (London)

    PHP & Apache through proxy
            47745 by: Daniel B I

    URL w/o script name
            47746 by: elias
            47760 by: mailing_list.gmx.at
            47765 by: Jason Lotito

    PHP Error
            47751 by: Marc Dondlinger
            47753 by: Maxim Maletsky
            47756 by: Maxim Maletsky

    how much data can a session store?
            47752 by: Tobias Talltorp
            47764 by: Yasuo Ohgaki

    include_path
            47754 by: Jimmy Bäckström
            47758 by: Maxim Maletsky

    Why a javascript have problem if it is dynamic load?
            47759 by: Carfield Yim
            47761 by: Adrian Murphy

    monitor script that waits for the children to end eventhough it shouldn't
            47762 by: derJoe

    Re: getting commandline ?
            47766 by: NoSpeed
            47768 by: Knut H. Hassel Nielsen

    I am SO confused (help with references!) (could be a bug?)
            47769 by: Plutarck

    isset() VS if($var)
            47771 by: Jesper Blomström
            47773 by: Adam Wright

    SNMP Difficulties?!?!?!?!?
            47772 by: Zach Brown

    URL FROM IP
            47774 by: Renzi, Sebastian

    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:


    My ISP does not support PDF-Support in PHP 4.0.3pl1.
    But we urgently need to generate PDF-Files on the fly.

    Is it secure to use the dl-command?
    Is it possible to override the dl-extension-path
    defined in the php.ini?

    --
    Jochen Kaechelin - Ihr WEBberater
    Stuttgarter Str.3, D-73033 Goeppingen
    Tel. 07161-92 95 94, Fax 07161-92 95 98
    http://www.wa-p.de, mailto:jkwa-p.de 
    

    attached mail follows:


    Hi You will probably need to make clean and rebuild php config and do a new make against the new version of apache. Just a guess Tom

    At 12:28 PM 5/04/01 +0900, Maxim Maletsky wrote: > >Hello, > >my co-worker has reinstalled Apache and PHP over the last night. > >The Apache was upgraded to the new version while PHP was re-installed the >same. >PHP.ini was untouched. > >Site uses sessions and, somehow, after this upgrade started carrying >PHPSESSID through HREF. > >What should look for to bring the sessions using Cookies? > >from PHP-INI: > >NOTE : this was untouched. > > >================================================ >[Session] >session.save_handler = files ; handler used to store/retrieve data >session.save_path = /tmp ; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored >session.use_cookies = 1 ; whether to use cookies >session.name = PHPSESSID ; name of the session > ; is used as cookie name >session.auto_start = 0 ; initialize session on request startup >session.cookie_lifetime = 0 ; lifetime in seconds of cookie > ; or if 0, until browser is restarted >session.cookie_path = / ; the path the cookie is valid for >session.cookie_domain = ; the domain the cookie is valid for >session.serialize_handler = php ; handler used to serialize data > ; php is the standard serializer of PHP >session.gc_probability = 1 ; percentual probability that the > ; 'garbage collection' process is >started > ; on every session initialization >session.gc_maxlifetime = 1440 ; after this number of seconds, stored > ; data will be seen as 'garbage' and > ; cleaned up by the gc process >session.referer_check = ; check HTTP Referer to invalidate > ; externally stored URLs containing ids >session.entropy_length = 0 ; how many bytes to read from the file >session.entropy_file = ; specified here to create the session >id >; session.entropy_length = 16 >; session.entropy_file = /dev/urandom >session.cache_limiter = nocache ; set to {nocache,private,public} to > ; determine HTTP caching aspects >session.cache_expire = 180 ; document expires after n minutes >session.use_trans_sid = 1 ; use transient sid support if enabled > ; by compiling with --enable-trans-sid >================================================= > > >Has upgrade of apache (modules, etc) anything to do with it? > >I can't really give you any more details since my co-coworker is unreachable >right now, and this is kinda urgent. > >Cheers, >Max. > > > >Maxim Maletsky - maximj-door.com <mailto:maximj-door.com> >Webmaster, J-Door.com / Jpan Inc. >LINC Media, Inc. >TEL: 03-3499-2175 x 1271 >FAX: 03-3499-3109 > >http://www.j-door.com <http://www.j-door.com/> >http://www.japaninc.net <http://www.japaninc.net/> >http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/> > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    In your php.ini, change the following line: >session.use_trans_sid = 1 ; use transient sid support if enabled to >session.use_trans_sid = 0 ; use transient sid support if enabled

    And see if that solves your problem. Also, check the change with phpinfo(), and if nothing changed, look for a second evil twin of php.ini

    -Ben -----Original Message----- From: trogers [mailto:trogersats.com.au] Sent: Sunday, April 08, 2001 6:59 PM To: 'PHP General List. (E-mail)' Subject: Re: [PHP] PHPSESSID sticks to every link after upgrate of Apache/PHP

    Hi You will probably need to make clean and rebuild php config and do a new make against the new version of apache. Just a guess Tom

    At 12:28 PM 5/04/01 +0900, Maxim Maletsky wrote: > >Hello, > >my co-worker has reinstalled Apache and PHP over the last night. > >The Apache was upgraded to the new version while PHP was re-installed the >same. >PHP.ini was untouched. > >Site uses sessions and, somehow, after this upgrade started carrying >PHPSESSID through HREF. > >What should look for to bring the sessions using Cookies? > >from PHP-INI: > >NOTE : this was untouched. > > >================================================ >[Session] >session.save_handler = files ; handler used to store/retrieve data >session.save_path = /tmp ; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored >session.use_cookies = 1 ; whether to use cookies >session.name = PHPSESSID ; name of the session > ; is used as cookie name >session.auto_start = 0 ; initialize session on request startup >session.cookie_lifetime = 0 ; lifetime in seconds of cookie > ; or if 0, until browser is restarted >session.cookie_path = / ; the path the cookie is valid for >session.cookie_domain = ; the domain the cookie is valid for >session.serialize_handler = php ; handler used to serialize data > ; php is the standard serializer of PHP >session.gc_probability = 1 ; percentual probability that the > ; 'garbage collection' process is >started > ; on every session initialization >session.gc_maxlifetime = 1440 ; after this number of seconds, stored > ; data will be seen as 'garbage' and > ; cleaned up by the gc process >session.referer_check = ; check HTTP Referer to invalidate > ; externally stored URLs containing ids >session.entropy_length = 0 ; how many bytes to read from the file >session.entropy_file = ; specified here to create the session >id >; session.entropy_length = 16 >; session.entropy_file = /dev/urandom >session.cache_limiter = nocache ; set to {nocache,private,public} to > ; determine HTTP caching aspects >session.cache_expire = 180 ; document expires after n minutes >session.use_trans_sid = 1 ; use transient sid support if enabled > ; by compiling with --enable-trans-sid >================================================= > > >Has upgrade of apache (modules, etc) anything to do with it? > >I can't really give you any more details since my co-coworker is unreachable >right now, and this is kinda urgent. > >Cheers, >Max. > > > >Maxim Maletsky - maximj-door.com <mailto:maximj-door.com> >Webmaster, J-Door.com / Jpan Inc. >LINC Media, Inc. >TEL: 03-3499-2175 x 1271 >FAX: 03-3499-3109 > >http://www.j-door.com <http://www.j-door.com/> >http://www.japaninc.net <http://www.japaninc.net/> >http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/> > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    Where can I get a php_pdf.so file for trying the dl-function on our server?

    I locally use a Win-System and therfore only have a php_pdf.dll!

    --
    Jochen Kaechelin - Ihr WEBberater
    Stuttgarter Str.3, D-73033 Goeppingen
    Tel. 07161-92 95 94, Fax 07161-92 95 98
    http://www.wa-p.de, mailto:jkwa-p.de 
    

    attached mail follows:


    Hi I don't think gd uses freetype by default .. seem to remember having to edit the makefile Tom

    At 12:12 PM 5/04/01 +0100, Alex Bloor wrote: >Hi, > >Firstly, thanks for reading this message. > >Has anyone managed to compile and use : > >Apache latest + PHP latest + GD latest + Freetype latest + Jpeg latest >= Apache 1.3.19 + PHP 4.0.4pl1 + GD 1.8.4 + Freetype 2.0.1 + Jpeg 6b > >I can get it to compile OK with GD but there seem to be problems with >Freetype (i.e. >everything I try results in a non-working ImageTtfBBox function). I've >followed as many >guides to getting it working as I can find, but they mostly refer to older >versions.. > >I'm pretty sure this is something reasonably obvious but there doesn't >seem to be a one-stop >guide to getting it all installed *anywhere* (links would be cool though >if anyone has them).. > >My PHP compile line is : > >./configure --with-apache=../apache_1.3.19 -- >with-mysql --with-gd --with-ttf=/usr/local/include/freetype2 >--with-jpeg-dir=/u >sr/local --enable-freetype-4bit-antialias-hack --enable-gd-imgstrttf > >these look relevant : > >checking whether to enable truetype string function in gd... no >checking for libjpeg (needed by gd-1.8+)... yes >checking for jpeg_read_header in -ljpeg... (cached) yes >checking for libXpm (needed by gd-1.8+)... no >configure: warning: If configure fails try --with-xpm-dir=<DIR> >checking whether to include GD support... yes (static) >checking for gdImageString16 in -lgd... (cached) yes >checking for gdImagePaletteCopy in -lgd... (cached) yes >checking for gdImageColorClosestHWB in -lgd... (cached) yes >checking for compress in -lz... (cached) yes >checking for png_info_init in -lpng... (cached) yes >checking for gdImageColorResolve in -lgd... (cached) yes >checking for gdImageCreateFromPng in -lgd... (cached) yes >checking for gdImageCreateFromGif in -lgd... (cached) no >checking for gdImageWBMP in -lgd... (cached) yes >checking for gdImageCreateFromJpeg in -lgd... (cached) no >checking for gdImageCreateFromXpm in -lgd... (cached) yes >checking whether to include FreeType 1.x support... no >checking for T1lib support... no >checking whether to include GNU gettext support... no > > checking whether to enable truetype string function in gd... no >checking for libjpeg (needed by gd-1.8+)... yes >checking for jpeg_read_header in -ljpeg... (cached) yes >checking for libXpm (needed by gd-1.8+)... no >configure: warning: If configure fails try --with-xpm-dir=<DIR> >checking whether to include GD support... yes (static) >checking for gdImageString16 in -lgd... (cached) yes >checking for gdImagePaletteCopy in -lgd... (cached) yes >checking for gdImageColorClosestHWB in -lgd... (cached) yes >checking for compress in -lz... (cached) yes >checking for png_info_init in -lpng... (cached) yes >checking for gdImageColorResolve in -lgd... (cached) yes >checking for gdImageCreateFromPng in -lgd... (cached) yes >checking for gdImageCreateFromGif in -lgd... (cached) no >checking for gdImageWBMP in -lgd... (cached) yes >checking for gdImageCreateFromJpeg in -lgd... (cached) no >checking for gdImageCreateFromXpm in -lgd... (cached) yes >checking whether to include FreeType 1.x support... no >checking for T1lib support... no >checking whether to include GNU gettext support... no > >I *think* it is probably something to do with GD not being compiled >properly, but this (I am >guessing) is to do with it being freetype 2.0.1 as opposed to 1.x .. > >Any light anyone can shed would be great. > >Many thanks > >Alex > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    It doesn't, but you don't need Freetype support in GD in order to get GD+Freetype support. PHP takes a vanilla GD library and adds Freetype support itself (assuming you have the Freetype lib, of course).

    -Rasmus

    On Mon, 9 Apr 2001, trogers wrote:

    > Hi > I don't think gd uses freetype by default .. seem to remember having to > edit the makefile > Tom > > > At 12:12 PM 5/04/01 +0100, Alex Bloor wrote: > >Hi, > > > >Firstly, thanks for reading this message. > > > >Has anyone managed to compile and use : > > > >Apache latest + PHP latest + GD latest + Freetype latest + Jpeg latest > >= Apache 1.3.19 + PHP 4.0.4pl1 + GD 1.8.4 + Freetype 2.0.1 + Jpeg 6b > > > >I can get it to compile OK with GD but there seem to be problems with > >Freetype (i.e. > >everything I try results in a non-working ImageTtfBBox function). I've > >followed as many > >guides to getting it working as I can find, but they mostly refer to older > >versions.. > > > >I'm pretty sure this is something reasonably obvious but there doesn't > >seem to be a one-stop > >guide to getting it all installed *anywhere* (links would be cool though > >if anyone has them).. > > > >My PHP compile line is : > > > >./configure --with-apache=../apache_1.3.19 -- > >with-mysql --with-gd --with-ttf=/usr/local/include/freetype2 > >--with-jpeg-dir=/u > >sr/local --enable-freetype-4bit-antialias-hack --enable-gd-imgstrttf > > > >these look relevant : > > > >checking whether to enable truetype string function in gd... no > >checking for libjpeg (needed by gd-1.8+)... yes > >checking for jpeg_read_header in -ljpeg... (cached) yes > >checking for libXpm (needed by gd-1.8+)... no > >configure: warning: If configure fails try --with-xpm-dir=<DIR> > >checking whether to include GD support... yes (static) > >checking for gdImageString16 in -lgd... (cached) yes > >checking for gdImagePaletteCopy in -lgd... (cached) yes > >checking for gdImageColorClosestHWB in -lgd... (cached) yes > >checking for compress in -lz... (cached) yes > >checking for png_info_init in -lpng... (cached) yes > >checking for gdImageColorResolve in -lgd... (cached) yes > >checking for gdImageCreateFromPng in -lgd... (cached) yes > >checking for gdImageCreateFromGif in -lgd... (cached) no > >checking for gdImageWBMP in -lgd... (cached) yes > >checking for gdImageCreateFromJpeg in -lgd... (cached) no > >checking for gdImageCreateFromXpm in -lgd... (cached) yes > >checking whether to include FreeType 1.x support... no > >checking for T1lib support... no > >checking whether to include GNU gettext support... no > > > > checking whether to enable truetype string function in gd... no > >checking for libjpeg (needed by gd-1.8+)... yes > >checking for jpeg_read_header in -ljpeg... (cached) yes > >checking for libXpm (needed by gd-1.8+)... no > >configure: warning: If configure fails try --with-xpm-dir=<DIR> > >checking whether to include GD support... yes (static) > >checking for gdImageString16 in -lgd... (cached) yes > >checking for gdImagePaletteCopy in -lgd... (cached) yes > >checking for gdImageColorClosestHWB in -lgd... (cached) yes > >checking for compress in -lz... (cached) yes > >checking for png_info_init in -lpng... (cached) yes > >checking for gdImageColorResolve in -lgd... (cached) yes > >checking for gdImageCreateFromPng in -lgd... (cached) yes > >checking for gdImageCreateFromGif in -lgd... (cached) no > >checking for gdImageWBMP in -lgd... (cached) yes > >checking for gdImageCreateFromJpeg in -lgd... (cached) no > >checking for gdImageCreateFromXpm in -lgd... (cached) yes > >checking whether to include FreeType 1.x support... no > >checking for T1lib support... no > >checking whether to include GNU gettext support... no > > > >I *think* it is probably something to do with GD not being compiled > >properly, but this (I am > >guessing) is to do with it being freetype 2.0.1 as opposed to 1.x .. > > > >Any light anyone can shed would be great. > > > >Many thanks > > > >Alex > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >For additional commands, e-mail: php-general-helplists.php.net > >To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    There is compile instruction at www.php4win.de I think you need CygWin and VC to compile windows version of PHP.

    You may get better answer on php-windows list.

    Regards,

    --
    Yasuo Ohgaki
    

    ""Plutarck"" <aemulispamclause-yahoo.com> wrote in message news:9aor0h$uo0$1toye.p.sourceforge.net... > I'm trying to compile PHP version 4.0.4pl1 (module and/or cgi) on my windows > 98 system using Microsoft Visuall C++, and I have two "little" problems. > > For one thing, doing anything like this in my DOS prompt: > > ./configure > ./configure --with-mysql > configure > /configure > > et al > > ...returns: > Bad command or file name. > > I've heard that means that "Dev Tools" aren't on my system, which is why > "make" or "make install" didn't do anything. But I installed cygwin > utilities and UnxUtils. I also have Active Perl installed on my system. > > So what do I need to do to get such commands to do what they are supposed > to? > > > And I'm not sure if this is related, but when I try to compile the source > code as an apache module I get: > > fatal error C1083: Cannot open source file: > 'C:\php-4.0.4pl1\Zend\zend_language_scanner.cpp': No such file or directory > > > Seing as how there are no .cpp files in the source code from php.net, I > imagine it would be hard to find that file ;) > > I'm using this article for instruction: > http://www.mm4.de/php4win/article.php3?id=2&language=en > > > -- > Plutarck > Should be working on something... > ...but forgot what it was. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    anyone have sample code of how you can have a php script (cgi) ask for input from the shell?

    <-----CoreComm-Internet-Services---http://core.com-----> (Jon Marshall CoreComm Services Chicago) (jonathon.marshallcore.com Systems Engineer II) (enthalpycore.com Network Operations) <-----Enthalpy.org-------------http://enthalpy.org-----> (enthalpyenthalpy.org The World of Nothing) <------------------------------------------------------>

    attached mail follows:


    $fp = fopen("php://stdin", "r"); echo fgets($fp, 64); fclose($fp);

    ----- Original Message ----- From: "enthalpy" <enthalpycore.com> To: <php-generallists.php.net> Sent: Monday, April 09, 2001 1:10 PM Subject: [PHP] Asking for input from shell?

    > > anyone have sample code of how you can have a php script (cgi) > ask for input from the shell? > > <-----CoreComm-Internet-Services---http://core.com-----> > (Jon Marshall CoreComm Services Chicago) > (jonathon.marshallcore.com Systems Engineer II) > (enthalpycore.com Network Operations) > <-----Enthalpy.org-------------http://enthalpy.org-----> > (enthalpyenthalpy.org The World of Nothing) > <------------------------------------------------------> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Thank you.

    <-----CoreComm-Internet-Services---http://core.com-----> (Jon Marshall CoreComm Services Chicago) (jonathon.marshallcore.com Systems Engineer II) (enthalpycore.com Network Operations) <-----Enthalpy.org-------------http://enthalpy.org-----> (enthalpyenthalpy.org The World of Nothing) <------------------------------------------------------>

    On Mon, 9 Apr 2001, Jason Brooke wrote:

    > $fp = fopen("php://stdin", "r"); > echo fgets($fp, 64); > fclose($fp); > > ----- Original Message ----- > From: "enthalpy" <enthalpycore.com> > To: <php-generallists.php.net> > Sent: Monday, April 09, 2001 1:10 PM > Subject: [PHP] Asking for input from shell? > > > > > > anyone have sample code of how you can have a php script (cgi) > > ask for input from the shell? > > > > <-----CoreComm-Internet-Services---http://core.com-----> > > (Jon Marshall CoreComm Services Chicago) > > (jonathon.marshallcore.com Systems Engineer II) > > (enthalpycore.com Network Operations) > > <-----Enthalpy.org-------------http://enthalpy.org-----> > > (enthalpyenthalpy.org The World of Nothing) > > <------------------------------------------------------> > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > >

    attached mail follows:


    when using this more then once in a script i get errors even though the file pointers are different.

    echo "Artist: "; $artist = fopen("php://stdin", "r"); echo fgets($artist, 64); fclose($artist); echo "\n";

    echo "Album: "; $album = fopen("php://stdin", "r"); echo fgets($album, 64); fclose($album); echo "\n";

    --------------------------- Errors:

    <b>Warning</b>: fopen("php://stdin","r") - Bad file descriptor in <b>./addvinyl.php</b> on line <b>11</b><br> <br> <b>Warning</b>: Supplied argument is not a valid File-Handle resource in <b>./addvinyl.php</b> on line <b>12</b><br> <br> <b>Warning</b>: Supplied argument is not a valid File-Handle resource in <b>./addvinyl.php</b> on line <b>13</b><br>

    <-----CoreComm-Internet-Services---http://core.com-----> (Jon Marshall CoreComm Services Chicago) (jonathon.marshallcore.com Systems Engineer II) (enthalpycore.com Network Operations) <-----Enthalpy.org-------------http://enthalpy.org-----> (enthalpyenthalpy.org The World of Nothing) <------------------------------------------------------>

    On Mon, 9 Apr 2001, Jason Brooke wrote:

    > $fp = fopen("php://stdin", "r"); > echo fgets($fp, 64); > fclose($fp); > > ----- Original Message ----- > From: "enthalpy" <enthalpycore.com> > To: <php-generallists.php.net> > Sent: Monday, April 09, 2001 1:10 PM > Subject: [PHP] Asking for input from shell? > > > > > > anyone have sample code of how you can have a php script (cgi) > > ask for input from the shell? > > > > <-----CoreComm-Internet-Services---http://core.com-----> > > (Jon Marshall CoreComm Services Chicago) > > (jonathon.marshallcore.com Systems Engineer II) > > (enthalpycore.com Network Operations) > > <-----Enthalpy.org-------------http://enthalpy.org-----> > > (enthalpyenthalpy.org The World of Nothing) > > <------------------------------------------------------> > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Try this instead :

    #! /local/bin/php -q <?PHP // -*- C++ -*-

    function read() { $fp=fopen( "/dev/stdin", "r"); $input=fgets($fp, 255); fclose($fp); return eregi_replace("\n","",$input); }

    function clear(){ system("/bin/clear",$retvar); if ( $retvar != 0 ) { print "error\n"; exit; } return 0; } // endfunction

    print "How old are you ? : "; $age = read(); print "\nWhat\'s your name ? :"; $name = read();

    print "You are $name and are $age old\n";

    ?>

    On Mon, 9 Apr 2001, enthalpy wrote:

    > when using this more then once in a script i get errors > even though the file pointers are different. > > echo "Artist: "; > $artist = fopen("php://stdin", "r"); > echo fgets($artist, 64); > fclose($artist); > echo "\n"; > > echo "Album: "; > $album = fopen("php://stdin", "r"); > echo fgets($album, 64); > fclose($album); > echo "\n"; > > --------------------------- > Errors: > > <b>Warning</b>: fopen("php://stdin","r") - Bad file descriptor in <b>./addvinyl.php</b> on line <b>11</b><br> > <br> > <b>Warning</b>: Supplied argument is not a valid File-Handle resource in <b>./addvinyl.php</b> on line <b>12</b><br> > <br> > <b>Warning</b>: Supplied argument is not a valid File-Handle resource in <b>./addvinyl.php</b> on line <b>13</b><br> > > > > > <-----CoreComm-Internet-Services---http://core.com-----> > (Jon Marshall CoreComm Services Chicago) > (jonathon.marshallcore.com Systems Engineer II) > (enthalpycore.com Network Operations) > <-----Enthalpy.org-------------http://enthalpy.org-----> > (enthalpyenthalpy.org The World of Nothing) > <------------------------------------------------------> > > On Mon, 9 Apr 2001, Jason Brooke wrote: > > > $fp = fopen("php://stdin", "r"); > > echo fgets($fp, 64); > > fclose($fp); > > > > ----- Original Message ----- > > From: "enthalpy" <enthalpycore.com> > > To: <php-generallists.php.net> > > Sent: Monday, April 09, 2001 1:10 PM > > Subject: [PHP] Asking for input from shell? > > > > > > > > > > anyone have sample code of how you can have a php script (cgi) > > > ask for input from the shell? > > > > > > <-----CoreComm-Internet-Services---http://core.com-----> > > > (Jon Marshall CoreComm Services Chicago) > > > (jonathon.marshallcore.com Systems Engineer II) > > > (enthalpycore.com Network Operations) > > > <-----Enthalpy.org-------------http://enthalpy.org-----> > > > (enthalpyenthalpy.org The World of Nothing) > > > <------------------------------------------------------> > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > >

    -- 
    Knut
    ------
    Knut H. Hassel Nielsen
    Principal Engineer / Avdelingsingeniør
    Norwegian University of Science and Technology / NTNU
    Department of Computer and Information Science / IDI
    N-7491 Trondheim, Norway
    Phone Office / Telefon jobb : (+47) 73 59 18 46
    Fax   Office / Telefax jobb : (+47) 73 59 17 33
    Cell. Phone / Mobiltelefon  :       91 59 86 06
    

    attached mail follows:


    hi, i am having a little problem in using php with double byte character.

    a user enters double byte character in some html form.. this user data is converted into a gif image. and later stored in a mysql/pgsql database...

    i have no clue how go about doing this .. can someone please please please help me .. i am stuck..

    _____________________________________________________ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com

    attached mail follows:


    Can you send some code?

    -----Original Message----- From: Subhrajyoti Moitra [mailto:subhro666rediffmail.com] Sent: Sunday, April 08, 2001 8:41 PM To: php-generallists.php.net Cc: php-i18nlists.php.net Subject: [PHP] double byte problem

    hi, i am having a little problem in using php with double byte character.

    a user enters double byte character in some html form.. this user data is converted into a gif image. and later stored in a mysql/pgsql database...

    i have no clue how go about doing this .. can someone please please please help me .. i am stuck..

    _____________________________________________________ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    I'm using php 4.0.4pl1on a FreeBSD system. When I use a php date/time function, it reports the time in GMT, however, I have the date on my FreeBSD system set to EDT. I can't figure out what the problem is here. The only thing I can think of is that when I compiled php, my system timezone was set to GMT and perhaps the local timezone is hardcoded into php. That doesn't make much sense though. I have changed my timezone to EDT since I compiled php. Any suggestions? Thanks.

    attached mail follows:


    It may also be relevant that the "T" format string for the date() function also reports GMT, even though I've set my system timezone to EDT. The command "date" in FreeBSD also reports the time in EDT.

    -----Original Message----- From: Duke <kidlinuxrocketbox.dhs.org> To: php-generallists.php.net <php-generallists.php.net> Date: April 9, 2001 12:00 AM Subject: [PHP] date/time in wrong zone

    >I'm using php 4.0.4pl1on a FreeBSD system. >When I use a php date/time function, it reports the time in GMT, however, I >have the date on my FreeBSD system set to EDT. >I can't figure out what the problem is here. The only thing I can think of >is that when I compiled php, my system timezone was set to GMT and perhaps >the local timezone is hardcoded into php. That doesn't make much sense >though. I have changed my timezone to EDT since I compiled php. >Any suggestions? >Thanks. > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Hi I have a feild in a MySql database called features. It is delimited by | the line above the \ key. Anyway, the feild has things like PS|PW|AC etc in it. I have the code below to explode that feild. It all works fine, but when it comes to looping the code below it always misses that last value. (Example - AC) Only in the IF statement - if i echo the variable "$feature" out of the IF statment it prints the text fine. But i need it to check for the existance of a gif first to display in the window. As you will see I have gifs with the names and the variable $feature ends with .gif It works great, but it misses the last value to the array $feature. Any ideas.

    $specs = $myrow[features];

    $features = explode('|',$specs); //What the feild is delimited by '|' reset ($features);

    while (list(, $feature) = each ($features)) {

    if (file_exists("features/$feature.gif")){ echo "<img src=\"features/$feature.gif\"><br>"; echo "$feature"; }

    } //End While

    --
    Regards,
    

    YoBro ------------------------------------------------------------- DO NOT REPLY TO THIS VIA EMAIL PLEASE USE THE NEWSGROUP All emails sent to this address are automatically deleted. This is to avoid SPAM! -------------------------------------------------------------

    attached mail follows:


    On Mon, 9 Apr 2001 13:56, you wrote: > Hi I have a feild in a MySql database called features. It is delimited > by | the line above the \ key. > Anyway, the feild has things like PS|PW|AC etc in it. > I have the code below to explode that feild. It all works fine, but > when it comes to looping the code below it always misses that last > value. (Example - AC) > Only in the IF statement - if i echo the variable "$feature" out of the > IF statment it prints the text fine. But i need it to check for the > existance of a gif first to display in the window. > As you will see I have gifs with the names and the variable $feature > ends with .gif > It works great, but it misses the last value to the array $feature. > Any ideas. > > $specs = $myrow[features]; > > $features = explode('|',$specs); //What the feild is delimited by > '|' reset ($features); > > while (list(, $feature) = each ($features)) { > > if (file_exists("features/$feature.gif")){ > echo "<img src=\"features/$feature.gif\"><br>"; > echo "$feature"; > } > > } //End While > > > -- > Regards, > > > YoBro

    This seems to work OK for me: <?php $specs = "PS|PW|AC"; $features = explode('|',$specs); //What the feild is delimited by '|' reset ($features);

    while (list(, $feature) = each ($features)) {

    if (!file_exists("features/$feature.gif")){ echo "<img src=\"features/$feature.gif\">"; echo "$feature<br>\n"; }

    } //End While ?>

    Is it possible that you don't hve a matching image for the last item?

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    I do have a matching image, and all cases it does work with different records from the database. IE Where there might be an array of 15 items, but it is always the last one that doesn't show. Even if the image is there, because it gets used if i add another value to the array. IE PS|PW|AC|CD

    In this case all but CD would be displayed. Still no luck.

    I noticed your code used if (!file_exists Where as I want to check if it does exist. Is your way worth a try?

    YoBro

    "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message news:01040914213301.26561www... : On Mon, 9 Apr 2001 13:56, you wrote: : > Hi I have a feild in a MySql database called features. It is delimited : > by | the line above the \ key. : > Anyway, the feild has things like PS|PW|AC etc in it. : > I have the code below to explode that feild. It all works fine, but : > when it comes to looping the code below it always misses that last : > value. (Example - AC) : > Only in the IF statement - if i echo the variable "$feature" out of the : > IF statment it prints the text fine. But i need it to check for the : > existance of a gif first to display in the window. : > As you will see I have gifs with the names and the variable $feature : > ends with .gif : > It works great, but it misses the last value to the array $feature. : > Any ideas. : > : > $specs = $myrow[features]; : > : > $features = explode('|',$specs); //What the feild is delimited by : > '|' reset ($features); : > : > while (list(, $feature) = each ($features)) { : > : > if (file_exists("features/$feature.gif")){ : > echo "<img src=\"features/$feature.gif\"><br>"; : > echo "$feature"; : > } : > : > } //End While : > : > : > -- : > Regards, : > : > : > YoBro : : This seems to work OK for me: : <?php : $specs = "PS|PW|AC"; : $features = explode('|',$specs); //What the feild is delimited by '|' : reset ($features); : : while (list(, $feature) = each ($features)) { : : if (!file_exists("features/$feature.gif")){ : echo "<img src=\"features/$feature.gif\">"; : echo "$feature<br>\n"; : } : : } //End While : ?> : : Is it possible that you don't hve a matching image for the last item? : : -- : David Robley | WEBMASTER & Mail List Admin : RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ : AusEinet | http://auseinet.flinders.edu.au/ : Flinders University, ADELAIDE, SOUTH AUSTRALIA : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, e-mail: php-general-unsubscribelists.php.net : For additional commands, e-mail: php-general-helplists.php.net : To contact the list administrators, e-mail: php-list-adminlists.php.net :

    attached mail follows:


    On Mon, 9 Apr 2001 14:27, Yo Bro wrote: > I do have a matching image, and all cases it does work with different > records from the database. IE Where there might be an array of 15 > items, but it is always the last one that doesn't show. Even if the > image is there, because it gets used if i add another value to the > array. IE > PS|PW|AC|CD > > In this case all but CD would be displayed. > Still no luck. > > I noticed your code used if (!file_exists > Where as I want to check if it does exist. Is your way worth a try?

    Had to do that because, of course, I don't have the image files :-) You could try it....

    > > "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message > news:01040914213301.26561www... > > : On Mon, 9 Apr 2001 13:56, you wrote: > : > Hi I have a feild in a MySql database called features. It is > : > delimited by | the line above the \ key. > : > Anyway, the feild has things like PS|PW|AC etc in it. > : > I have the code below to explode that feild. It all works fine, but > : > when it comes to looping the code below it always misses that last > : > value. (Example - AC) > : > Only in the IF statement - if i echo the variable "$feature" out of > : > the IF statment it prints the text fine. But i need it to check for > : > the existance of a gif first to display in the window. > : > As you will see I have gifs with the names and the variable > : > $feature ends with .gif > : > It works great, but it misses the last value to the array $feature. > : > Any ideas. > : > > : > $specs = $myrow[features]; > : > > : > $features = explode('|',$specs); //What the feild is delimited > : > by '|' reset ($features); > : > > : > while (list(, $feature) = each ($features)) { > : > > : > if (file_exists("features/$feature.gif")){ > : > echo "<img src=\"features/$feature.gif\"><br>"; > : > echo "$feature"; > : > } > : > > : > } //End While > : > > : > > : > -- > : > Regards, > : > > : > > : > YoBro > : > : This seems to work OK for me: > : <?php > : $specs = "PS|PW|AC"; > : $features = explode('|',$specs); //What the feild is delimited by '|' > : reset ($features); > : > : while (list(, $feature) = each ($features)) { > : > : if (!file_exists("features/$feature.gif")){ > : echo "<img src=\"features/$feature.gif\">"; > : echo "$feature<br>\n"; > : } > : > : } //End While > : ?> > : > : Is it possible that you don't hve a matching image for the last item?

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    Still no luck. There should be no reason why this doesn't work. I tried it the way you tested it, and it doesn't really demonstrate it the same as if using the (file_exists command.

    When using looking for the images it appears the if statement is interferring with the loop. This is a nightmare. Freddy would love this.

    YoBro

    "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message news:01040914425602.26561www... : On Mon, 9 Apr 2001 14:27, Yo Bro wrote: : > I do have a matching image, and all cases it does work with different : > records from the database. IE Where there might be an array of 15 : > items, but it is always the last one that doesn't show. Even if the : > image is there, because it gets used if i add another value to the : > array. IE : > PS|PW|AC|CD : > : > In this case all but CD would be displayed. : > Still no luck. : > : > I noticed your code used if (!file_exists : > Where as I want to check if it does exist. Is your way worth a try? : : Had to do that because, of course, I don't have the image files :-) You : could try it.... : : > : > "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message : > news:01040914213301.26561www... : > : > : On Mon, 9 Apr 2001 13:56, you wrote: : > : > Hi I have a feild in a MySql database called features. It is : > : > delimited by | the line above the \ key. : > : > Anyway, the feild has things like PS|PW|AC etc in it. : > : > I have the code below to explode that feild. It all works fine, but : > : > when it comes to looping the code below it always misses that last : > : > value. (Example - AC) : > : > Only in the IF statement - if i echo the variable "$feature" out of : > : > the IF statment it prints the text fine. But i need it to check for : > : > the existance of a gif first to display in the window. : > : > As you will see I have gifs with the names and the variable : > : > $feature ends with .gif : > : > It works great, but it misses the last value to the array $feature. : > : > Any ideas. : > : > : > : > $specs = $myrow[features]; : > : > : > : > $features = explode('|',$specs); //What the feild is delimited : > : > by '|' reset ($features); : > : > : > : > while (list(, $feature) = each ($features)) { : > : > : > : > if (file_exists("features/$feature.gif")){ : > : > echo "<img src=\"features/$feature.gif\"><br>"; : > : > echo "$feature"; : > : > } : > : > : > : > } //End While : > : > : > : > : > : > -- : > : > Regards, : > : > : > : > : > : > YoBro : > : : > : This seems to work OK for me: : > : <?php : > : $specs = "PS|PW|AC"; : > : $features = explode('|',$specs); //What the feild is delimited by '|' : > : reset ($features); : > : : > : while (list(, $feature) = each ($features)) { : > : : > : if (!file_exists("features/$feature.gif")){ : > : echo "<img src=\"features/$feature.gif\">"; : > : echo "$feature<br>\n"; : > : } : > : : > : } //End While : > : ?> : > : : > : Is it possible that you don't hve a matching image for the last item? : : -- : David Robley | WEBMASTER & Mail List Admin : RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ : AusEinet | http://auseinet.flinders.edu.au/ : Flinders University, ADELAIDE, SOUTH AUSTRALIA : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, e-mail: php-general-unsubscribelists.php.net : For additional commands, e-mail: php-general-helplists.php.net : To contact the list administrators, e-mail: php-list-adminlists.php.net :

    attached mail follows:


    On Mon, 9 Apr 2001 15:12, Yo Bro wrote: > Still no luck. > There should be no reason why this doesn't work. I tried it the way you > tested it, and it doesn't really demonstrate it the same as if using > the (file_exists command. > > When using looking for the images it appears the if statement is > interferring with the loop. This is a nightmare. Freddy would love > this. > > YoBro

    Hrm; is it then possible that the problem is not within _this_ loop, but perhaps the loop wherein you get the stuff from the DB. Perhaps if you could share the [full/more of the] script??

    > > "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message > news:01040914425602.26561www... > > : On Mon, 9 Apr 2001 14:27, Yo Bro wrote: > : > I do have a matching image, and all cases it does work with > : > different records from the database. IE Where there might be an > : > array of 15 items, but it is always the last one that doesn't show. > : > Even if the image is there, because it gets used if i add another > : > value to the array. IE > : > PS|PW|AC|CD > : > > : > In this case all but CD would be displayed. > : > Still no luck. > : > > : > I noticed your code used if (!file_exists > : > Where as I want to check if it does exist. Is your way worth a try? > : > : Had to do that because, of course, I don't have the image files :-) > : You could try it.... > : > : > "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message > : > news:01040914213301.26561www... > : > > : > : On Mon, 9 Apr 2001 13:56, you wrote: > : > : > Hi I have a feild in a MySql database called features. It is > : > : > delimited by | the line above the \ key. > : > : > Anyway, the feild has things like PS|PW|AC etc in it. > : > : > I have the code below to explode that feild. It all works fine, > : > : > but when it comes to looping the code below it always misses > : > : > that last value. (Example - AC) > : > : > Only in the IF statement - if i echo the variable "$feature" > : > : > out of the IF statment it prints the text fine. But i need it > : > : > to check for the existance of a gif first to display in the > : > : > window. As you will see I have gifs with the names and the > : > : > variable $feature ends with .gif > : > : > It works great, but it misses the last value to the array > : > : > $feature. Any ideas. > : > : > > : > : > $specs = $myrow[features]; > : > : > > : > : > $features = explode('|',$specs); //What the feild is > : > : > delimited by '|' reset ($features); > : > : > > : > : > while (list(, $feature) = each ($features)) { > : > : > > : > : > if (file_exists("features/$feature.gif")){ > : > : > echo "<img src=\"features/$feature.gif\"><br>"; > : > : > echo "$feature"; > : > : > } > : > : > > : > : > } //End While > : > : > > : > : > > : > : > -- > : > : > Regards, > : > : > > : > : > > : > : > YoBro > : > : > : > : This seems to work OK for me: > : > : <?php > : > : $specs = "PS|PW|AC"; > : > : $features = explode('|',$specs); //What the feild is delimited by > : > : '|' reset ($features); > : > : > : > : while (list(, $feature) = each ($features)) { > : > : > : > : if (!file_exists("features/$feature.gif")){ > : > : echo "<img src=\"features/$feature.gif\">"; > : > : echo "$feature<br>\n"; > : > : } > : > : > : > : } //End While > : > : ?> > : > : > : > : Is it possible that you don't hve a matching image for the last > : > : item? > : > : -- > : David Robley | WEBMASTER & Mail List Admin > : RESEARCH CENTRE FOR INJURY STUDIES | > : http://www.nisu.flinders.edu.au/ AusEinet > : | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, > : SOUTH AUSTRALIA > : > : -- > : PHP General Mailing List (http://www.php.net/) > : To unsubscribe, e-mail: php-general-unsubscribelists.php.net > : For additional commands, e-mail: php-general-helplists.php.net > : To contact the list administrators, e-mail: > : php-list-adminlists.php.net

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    What does this do?

    > $specs = $myrow['features'];

    print $specs;

    > $features = explode('|',$specs); //What the feild is delimited by '|'

    print_r($features);

    Does it include the missing last value within the $features array? Does $specs look okay?

    Regards, Philip

    attached mail follows:


    > -----Original Message----- > From: Nathan Roberts [mailto:Nathanfpandts.com] > Sent: Sunday, April 08, 2001 5:12 PM > To: php-generallists.php.net > Subject: [PHP] Inputing data to a relational database > > > I am a nebie to Mysql/php and am currently working on an urgent project, a > on-line catalogue. I have been using phpmyadmin, to create the tables in > MySQL. However I now want to add data into the tables. I am reluctant to > program a php page to do this, as I do not (yet) have sufficient php > knowledge. As far as I can see phpMyadmin doesn't do all I need > it to, which > is:- > > The tables reference each other, for example > > The categories are stored in a categories table > The products table includes a field category > > to ensure referential integrity, when adding a product to the products > table, I want to have a combo box that will let me select one of the > categories from the categories table. > > Is there anything like phpmyadmin that will let me do this > without me having > to write code. > > Any advice much appreciated > > Nathan Roberts

    Yes, getting someone who knows how to do it write the code for you.

    Other than that, you gotta write the code.

    Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn.

    attached mail follows:


    Greets:

    I have a bit of php code that looks for a matching user/pass in a mysql table. There are three user/pass phrases in the table along with a an email that corresponds to each user/pass pair. Is there any way to construct a query that will do both the matching of the user/passes and also then give the corresponding email that matches the user/pass?

    table roughly looks like this: username pass email user_name2 pass2 email2 .... select * from customer where user_name='$username' && pass='$password' || user_name2='$username' && pass2='$pass'";

    so if it matches on user_name2/pass2 I would then want to get email2.......

    Thanks for any help!

    ccma

    attached mail follows:


    Hello Lindsay,

    On 08-Apr-01 20:02:57, you wrote:

    >No, I use my manual lists without a problem. >If I ever have to install on a system that does not allow normal use of an >alias table by a normal user, then I might try something else.

    >But under my resellers account on AIT, I get to do whatever I want with >aliases, and the lists work find =)

    >I would not be able to install qmail on my ISP, so that is not an option >either.

    >So, my solution works great for me, I have my own administrative routines in >PHP for adding aliases, writing lists, and storing the master data in mysql >databases. It all works cleanly without a hitch.

    >If it ain't broke, don't fix it ;)

    Maybe you don't use much mailing lists or else you would appreciate qmail/ezmlm ability to handle bounces.

    I developed the PHP Classes site. Everytime a new class is added or update by its author, a notification message is mailed to may thosands of interested users. If it was not for qmail VERP extension, it would be a nightmare to figure who is bouncing the messages and eventually unsubscribe their addresses.

    If would be dealing with very large mailing list traffic, you would probably appreciate qmail ability to handle mailing queue in a dedicated server process without choking your other SMTP traffic.

    It's not like sendmail is a bad solution. It's more like qmail is more appropriate for growing mailing lists. That seems to be why eGroups is using qmail/ezmlm.

    Regards, Manuel Lemos

    Web Programming Components using PHP Classes. Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemosacm.org

    --
    E-mail: mlemosacm.org
    URL: http://www.mlemos.e-na.net/
    PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
    --
    

    attached mail follows:


    Hello Mike,

    On 08-Apr-01 21:08:17, you wrote:

    >I can change the column sof a table with the following code but how do I >change the row colors instead.With the columns I have "i" to manipulate but >not with rows.

    >while ($row = mysql_fetch_row($result)) >{{ > echo "<TR>\n"; > for ($i =1;$i<mysql_num_fields($result);$i++) > {$cell_color = "#C0C0C0"; > $i % 2 ? 0: $cell_color = "#CCCCCC"; > echo "<td bgcolor=\"$cell_color\">$row[$i]</td>";

    What you need to do is very simple. Just echo the <TR> inside your for loop and make it BGCOLOR attribute change according to the row number.

    While you are at it, maybe you would like to try this PHP table listing class that not only lets you iterate and change colors for each row but it also lets you change the highlighting color that the row will have when the mouse is over them.

    http://phpclasses.UpperDesign.com/browse.html/package/120

    For display database query results, you may want to try this PHP class based on the previous that is also able to display links to go between any pages that the results may be split.

    http://phpclasses.UpperDesign.com/browse.html/package/130

    Regards, Manuel Lemos

    Web Programming Components using PHP Classes. Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemosacm.org

    --
    E-mail: mlemosacm.org
    URL: http://www.mlemos.e-na.net/
    PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
    --
    

    attached mail follows:


    Hi,

    Just make the modification listed below:

    while ($row = mysql_fetch_row($result)) { $cell_color = ++$i % 2 ? "#C0C0C0" : "#CCCCCC"; echo "<TR bgcolor=\"$cell_color\">\n"; for ($i =1;$i<mysql_num_fields($result);$i++) { echo "<td>$row[$i]</td>"; } }

    Mike P wrote:

    > I can change the column sof a table with the following code but how do I > change the row colors instead.With the columns I have "i" to manipulate but > not with rows. > > while ($row = mysql_fetch_row($result)) > {{ > echo "<TR>\n"; > for ($i =1;$i<mysql_num_fields($result);$i++) > {$cell_color = "#C0C0C0"; > $i % 2 ? 0: $cell_color = "#CCCCCC"; > echo "<td bgcolor=\"$cell_color\">$row[$i]</td>"; > Thanks > Mike P > mpelosoprinceton.edu > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    --
    Regards,
    Harshdeep Singh Jawanda.
    

    attached mail follows:


    Something like this could work also:

    <tr bgcolor="<? echo $row_color=="#cccccc"?$row_color="#c0c0c0":$row_color="#cccccc" ?>"

    ----- Original Message ----- From: "Harshdeep S Jawanda" <harshpspl.co.in> To: "Mike P" <mpelosoprinceton.edu> Cc: <php-generallists.php.net> Sent: Monday, April 09, 2001 1:11 AM Subject: Re: [PHP] Row colors

    > Hi, > > Just make the modification listed below: > > while ($row = mysql_fetch_row($result)) > { > $cell_color = ++$i % 2 ? "#C0C0C0" : "#CCCCCC"; > echo "<TR bgcolor=\"$cell_color\">\n"; > for ($i =1;$i<mysql_num_fields($result);$i++) { > echo "<td>$row[$i]</td>"; > } > } > > Mike P wrote: > > > I can change the column sof a table with the following code but how do I > > change the row colors instead.With the columns I have "i" to manipulate but > > not with rows. > > > > while ($row = mysql_fetch_row($result)) > > {{ > > echo "<TR>\n"; > > for ($i =1;$i<mysql_num_fields($result);$i++) > > {$cell_color = "#C0C0C0"; > > $i % 2 ? 0: $cell_color = "#CCCCCC"; > > echo "<td bgcolor=\"$cell_color\">$row[$i]</td>"; > > Thanks > > Mike P > > mpelosoprinceton.edu > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > Regards, > Harshdeep Singh Jawanda. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Here, just was working on it:

    <snip> ...

    $bgcolor = (($row_count%2)==0) ? ' bgcolor="#DBDBDB"' : ''; $row_count++;

    echo "<TR$bgcolor>";

    ... </snip>

    Cheers,

    Maxim Maletsky www.PHPBeginner.com

    -----Original Message----- From: Rikul [mailto:rikulshreve.net] Sent: Monday, April 09, 2001 6:30 PM To: Harshdeep S Jawanda; Mike P Cc: php-generallists.php.net Subject: Re: [PHP] Row colors

    Something like this could work also:

    <tr bgcolor="<? echo $row_color=="#cccccc"?$row_color="#c0c0c0":$row_color="#cccccc" ?>"

    ----- Original Message ----- From: "Harshdeep S Jawanda" <harshpspl.co.in> To: "Mike P" <mpelosoprinceton.edu> Cc: <php-generallists.php.net> Sent: Monday, April 09, 2001 1:11 AM Subject: Re: [PHP] Row colors

    > Hi, > > Just make the modification listed below: > > while ($row = mysql_fetch_row($result)) > { > $cell_color = ++$i % 2 ? "#C0C0C0" : "#CCCCCC"; > echo "<TR bgcolor=\"$cell_color\">\n"; > for ($i =1;$i<mysql_num_fields($result);$i++) { > echo "<td>$row[$i]</td>"; > } > } > > Mike P wrote: > > > I can change the column sof a table with the following code but how do I > > change the row colors instead.With the columns I have "i" to manipulate but > > not with rows. > > > > while ($row = mysql_fetch_row($result)) > > {{ > > echo "<TR>\n"; > > for ($i =1;$i<mysql_num_fields($result);$i++) > > {$cell_color = "#C0C0C0"; > > $i % 2 ? 0: $cell_color = "#CCCCCC"; > > echo "<td bgcolor=\"$cell_color\">$row[$i]</td>"; > > Thanks > > Mike P > > mpelosoprinceton.edu > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > Regards, > Harshdeep Singh Jawanda. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    On Mon, Apr 09, 2001 at 12:08:10AM +0000, Mike P wrote: > I can change the column sof a table with the following code but how do I > change the row colors instead.With the columns I have "i" to manipulate but > not with rows. > > while ($row = mysql_fetch_row($result)) > {{ > echo "<TR>\n"; > for ($i =1;$i<mysql_num_fields($result);$i++)

    This works for me. echo "<td ".($i & 1 ? "bgcolor=c0c0c0" : "bgcolor=cccccc").">";

    -- 
    Jason Stechschulte
    jpstechunoh.edu
    --
    Any false value is gonna be fairly boring in Perl, mathematicians
    notwithstanding.
                 -- Larry Wall in <199707300650.XAA05515wall.org>
    

    attached mail follows:


    Hi.

    Please, what is the caracter in this case?

    $var.

    What meens?

    thanks.

    Fer

    attached mail follows:


    Hey,

    the '' is an error control operator. search php manual for this 'Error Control Operators'

    it allows you to trap error and warning messages.

    -elias http://www.kameelah.org/eassoft

    ""Fernando Buitrago"" <buitrago_fernandohotmail.com> wrote in message news:9arl15$8al$1toye.p.sourceforge.net... > Hi. > > Please, what is the caracter in this case? > > $var. > > What meens? > > thanks. > > Fer > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hey,

    simply means to suppress warnings, or errors!

    functioncall(); would simply not display an error or warning, incase it caused one or more.

    ===== To find out more about me : http://www.geocities.com/mimodit My bookmarks are available http://mukul.free.fr

    __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

    attached mail follows:


    Hi Fernando,

    Have a look here :

    http://www.php.net/manual/en/features.error-handling.php http://www.php.net/manual/en/language.operators.errorcontrol.php

    regards, philip

    On Mon, 9 Apr 2001, Fernando Buitrago wrote:

    > Hi. > > Please, what is the caracter in this case? > > $var. > > What meens? > > thanks. > > Fer > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi

    Ive got a textarea control on a form where a user will enter info, i want to enter this info into an interbase db,ive limited the space to 200 characters in the text area but need to now eliminate any apostrophes and other bad characters, anyone have a function?

    TIA

    Wade

    attached mail follows:


    Wade Halsey wrote: > > Hi > > Ive got a textarea control on a form where a user will enter info, i want to enter this info into an interbase db,ive limited the space to 200 characters in the text area but need to now eliminate any apostrophes and other bad characters, anyone have a function? > > TIA > > Wade

    Try:

    ereg_replace(); (http://www.php.net/manual/en/function.eregi-replace.php) or preg_replace(); (http://www.php.net/manual/en/function.preg-replace.php)

    -- 
    

    * R&zE:

    *************************** ** Renze Munnik ** ** E: renzedatalink.nl ** M: +31 6 218 111 43 ***************************

    attached mail follows:


    Hello Wade,

    What's so bad about apostrophes and what are the other "bad characters" you're referring to? Have you seen addslashes(), stripslashes() and magic_quotes_gpc? As well as strip_tags() and htmlentities().

    Regarding replacing characters, have a look at str_replace() as well as regex functions ereg_replace() and preg_replace().

    Regards, Philip

    On Mon, 9 Apr 2001, Wade Halsey wrote:

    > Hi > > Ive got a textarea control on a form where a user will enter info, i > want to enter this info into an interbase db,ive limited the space to > 200 characters in the text area but need to now eliminate any > apostrophes and other bad characters, anyone have a function? > > TIA > > Wade >

    attached mail follows:


    On Monday 09 April 2001 08:38, you wrote: > Hi > > Ive got a textarea control on a form where a user will enter info, i > want to enter this info into an interbase db,ive limited the space to > 200 characters in the text area but need to now eliminate any > apostrophes and other bad characters, anyone have a function?

    addslashes()

    -- 
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match.

    - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.

    attached mail follows:


    > Ive got a textarea control on a form where a user will enter info, i > want to enter this info into an interbase db,ive limited the space to > 200 characters in the text area [snip]

    Also remember that you must never trust what you get from the browser. Make the script check out that the input is less than or equal to 200 before accepting it.

    -agb

    attached mail follows:


    Nice question!

    You can use Eval() as:

    $clsname = "myclass"; eval("\$inst = new $myclass;"); now $inst is an instance of myclass.

    -elias http://www.kameelah.org/eassoft

    "rswfire" <rswfireyahoo.com> wrote in message news:20010407005837.71455.qmailweb10801.mail.yahoo.com... > $var = "thisclass"; > > $myclass = new $var; > > how can i make it recognize $var as a class name? > > thankz in advance... > > ===== > ===================================== > [ rswfire ] > > http://rswfire.swifte.net/ > http://profiles.yahoo.com/rswfire > > ===================================== > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    "David Robley" <huntsmanwww.nisu.flinders.edu.au> wrote in message news:01040614091104.10051www... > On Fri, 6 Apr 2001 13:50, Martin Skjöldebrand wrote: > > Tyler Longren wrote: > > > In line 3, you don't need your <? ?> tags again. > > > This is how you have it: > > > print "<p>TID detail view - Document #<b><?php echo $id; ?></b></p>"; > > > > > > this is how it should be: > > > print "<p>TID detail view - Document #<b>$id</b></p>"; > > > > Ofcourse, I've seen that all the time - and yet ... > > oh well ... a bug in the carbon based part of the system I suppose. > > > > Thanks, > > > > Martin S. > > That's PWCKI or Problem With Chair to Keyboard Interface :-)

    Prefer UserFriendly's 'PEBCAK'. Problem Exists Between Chair and Keyboard

    attached mail follows:


    Hi! I have this xml: <list> <vara>car</vara> <bskr>ford</bskr> <price>3600</price> <nr>8888</nr> </list> --------- and this php: $filename = "list.xml"; $fp = fopen($filename, "r"); $string = fread($fp, filesize($filename)); $string = strip_tags($string); $refined_string = explode(" ", $string); if (in_array($needle." ", $refined_string)) { print "found"; } else { print "notfound"; } fclose ($fp); ------- I always get notfound when I set $needle to a word inside the xml-file. My script doesn´t work. Is it possible also to write a script wich can find the word "ford" if You only ask for "for"? I have just started to learn about php search and I am very thankful for any help.

    Regards Jan

    attached mail follows:


    try learning about: XML parser functions

    -elias http://www.kameelah.org/eassoft

    "Jan Grafström" <janlillemanshus.com> wrote in message news:3AD15D5A.69E5BEE3lillemanshus.com... > Hi! > I have this xml: > <list> > <vara>car</vara> > <bskr>ford</bskr> > <price>3600</price> > <nr>8888</nr> > </list> > --------- > and this php: > $filename = "list.xml"; > $fp = fopen($filename, "r"); > $string = fread($fp, filesize($filename)); > $string = strip_tags($string); > $refined_string = explode(" ", $string); > if (in_array($needle." ", $refined_string)) { > print "found"; > } else { > print "notfound"; > } > fclose ($fp); > ------- > I always get notfound when I set $needle to a word inside the xml-file. > My script doesn´t work. > Is it possible also to write a script wich can find the word "ford" if > You only ask for "for"? > I have just started to learn about php search and I am very thankful for > any help. > > Regards > Jan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    $newloc = "http://www.kameelah.org/eassoft"; Header("Location: $newloc"); die();

    -elias http://www.kameelah.org/eassoft

    ""Fernando Buitrago"" <buitrago_fernandohotmail.com> wrote in message news:9aq0a0$jck$2toye.p.sourceforge.net... > Hi. > > Tell me te instruction to redirect (link) mi pages, please? > > Regards. > > Fer > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    You can use JavaScript to validate the fields in a form too, would be easier. As for PHP it's too easy, you can check fields values against whatever condition. ie: if (length($password) < 3) die("password too short");

    -elias http://www.kameelah.org/eassoft

    ""Fernando Buitrago"" <buitrago_fernandohotmail.com> wrote in message news:9aq09s$jck$1toye.p.sourceforge.net... > Hi. > > Tell me the steps to validate field's forms in the same PHP file, before to > send the result to another file. > > Regards > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    G'day,

    I was wondering if anyone knows how to get the following to work:

    --snip from head-- <script language="JavaScript"> //--> function validateForm(theForm) { if ( theForm.input[name].value == "" ) { alert("You must type a value for NAME."); theForm.input[name].focus(); return false; }

    } <!-- </script>

    --/snip-- --snip from body---

    <form name="form" method="post" action="whatever" onSubmit="return validateForm(this);"> <input type="text" name="input[name]"> <input type="text" name="input[address]"> <input type="submit" value="submit"> </form>

    --/snip--

    Now the above doesn't work as I think javascript does not understand arrays? or I don't understand how javascript deals with arrays??

    Any help/suggestions would be great, sorry if this post is a little off topic in the way of javascript but I would not be having this trouble if I weren't passing the form data to php via an array :-)

    Regards,

    Joseph.

    attached mail follows:


    Joseph,

    You will have to declare <SCRIPT LANGUAGE="javascript 1.2">

    myArray = new Array();

    myArray[0] = "a string"; myArray[1] = 11; myArray[2] = new Array(); </SCRIPT>

    since JavaScript 1.2 has arrays implemented.

    Kind regards, Morten Winkler

    attached mail follows:


    Morten Winkler Jørgensen wrote:

    > > You will have to declare > <SCRIPT LANGUAGE="javascript 1.2"> > > myArray = new Array(); > > myArray[0] = "a string"; > myArray[1] = 11; > myArray[2] = new Array(); > </SCRIPT> > > since JavaScript 1.2 has arrays implemented. > Thanks for that, but my problem being that I have just collected all my form data in an array:

    input[keyname]

    how do I now build the equivelent js array to validate the data?

    I tried the following still does not work:

    --snip from head-- <script language="JavaScript1.2"> //--> input = new Array();

    function validateForm(theForm) { if ( theForm.input[name].value == "" ) { alert("You must type a value for NAME."); theForm.input[name].focus(); return false; }

    } <!-- </script>

    --/snip-- --snip from body---

    <form name="form" method="post" action="whatever" onSubmit="return validateForm(this);"> <input type="text" name="input[name]"> <input type="text" name="input[address]"> <input type="submit" value="submit"> </form>

    --/snip--

    How do I force all the data into the javascript array, while still setting the array to input[keyname]?

    Any help appreciated,

    Regards

    Joseph

    attached mail follows:


    I don't think you can name variables as varname[name] and access them like that in javascript unless varname[name] is initialize where varname is an array and name=index in that array and it must be defined first.

    I believe you will have to change the naming convention from var[keyname] to var_keyname or something, and same for reading it from PHP.

    or else name them as: input_1 input_2 input_... input_N then you can access them in JavaScript as: for (i=0;i<n;i++) { fld=eval("form.input_"+i); if (fld.value=="") { alert('error in field'); fld.focus(); } }

    as for PHP and reading them, you have to do: <? for ($i=0;$i<$n;$i++) { $temp = "input_$i"; $value = $$temp; echo "value $i=$value"; } ?>

    hope it helps.

    -elias http://www.kameelah.org/eassoft

    "Joseph Blythe" <joe.blythebinarylogic.com.au> wrote in message news:3AD163C2.5060107binarylogic.com.au... > G'day, > > I was wondering if anyone knows how to get the following to work: > > --snip from head-- > <script language="JavaScript"> > //--> > function validateForm(theForm) { > if ( theForm.input[name].value == "" ) { > alert("You must type a value for NAME."); > theForm.input[name].focus(); > return false; > } > > } > <!-- > </script> > > --/snip-- > --snip from body--- > > <form name="form" method="post" action="whatever" onSubmit="return > validateForm(this);"> > <input type="text" name="input[name]"> > <input type="text" name="input[address]"> > <input type="submit" value="submit"> > </form> > > --/snip-- > > Now the above doesn't work as I think javascript does not understand > arrays? or I don't understand how javascript deals with arrays?? > > Any help/suggestions would be great, sorry if this post is a little off > topic in the way of javascript but I would not be having this trouble if > I weren't passing the form data to php via an array :-) > > Regards, > > Joseph. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hello paula,

    Monday, April 09, 2001, 6:47:21 AM, you wrote:

    p> I was sending desperate emails to this list related to nested loops and array comparision. p> Well, just let you know that the problem seems to be that I'm using this with PHPLIB p> templates and those can't handle nested loops.

    template.html: <table>

    <!-- BEGIN row --> <tr> <!-- BEGIN column --> <td>{val}</td> <!-- END column --> </tr> <!-- END row --> </table>

    code: // place here some code for multi-row multi-column data array

    $tpl = new Template; $tpl->set_file('tp', 'template.html'); $tpl->set_block('tp', 'row', 'row_parsed'); $tpl->set_block('row', 'column', 'column_parsed');

    foreach ($rows as $row => $columns) {

    /* IMPORTANT: free the column block from previous results, do it like this: */ $tpl->set_var('column_parsed', ''); foreach ($columns as $column) { $tpl->set_var('val', $column); $tpl->parse('column_parsed', 'column', true); } $tpl->parse('row_parsed', 'row', true); } $tpl->pparse('out', 'tp');

    So, you have nested blocks filled with nested loops.

    -- 
    Best regards,
    Maxim Derkachev mailto:kotbooks.ru
    Symbol-Plus Publishing Ltd.
    phone: +7 (812) 324-53-53
    http://www.Books.Ru -- All Books of Russia
     
    

    attached mail follows:


    Here is a basic (untested) example.

    $link = mysql_connect("localhost", "username", "password"); mysql_select_db("database", $link);

    $result = mysql_query("SELECT product_name FROM products", $link); $num_rows = mysql_num_rows($result);

    // read in data while ($row = mysql_fetch_array ($result)) { $products[] = $row["product_name"]; }

    // display data $num_display_rows = ceil($num_rows / 3) $indx = 0; while ($indx < $num_display_rows) { echo "{$products[$indx]}, {$products[$indx+$num_rows]}, {$products[$indx+$num_rows*2]}"; $indx++; }

    -Stewart

    -----Original Message----- From: DRN [mailto:donaldrnobleNOSPAM.yahoo.com] Sent: 07 April 2001 19:55 To: php-generallists.php.net Subject: [PHP] putting a list of data into 3 columns?

    Hi, I would like to display a list of products from a MySQL database in 3 columns. as shown below:

    Product A Product D Product G Product B Product E Product H Product C Product F

    The problem I have is I don't know how many products there will be, so I can't just print out the first 3, start new column, print out next three, start new column, print out rest, end table.

    I presume I will have to count the number of results, then use this to wok out how many have to go in the first column etc.

    As I have only recently started using PHP / MySQL I am not sure how this should be done, has anybody done this (or something similar) so that I could look at the relevant code.

    Many thanks for your help, Donald

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    Hi,

    I have not coded script in html before, so I was wondering if someone could look this over briefly:

    I'm a bit confused as to how variables are passed/stored. Do the variables get saved on the client machine? Do they have to be specifically passed from page to page and back? Are they automatically returned to the calling page?

    If I have a page with thumbnail, and I'd like to call a page that dynamically places the original photo into it (based on the thumbnail clicked) does it go a little something like this?

    in index.html: <a href="picture.html?var=pictureone.jpg"><img src="thumbnail.gif"></a>

    in picture.html <a href="index.html"><img src="<?php print $var ?>"</a>

    Is there a similar javascript method?

    Thanks Kynan

    > -----Original Message----- > From: Philip Olson [SMTP:philipcornado.com] > Sent: Sunday, April 08, 2001 10:52 PM > To: Victor > Cc: php-generallists.php.net > Subject: Re: [PHP] newbie question about variables > > > Something like the following HTML : > > <a href="foo.php?var=1"><img src="img1.gif"></a> > <a href="foo.php?var=2"><img src="img2.gif"></a> > <a href="foo.php?var=3"><img src="img3.gif"></a> > > And in foo.php have : > > print $var; // 1 or 2 or 3 > > Also consider the following : > > <a href="<?php echo $PHP_SELF; ?>?var=1"><img src="img1.gif"></a> > > To have it load the current page rather then foo.php. > > regards, > philip > > > On Mon, 9 Apr 2001, Victor wrote: > > > Hello, > > > > Is there any (easy) way to let a user to set the value of a > > variable by simply clicking on a hyperlink on a web page? > > I mean if I have a 3 links on a page if the user clicks on image1 to > > set a variable $var=1,if clicks on image2 to set it as > > $var=2,etc. > > > > Any suggestions (including RTFMs ;-)) are wellcome. > > > > > > Best regards, > > Victor > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi! Any idea how to send a www header through a proxy? Is there a proxy www header?

    thanx, Daniel BI

    attached mail follows:


    Hello.

    I have no idea in Linux systems yet nor in Web Servers configurations and stuff, and now I wonder:

    www.php.net/asdfadasdasd

    who takes control if i didn't specify a script name in the url?

    does it work on windows PWS ?

    and sometimes i see:

    www.site.com/?asdasdf=adasd

    can someone please explain me this process.

    thanks.

    -elias http://www.kameelah.org/eassoft

    attached mail follows:


    > Hello. > > I have no idea in Linux systems yet nor in Web Servers configurations and > stuff, and now I wonder: > > www.php.net/asdfadasdasd > > who takes control if i didn't specify a script name in the url?

    the web-server if you access www.php.net/asdfadasdasd (and the directory DOES exist) the web-server returns: 301 Moved Permanently http://www.php.net/asdfadasdasd/

    then the Web-Server gets the request "http://www.php.net/asdfadasdasd/" from the Browser Now the server looks in its configuration (for example Apache: DirectoryIndex index.php)

    > does it work on windows PWS ?

    I don't even want to try it ;-)

    > > and sometimes i see: > > www.site.com/?asdasdf=adasd > > can someone please explain me this process.

    the server looks in its configuration (for example Apache: DirectoryIndex index.php) and returns this page - with the GET-Varaibales as well (your Browser doesn't have to know, what this page's name is!)

    But I'm sure you can configure your webserver (or put it in your script) to make a 301/2/3 and redirect to the full URL!

    witty

    -- 
    GMX - Die Kommunikationsplattform im Internet.
    http://www.gmx.net
    

    attached mail follows:


    > -----Original Message----- > From: mailing_listgmx.at [mailto:mailing_listgmx.at] > Sent: Monday, April 09, 2001 4:50 AM > To: elias > Cc: php-generallists.php.net > Subject: Re: [PHP] URL w/o script name > > > > and sometimes i see: > > > > www.site.com/?asdasdf=adasd > > > > can someone please explain me this process. > > the server looks in its configuration (for example Apache: DirectoryIndex > index.php) and returns this page - with the GET-Varaibales as well (your > Browser doesn't have to know, what this page's name is!) > > But I'm sure you can configure your webserver (or put it in your > script) to > make a 301/2/3 and redirect to the full URL! > > witty

    Just to point out, the /?asdf=asdf style is poor in my opinion, more so because I have experienced errors (well, visitors have experienced errors) with links that were linked like that. I believe it was a Lynx user, or maybe Opera, don't remember. However, the fact is that I suggest actually putting the script name in there. =)

    Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn.

    attached mail follows:


    Hello Folks ,

    I'm rebuilding my PHP Site with a new design and i want to keep my set_cookie commands to allow people own settings for my site , but actually now it gives me this error message :

    Warning: Cannot add header information - headers already sent by (output started at /www/htdocs/phptest/Quake.lu/www/settings.php:15) in /www/htdocs/phptest/Quake.lu/www/settingsystem.php on line 6

    Any idea what's wrong with my php script ? I'm looking up to your help .... Thanks , bye

    Marc Dondlinger (aka HiGhPwR) donmarcvo.lu http://www.quakeXtreme.com http://www.quake.lu

    attached mail follows:


    it says that on line 15 of settings.php there's an output.

    you need to set cookies BEFORE any output.

    Cheers,

    Maxim Maletsky www.PHPBeginner.com

    -----Original Message----- From: Marc Dondlinger [mailto:donmarcvo.lu] Sent: Monday, April 09, 2001 6:37 PM To: php-generallists.php.net Subject: [PHP] PHP Error

    Hello Folks ,

    I'm rebuilding my PHP Site with a new design and i want to keep my set_cookie commands to allow people own settings for my site , but actually now it gives me this error message :

    Warning: Cannot add header information - headers already sent by (output started at /www/htdocs/phptest/Quake.lu/www/settings.php:15) in /www/htdocs/phptest/Quake.lu/www/settingsystem.php on line 6

    Any idea what's wrong with my php script ? I'm looking up to your help .... Thanks , bye

    Marc Dondlinger (aka HiGhPwR) donmarcvo.lu http://www.quakeXtreme.com http://www.quake.lu

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    Yeah right...

    Sure, we can use ob_start(), but the poster of original message apparently does not make any use of these functions , therefore his problem is easily solvable by just keeping track of output start rather then creating a whole buffering system.

    After all, why would you use some strange (for the poster) functions when he can just delete the space/newline after ?> ?

    Thanks for suggesting an alternative.

    Maxim Maletsky www.PHPBeginner.com

    -----Original Message----- From: Jochen Kaechelin [mailto:jkwa-p.de] Sent: Monday, April 09, 2001 6:49 PM To: Maxim Maletsky Subject: RE: [PHP] PHP Error

    > it says that on line 15 of settings.php there's an output. > > you need to set cookies BEFORE any output. >

    that's not quiet right! you can use the output buffering functions such as ob_start() to avoid this problem!

    --
    phpArbeitsgruppe in Gruendung - Jochen Kaechelin
    Stuttgarter Str.3, D-73033 Goeppingen
    Tel. 07161-92 95 94, Fax 07161-92 95 98
    http://www.php-arbeitsgruppe.de, mailto:infophp-arbeitsgruppe.de
    

    attached mail follows:


    Just a quick question...

    How much data can a session store? The reason I´m asking is that I have developed a news system and want a "preview"-thingy and for this I want to store the data in a session. The main-content can be very large.

    Thanks, // Tobias

    attached mail follows:


    It depends how you are going to store session data what you have.

    Assuming you have large enough H/W.

    If you are using 'file', you probably could store up to file size max on your OS. If you are using 'mm', relatively small amount of data will be able to stored. It's depends on how much shared memory can allocate. It's OS dependent. If you are using 'user', depends on your custom session handler and underlying storage.

    If you have large session data, it would slows things down even with relatively small number of active users unless you do something. (Session data is read and written whenever user access pages)

    Regards,

    --
    Yasuo Ohgaki
    

    ""Tobias Talltorp"" <tobiastalltorp.com> wrote in message news:9as098$lup$1toye.p.sourceforge.net... > Just a quick question... > > How much data can a session store? > The reason I$B%((Bm asking is that I have developed a news system and want a > "preview"-thingy and for this I want to store the data in a session. The > main-content can be very large. > > Thanks, > // Tobias > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    eyo! I was wondering if it is possible to have the include_path directive in php.ini (I am using win98) pointing to path so that a file in an underlying dir, also can be included? I have tried to set the include_path to c:\program\apache\htdocs so that I can have all the files in the webroot included in any file. But it does not work, please help!

    attached mail follows:


    You should use this:

    (from my Development Machine:)

    include_path = ".;D:\includes;D:\htdocs\;D:\htdocs\phpmyadmin" ; UNIX: "/path1:/path2" Windows: "\path1;\path2"

    Note the dot at the beginning of the string - that's your solution

    Cheers,

    Maxim Maletsky www.PHPBeginner.com

    -----Original Message----- From: Jimmy Bäckström [mailto:broder_bchello.se] Sent: Monday, April 09, 2001 6:52 PM To: PHP General List Subject: [PHP] include_path

    eyo! I was wondering if it is possible to have the include_path directive in php.ini (I am using win98) pointing to path so that a file in an underlying dir, also can be included? I have tried to set the include_path to c:\program\apache\htdocs so that I can have all the files in the webroot included in any file. But it does not work, please help!

    attached mail follows:


    I have a page with javascript which is dynamic generated by php. That page is quite large and run ok with IE. But it netscape, I don't know why that it will reload every time when I select an option. If I save the resulting php page in HTML file and run it is netscape, no problem at all. Can anyone tell me how to solve?

    The pages are: http://203.169.148.213/coachquote/coach_req_form.html http://203.169.148.213/coachquote/coach_req_form.php

    attached mail follows:


    I can't solve your problem but here's an alternative javascript that works in both IE/NS so u might want to give it a try: www.eudos.com/temp/onchange.htm

    hope it works. ----- Original Message ----- From: Carfield Yim <carfieldprogrammer.net> To: <php-generallists.php.net> Sent: Monday, April 09, 2001 11:46 AM Subject: [PHP] Why a javascript have problem if it is dynamic load?

    > I have a page with javascript which is dynamic generated by php. That