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: Sat Sep 01 2001 - 04:59:34 CDT

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

    php-general Digest 1 Sep 2001 09:59:34 -0000 Issue 850

    Topics (messages 65550 through 65597):

    xitami problems
            65550 by: Nikola Veber
            65551 by: Nikola Veber

    Re: Disbale function in certain virtual host
            65552 by: Rasmus Lerdorf

    Re: array search
            65553 by: Joseph Bannon
            65554 by: Martín Marqués
            65555 by: Philip Olson
            65556 by: Philip Olson

    Getting links from html page
            65557 by: Kunal Jhunjhunwala
            65580 by: Richard Lynch

    Re: Serious Fopen Problems - not newbie :)
            65558 by: Paul Procacci
            65595 by: Philip Murray

    Re: passing variables between scripts?
            65559 by: Paul Procacci

    Re: passing variables between scripts? End of story
            65560 by: Jon Thompson Coon

    Might just be a typo, but...
            65561 by: Jon Thompson Coon
            65562 by: Martín Marqués
            65563 by: Jon Thompson Coon
            65564 by: Martín Marqués

    Image manipulation
            65565 by: Adam Plocher
            65566 by: Bob Scott

    Re: The future of PHP
            65567 by: Richard Lynch

    Re: Socket Server
            65568 by: Richard Lynch

    Re: Send mail via exact account
            65569 by: Richard Lynch

    Re: vanishing variable
            65570 by: Richard Lynch

    Re: Asynchronous SNMP?
            65571 by: Richard Lynch

    Re: Apache Segmentation fault.
            65572 by: Richard Lynch

    Re: Non selected submited form-array values
            65573 by: Richard Lynch

    Re: Decent Web Calendar With Moderated Public Postings
            65574 by: Richard Lynch

    Re: Grabbing all files and adding to select boxes...
            65575 by: Richard Lynch

    Re: help !
            65576 by: Richard Lynch

    Re: HTTP authentication
            65577 by: Richard Lynch

    Re: sessions problems :/
            65578 by: Richard Lynch

    Re: Is there anything in here that could be considered a parse error?
            65579 by: Richard Lynch

    Hello
            65581 by: Brian Elias

    Email Processors Wanted!
            65582 by: skyward_7.yahoo.com

    File Upload Problem Solving?
            65583 by: Jeff Oien
            65590 by: Jeff Oien

    networking
            65584 by: Data Driven Design
            65589 by: mike cullerton

    seeking good annotate script
            65585 by: daniel goldin
            65586 by: daniel goldin

    slightly OT -- content management systems and php
            65587 by: daniel goldin

    If PHP4 existed in 1995 we would of taken over the world by now
            65588 by: Bob

    Reg-Variables
            65591 by: senthilvellan

    Re: number to word converter
            65592 by: Carry Ian

    Re: Labor Day Weekend
            65593 by: Wendi Ann

    hi
            65594 by: Balaji Ankem
            65596 by: Hugh Danaher

    chmod and ps ef |grep httpd
            65597 by: Police Trainee

    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:


    I know I'm stepping on your nerv, but I can't process any
    pages, although xitami is
    properly installed, and has php direction in filters option. I
    am using opera 5.12 as
    my browser, and even when I read files trough the local
    server, I can't process the
    code...

    Help !
    Nikola

    attached mail follows:


    I know I'm stepping on your nerv, but I can't process any
    pages, although xitami is
    properly installed, and has php direction in filters option. I
    am using opera 5.12 as
    my browser, and even when I read files trough the local
    server, I can't process the
    code...
    I tried reinstalling PHP with the instShield, but no use

    Help !
    Nikola

    attached mail follows:


    <VirtualHost foo>
    php_admin_value disable_functions strlen
    </VirtualHost>

    On Fri, 31 Aug 2001, Nicolas Ross wrote:

    > I am searching a way of disabling certain functions in a particular Virtual
    > Host.
    >
    > I search through the archive of this list and I found a begening of a
    > solution. I can disable functions in php.ini, but I can't use them in vhost
    > I want to. If I don't disable functions in php.ini, I cannot disable
    > functions through httpd.conf with php_value or php_admin_value...
    >
    > Does some one have an Idea ?
    >
    > Nicolas Ross
    >
    >
    >

    attached mail follows:


    What about going the other way? Say I have a sentence...

    "Hi, my name is Bob."

    ...and I want to search the sentence for one of the values (people) in the
    array...

    $people = array("Jim","John","JP","Bob");

    Can this be done?

    Thanks,
    Joseph

    -----Original Message-----

    yes, in_array($person, $people)!

    however, you may take a look into the manual.

    attached mail follows:


    On Vie 31 Ago 2001 17:49, you wrote:
    > What about going the other way? Say I have a sentence...
    >
    > "Hi, my name is Bob."
    >
    > ...and I want to search the sentence for one of the values (people) in the
    > array...
    >
    > $people = array("Jim","John","JP","Bob");
    >
    > Can this be done?

    Yes, split the sentence into parts of the array (use split or explode), then
    all you have to do is walk through $people with foreach askink if that word
    is in, for example $word that is the array that you got after the split (or
    explode).

    Saludos,.... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    try this :

    $people = array ('philip','sasheen','jim'); $string = 'Hi, my name is philip, I miss Sasheen';

    foreach ($people as $person) { if (stristr($string,$person)) { $matches[] = $person; } } // results live in $matches now.

    print_r($matches);

    stristr is case insensitive, strstr is case sensitive. modify to suit your needs.

    regards, Philip Olson

    On Fri, 31 Aug 2001, Joseph Bannon wrote:

    > What about going the other way? Say I have a sentence... > > "Hi, my name is Bob." > > ...and I want to search the sentence for one of the values (people) in the > array... > > $people = array("Jim","John","JP","Bob"); > > Can this be done? > > > Thanks, > Joseph > > > > > -----Original Message----- > > yes, in_array($person, $people)! > > however, you may take a look into the manual. > > -- > 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:


    btw, you may want to search for a name surrounded by spaces as philip vs philips, jim vs jimmy, etc. probably other considerations as well, or maybe not :)

    philip

    On Fri, 31 Aug 2001, Philip Olson wrote:

    > try this : > > $people = array ('philip','sasheen','jim'); > $string = 'Hi, my name is philip, I miss Sasheen'; > > foreach ($people as $person) { > > if (stristr($string,$person)) { > $matches[] = $person; > } > } > > // results live in $matches now. > > print_r($matches); > > stristr is case insensitive, strstr is case sensitive. modify to suit > your needs. > > regards, > Philip Olson > > > On Fri, 31 Aug 2001, Joseph Bannon wrote: > > > What about going the other way? Say I have a sentence... > > > > "Hi, my name is Bob." > > > > ...and I want to search the sentence for one of the values (people) in the > > array... > > > > $people = array("Jim","John","JP","Bob"); > > > > Can this be done? > > > > > > Thanks, > > Joseph > > > > > > > > > > -----Original Message----- > > > > yes, in_array($person, $people)! > > > > however, you may take a look into the manual. > > > > -- > > 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:


    Is there a way one can get all the information in the <a></a> tags from a html page? I was able to get the link per se, but not the link information or name. :( Can anyone help me out here? Regards, Kunal Jhunjhunwala

    attached mail follows:


    There have to be samples of this in the code archives linked from http://php.net/links.php

    You'll probably want http://php.net/preg_match

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Kunal Jhunjhunwala <kunalgetmonked.net>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 31, 2001 4:38 PM
    Subject: Getting links from html page
    

    > Is there a way one can get all the information in the <a></a> tags from a > html page? I was able to get the link per se, but not the link information > or name. :( Can anyone help me out here? > Regards, > Kunal Jhunjhunwala >

    attached mail follows:


    This is a snippet from my code.

    $FILE = "http://www.somehost.com";

    $fp = fopen($FILE, "r");

    if(!$fp){ print("Somethings screwy"); } else{ do stuff }

    Any suggestions?

    Paul

    Speedboy wrote:

    > > I'm sure http://www.php.net exists. :) > > No, what my sentence meant was you're trying to do some operations on a > mis-typed file descripter? > > $fp = fopen... > fputs($fp2... > ^- There should be no 2. > > Possibly something like that? > > > > > > with fopen(). Everytime I try to use fopen, I get some weird error > > > > > messages. If I do fopen("http://www.php.net", "r") - I get this error > > > > > message: Undefined error: > > > > > If I try doing > > > > > fopen("http://www.somehost.com/~myname/somefile.php?var=value", "r") - I > > > > > get this message: Bad file descriptor > > > > > > You're trying to do operations on a file descripter that doesn't exist?

    attached mail follows:


    Depending on the version of PHP you're using, this might help:

    Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because of this, directories must include trailing slashes.

    It's from the fopen() manual page, http://www.php.net/fopen

    Cheers

    -------------------------------- - -- - - - Philip Murray - webmasteropen2view.com http://www.open2view.com - Open2View.com ------------- - -- - -

    > This is a snippet from my code. > > $FILE = "http://www.somehost.com"; > > $fp = fopen($FILE, "r"); > > if(!$fp){ > print("Somethings screwy"); > } > else{ > do stuff > } > > Any suggestions? > > Paul > > Speedboy wrote: > > > > I'm sure http://www.php.net exists. :) > > > > No, what my sentence meant was you're trying to do some operations on a > > mis-typed file descripter? > > > > $fp = fopen... > > fputs($fp2... > > ^- There should be no 2. > > > > Possibly something like that? > > > > > > > > with fopen(). Everytime I try to use fopen, I get some weird error > > > > > > messages. If I do fopen("http://www.php.net", "r") - I get this error > > > > > > message: Undefined error: > > > > > > If I try doing > > > > > > fopen("http://www.somehost.com/~myname/somefile.php?var=value", "r") - I > > > > > > get this message: Bad file descriptor > > > > > > > > You're trying to do operations on a file descripter that doesn't exist? > > > -- > 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:


    Sessions would definately save the data. :)

    Jon Thompson Coon wrote:

    > I can't cope the fact that I loose my variables every time I reload the > page. If someone could point me to the right direction, I'd be grateful. > > Present problem: > > I have a script that has some globals (surprise). Within this script, > pretty deep in a function call tree, a function saves a query into an > array and saves it to a global. Then an user makes an selection and the > script reloads itself. After this I'd like to my hands on the saved > query, but the global variable where it's saved seems to get initialised > on reload. How to get around this? Sessions? I'm pretty new (a > forthnight and wery little documentation) to server side programming, so > I'm probably misunderstanding some basics. > > Most of my problems are related to this area, so anyone bold enough to > anwer will probably pounded with several questions more. > > Thank you in advance > Jon Thompson Coon

    attached mail follows:


    Thank you. Question answered. Several times over.

    attached mail follows:


    Hey, you people are great. 5 reasonable answers to a 1 silly problem within the hour. I'll exploit your goodwill. Here's the next one, this is about objects (in finnish):

    class Example { var $list; // Here I set the problem var $hinta; var $määrä;

    function Example() { $hinta = 0; $määrä = 0; $list = array(); // Initialised }

    function addToExample($object) { array_push($this->list, $object); // I've been over it a hundred times, but... } }

    when I call the function instanceOfExample->addToExample($object) I get:

    Warning: First argument to array_push() needs to be an array in xxx on line xx

    I know what this means, I also 'know' that there should not be any mistakes in that code. Mebbe a peculiarity I don't know of?

    Thanks - jon

    attached mail follows:


    On Sáb 01 Sep 2001 05:18, you wrote: > Hey, you people are great. 5 reasonable answers to a 1 silly problem > within the hour. I'll exploit your goodwill. Here's the next one, this > is about objects (in finnish): > > class Example { > var $list; // Here I set the problem > var $hinta; > var $määrä; > > function Example() > { > $hinta = 0; > $määrä = 0; > $list = array(); // Initialised

    Here are your mistakes! This lines should be:

    $this->hinta = 0; $this->määrä = 0; $this->list = array(); // Initialised

    > } > > function addToExample($object) > { > array_push($this->list, $object); // I've been over it a hundred > times, but... > } > } > > when I call the function instanceOfExample->addToExample($object) I get: > > Warning: First argument to array_push() needs to be an array in xxx on > line xx

    Thats because you haven't initiallized $this->list, but $list, that is internal to the Example function (in this case the constructor).

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    > Here are your mistakes! This lines should be: > > $this->hinta = 0; > $this->määrä = 0; > $this->list = array(); // Initialised > > Thats because you haven't initiallized $this->list, but $list, that is > internal to the Example function (in this case the constructor).

    Thats just it. I'm blind to these kinds of mistakes with PHP and other assorted languages. I'm a java guy, and the syntax in that language is just wonderful for dysleksic guys like me. Guess how many hours i've been looking for missing $:s.

    Soon I'll come up with a demanding question.

    - jon

    attached mail follows:


    On Sáb 01 Sep 2001 05:31, you wrote: > > Here are your mistakes! This lines should be: > > > > $this->hinta = 0; > > $this->määrä = 0; > > $this->list = array(); // Initialised > > > > Thats because you haven't initiallized $this->list, but $list, that is > > internal to the Example function (in this case the constructor). > > Thats just it. I'm blind to these kinds of mistakes with PHP and other > assorted languages. I'm a java guy, and the syntax in that language is just > wonderful for dysleksic guys like me. Guess how many hours i've been > looking for missing $:s. > > Soon I'll come up with a demanding question.

    Oh, if you knew what I'm doing!!! Well, I'm just debugging quite an application (checking DB logs, apache logs, and a few emacs open on some scripts). :-)

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    Hey I got a few questions about image manipulation. First of all, is there anyway I could have my script take a full size image and crop out a chunk of it to be used as a thumbnail - or just simply shrink the image down to be used as a thumbnail? Also, is there anyway to convert misc image types (gif, bmp, png, etc) into a jpeg? Any help will be very appreciated, thanks. -Adam Plocher

    attached mail follows:


    Adam -

    If you're on a machine that has ImageMagick installed on it (most Linux boxes I've been on have it installed already) you can do something like this in PHP:

    $origfile = "/home/bob/my_face.jpg";

    $img_dir = "/usr/local/www/htdocs/images";

    $dest_file = $img_dir . "/t_" . basename($userfile) . ".gif";

    $s = system ("/usr/X11R6/bin/convert -geometry 100x100 $userfile $dest_file");

    will create a 100x100 pixel thumbnail image called t_my_face.jpg.gif in /usr/local/www/htdocs/images

    ImageMagick can be found at http://www.imagemagick.org/

    Have fun! -bob

    --
    Bob Scott                           Web / DB Developer
    http://www.covalent.net    Covalent Technologies, Inc.
    

    On Fri, 31 Aug 2001, Adam Plocher wrote:

    > Hey I got a few questions about image manipulation. > > First of all, is there anyway I could have my script take a full size image > and crop out a chunk of it to be used as a thumbnail - or just simply shrink > the image down to be used as a thumbnail? > > Also, is there anyway to convert misc image types (gif, bmp, png, etc) into > a jpeg? > > Any help will be very appreciated, thanks. > -Adam Plocher >

    attached mail follows:


    > looks bright.

    The future's so bright, I need to wear shades.

    Sorry, couldn't resist.

    Bottom line I'm hearing: The Dev team has no more hours to give, and is focussing on what they believe is right. If somebody wants to sink time/money into this, go for it.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    > This is my quandry... I am trying to build a socket server to transfer simple information, more of a monitoring tool. But after about 14+ hours it just kicks out, without rhyme or reason. No errors, no nothing... I was curious if anyone could see big gaping holes in my code that would allow for this, it's being run on Linux via the command: > /web/sockets/socketserver 2 > /web/sockets/logs/error.log &

    Like, I think you need that 2 and that > to be smushed together... But I never did quite fully grok all the 2S> stuff...

    I'm guessing that error output is going into the bit bucket...

    > Same for the client piece.. and the code in each is as follows, the client is: >

    Any consistency in the last lines of output before puking?

    Have you kept an eye on the RAM used? Perhaps you are leaking somewhere.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    http://php.net/mail

    $headers = "From: supportsomehost.com\r\n $headers .= "Reply-to: supportsomehost.com\r\n"; $headers .= "X-anything-you-want: Custom headers can be useful or fun\r\n";

    $success = mail($to, $subject, $body, $headers); if ($success){ # Mail was successfully queued for sending } else{ # Mail queue-ing failed. }

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Rosen <rosen_dmdir.bg>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Thursday, August 30, 2001 2:18 AM
    Subject: Send mail via exact account
    

    > Hi, > I want to send mail via exact account ( i.e. supportsomehost.com ). > > can I do it with php ? > > Thanks > Rosen > >

    attached mail follows:


    >Finally, I've got another select box which calls a new page using get (I tried post, and it >didn't work either), and the $current_year disappears never to be seen again. Perplexing, >no?

    You almost for sure don't have <INPUT TYPE=HIDDEN NAME=current_year VALUE=<?php echo $current_year;?>> in that last step.

    Or, if you are using GET:

    ...=yourserver.com?current_year=<?php echo $current_year;?>...

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    You can run 5 or 6 copies of PHP just fine, way easier than trying to hack together some sort of multi-threading inside of PHP. Just be sure you use a database or other thread-safe storage mechanism. Writing to a common file, for example, would be pretty bad. Actually, under Linux, for small data blocks (4k?) you can safely use fopen(,'a');fwrite();fclose()

    How that compares to doing the thing in C++ depends a little bit on your relative strengths in C++/PHP, but you'd have to a be a multi-threading C++ guru and a total newbie to PHP for the C++ solution to be easier.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Robert Schultz <bertncinter.net>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Thursday, August 30, 2001 7:11 AM
    Subject: Asynchronous SNMP?
    

    > I'm working on a project that involves a lot of SNMP data gathering. > I was wondering if it's possible to have a multi-threaded PHP script. > Basically the SNMP queries I'm running are taking a long time to complete > (several seconds). However I found that running multiple at the same time > does not slow down the response time of any of the others. So I was > wondering how easy it would be to get 5 or 6 SNMP queries running at the > same time. > > If PHP is unable to, I'm going to have to write a C/C++ app, that will do > it, then insert the results into a database. Then the PHP script will grab > from there. > > Any suggestions? > > -- > Robert Schultz - robert.schultzadelphiacom.com > Knowledge Engineer - Adelphia Communications > >

    attached mail follows:


    Check for and report bugs at http://bugs.php.net

    Also, you can get instructions there on generating a backtrace with detailed info of why Apache puked.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Bill Koch <hertz60hotmail.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Thursday, August 30, 2001 7:39 AM
    Subject: Apache Segmentation fault.
    

    > I am getting Apache errors everytime that I try and run a Java class I get a > segmentation error. Here is the error from my log > > [Thu Aug 30 08:35:33 2001] [notice] child pid xxxxx exit signal Segmentation > fault (11) > I am running RH 7.1(2.4.2) Apache 1.3.19 with mod_ssl and OpenSSL, PHP is > configured as follows: > > ./configure --with-mysql=/usr/local/mysql > --with-pfpro=shared,/tmp/verisign/payflowpro/linux > --enable-trackvars > --with-apxs=/usr/local/apache/bin/apxs > --with-java=/usr/java/jdk1.3.1 > --with-zlib > > everything works fine except the Java. I have configured the Java before > using Kaffe and everything ran fan. I switched to JDK1.3.1, and also > configured PHP as a DSO instead of static in case I wanted to upgrade I > didn't have to fight with my system all over again. > I have read where php4.0.5 had this trouble and that several people > switched to back to 4.0.4. Also is this a bug that needs reporting or is > everyone well aware of it and I just need to change my set up. Any > suggestions would be helpful. > > Bill > >

    attached mail follows:


    Submitting only checked boxes is just how HTTP works.

    A cool trick you can use is to do this:

    name=noticias[$id] value='m'

    In other words, you can convey *MORE* info by including a specific "key" with each checkbox element from the sending script.

    For keeping track of previous values, though, I usually have two INPUTs in my form.

    name=noticias[$id] value='m' name=noticias_old[$id] value='m'

    Or something similar.

    If you are worried about security and people submitting bad data, it might be better to use sessions or something to track the user and their "previous" values though.

    You still want to verify valid input from the user on the new value, of course.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Julio Nobrega Trabalhando <inerteARROBAhotmail.compb1.pair.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Thursday, August 30, 2001 9:34 AM
    Subject: Non selected submited form-array values
    

    > Hi All, > > I already spent too much time trying to solve this one by myself, so I am > in need of a little bit of help. > > I have a form with checkboxes, all with the same name (name="noticias[]"). > When it is submited, only the selected checkboxes become a value on the > array $noticias on the next page. So: > > <checkbox name="noticias[]" value="m" checked> > <checkbox name="noticias[]" value="w"> > > $noticias will have only one value, 'm'. Right? I come to this conclusion, > but I might be wrong. The values are dinamic, which means not always certain > boxes will be checked or have the same value, form by form. So form X can > have 3 checkboxes with different values than form Y with 8 checkboxes. > > Okay. Now I need to compare the submited values with another 'parsed > string', or not if I took the wrong path from the beggining to solve this > problem. For example: > > $string = 'w=1&r=0&m=0'; > parse_str($string); // Will become $w = 1, $r = 0, etc... > > Back with the array $noticias, I need to compare the selected values with > the ones on the parsed string, still mantaining the parts equal to zero. If > array $noticias will only have values with the checked boxes, how can I > 'update' the $string (returning a new one, for example) with the new checked > boxes and still maintain the ones that equals to zero, if the $string can > have an uncertain number of values after parsed? > > That's a hard one, I believe ;-) > > Say, just to clarify, another example: > > $noticias = Array("m","d") > $string = "m=0&d=1&w=1&d=0"; > > The resulted string would need to be: "m=1&d=1&w=0&d=0"; > > A solution I am trying to unfold for dinamic (or uncertain) strings, it to > make a function that one of the parameters is the 'old string', which I > would pass to this function, to serve as a 'base' to be updated with the > values from the form array ($noticias). > > But I am stuck at the part where this old string is compared, and its > values are updated if the form's checkboxs are selected, or not. > > Am I missing some simple function from the manual that can do this for me? > If not, how can I accomplish this result? > > Thanks a lot if you read it until here ;-) > > -- > > Julio Nobrega > > A hora está chegando: > http://toca.sourceforge.net > >

    attached mail follows:


    > echo $HTTP_POST_VARS['Approve_Selected_y';

    That would have come from an <INPUT TYPE=IMAGE NAME=Approve_Select ...> tag.

    Conjecture: You probably didn't make nifty image buttons yet, so don't have that variable showing up.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    echo "<SELECT>\n"; $dir = opendir('/path/to/images/dir') or die("Could no open images dir."); while ($d = readdir($dir)){ if ($d != '.' && $d != '..'){ echo "<OPTION>$d</OPTION>\n"; } } echo "</SELECT>\n";

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Jeff Lewis <jeffhyrum.net>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Thursday, August 30, 2001 12:24 PM
    Subject: Grabbing all files and adding to select boxes...
    

    I want to open a particular directory that stores images and I want the images to be added to drop down box, was wondering if someone could help me with some code for that. I want to set it up this way so that people can just upload images there and they would be available on each load of the page.

    Jeff

    attached mail follows:


    DreamWeaver newer versions have support for PHP, almost for sure.

    If nothing else, use the "raw HTML" view tab or whatever and just type in the PHP code where you want it.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Nikola Veber <veberptt.yu>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 31, 2001 2:58 AM
    Subject: help !
    

    > I'm sorry I have to ask these stuff, but I havent found anything like > this in the manual. > I am running win98 with properly insalled xitami web server with php > support (I ran installshield). Any way, I cant figure out hov to make > a smple program with echo command, because I don't know where to > place the code. I am using opera 5.12 as my default browser, and > Macromedia Dreamweaver as the html editor. Maybe there is an > option in Dreamweaver , but I couldn't find it in it's documentation > > Please help ! > > Nikola Veber > > > >

    attached mail follows:


    Change the realm out from under them.

    IE, keep a dynamic list of "Realm" values to use, and when you want to re-authenticate, present a new, unused "Realm"

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Boris <borisepisteme.no>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 31, 2001 7:07 AM
    Subject: HTTP authentication
    

    > Is there a way to force re-authentication without closing and re-opening the > browser. > > Thanks > Boris > >

    attached mail follows:


    > another question is, at what time of the script does php call my > session_write function to update the registered session?!

    *AFTER* the connection to the browser is dead and gone, so any error output is sent to the twilight zone.

    Any error output in session_write needs to go through error_log or something.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    MySQL may not like that ; at the end of the query...

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: John Meyer <john_meyergeocities.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Thursday, August 30, 2001 5:49 PM
    Subject: Is there anything in here that could be considered a parse error?
    

    > if (empty($DidSurvey[$p_surveyid])) { > if (is_array($p_answers)){ > foreach($p_answers as $value) { > error line--> $sql = "INSERT INTO RESULTS(SURVEY_ID, ANSWER_ID) VALUES(" . > $p_surveyid . "," . $value . ");"; > mysql_query($sql); > } > else { >

    attached mail follows:


    Dear Neighbor:

    I'm having a tax problem and I want you to be the beneficiary instead of the IRS...

    My business has had a phenomenal year so far in 2001. In fact, we've done so well I'm probably going to pay 2½ times more corporate taxes than I did last year. And if we make any more money this year, the tax problem will only get worse... I'll have to pay even more money to the IRS.

    I have employees who I don't want to lay-off. So in order to keep my employees busy and not give more money to the IRS, I've decided on a strategy that's so bold – so daring – that I doubt anyone else would even dare try it. I have decided to offer windows and siding to you, at our basic cost. In other words, I'm going to offer you windows and siding for no personal profit whatsoever! This will increase our expenses thereby decrease our percent of profits. Just click the link below to set up an appointment with one of my sales representatives today!

    Brian Elias President Hansons Windows & Siding

    P. S. This a one time email offer only good for the next 9 day or until we decrease our tax problem.

    **If you wish to have your e-mail removed from our list, please reply to this email with REMOVE as the subject.

    attached mail follows:


    Dear php-generallists.php.net,

    EMAIL PROCESSING COMPANY LOOKING FOR EMAIL PROCESSORS IMMEDIATELY, TO SUSTAIN EXPLOSIVE GROWTH. EARN $2,000-$6,000 (PART-TIME) AND $5,000-$10,000 (FULL TIME) MONTHLY. FREE START-UP, NOT MLM, NO EXPERIENCE NECESSARY. SEND AN EMAIL TO: SKYWARD_7YAHOO.COM WITH SUBJECT: "SHOW ME".

    WE WANT SERIOUS INQUIRIES FROM PEOPLE WHO WANT TO MAKE SERIOUS MONEY!

    *I apologise if you have been offended. If you'd like to be removed, simply reply with REMOVE in the subject line and you will be removed immediately and receive no further mailings. This message is sent in compliance of the new email Bill HR 1910. Under Bill HR 1910 passed by the 106th US Congress on May 24, 1999, this message cannot be considered SPAM as long as I include a valid return address and the way to be removed.

    attached mail follows:


    I have a user who is unable to upload files but I don't know where to start with the troubleshooting process. I have this:

    copy("$img1", "/blah/$username/$img1_name") or die("File upload didn't work.");

    and they are getting the die message. All but one person are able to upload. Jeff Oien

    attached mail follows:


    I found the problem. A user was logged in under their username with a different case (capital/small letters) and that caused a problem. Jeff Oien

    > I have a user who is unable to upload files but I don't know where > to start with the troubleshooting process. I have this: > > copy("$img1", "/blah/$username/$img1_name") > or die("File upload didn't work."); > > and they are getting the die message. All but one person are able > to upload. > Jeff Oien > > -- > 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 know this is off topic, but I hope someone can point me in the right direction. I have a network of three win98 machines and I just installed corel linux on a fourth machine. Is there a tutorial somewhere that will show me how to set up samba, or whatever else I need to access my network, and the internet from the linux machine?

    Thanks

    Data Driven Design 1506 Tuscaloosa Ave Holly Hill, Florida 32117

    http://www.datadrivendesign.com Phone: (386) 226-8979

    Websites That WORK For You

    attached mail follows:


    http://www.linuxdoc.org/HOWTO/SMB-HOWTO.html

    --On Friday, August 31, 2001 11:25 PM -0400 Data Driven Design <jeffdatadrivendesign.com> wrote:

    > corel linux on a fourth machine. Is there a tutorial somewhere that will > show me how to set up samba, or whatever else I need to access my network, > and the internet from the linux machine?

    -- mike cullerton

    attached mail follows:


    I'm looking for a good script that implements an annotation function--much like the manual at php.net. Anybody know where I could find such a beast?

    Daniel Goldin danielblue-lamp.com 323-225-1926

    www.blue-lamp.com

    attached mail follows:


    ========================================= Note: The sender of this email has requested that you verify receipt of this email. Please visit the web page below (click on the link) to verify receipt. http://cgi.webbox.com/wbwc/webbox.asp?act=vr&ms=101724550&t=rlsbtsmefi =========================================

    I'm looking for a good script that implements an annotation function--much like the manual at php.net. Anybody know where I could find such a beast?

    Daniel Goldin danielblue-lamp.com 323-225-1926

    www.blue-lamp.com

    attached mail follows:


    I am a nonprogrammer--or enthiusiastic amateur--looking into various open source content management systems and finding myself bewildered by the possibilities. Couldn't think of a better list to pose these questions and hope I don't offend by going slightly off topic.

    First, what's the differnce between a CMS and an API? Can onyone point me to some good lay articles or faqs covering this stuff?

    How essential is a CMS for producing scalable sites? PHP strikes me as being almost a CMS in and of itself--with a little work. I am afraid of losing flexibility by embracing somebody else's system. Should I be?

    What are the pros and cons of various systems such as Typo3, SiteManager, etc. Anybody have any experience using these php-based systems?

    What about Zope? Is it all it's cracked up to be? Does it work with PHP?

    Daniel

    ____________________ Daniel Goldin danielblue-lamp.com 323-225-1926

    Daniel Goldin danielblue-lamp.com 323-225-1926

    www.blue-lamp.com

    attached mail follows:


    If PHP4 existed in 1995 then http://www.squirrelmail.org could of been hotmail.com If PHP4 existed in 1995 then http://phpwebsite.appstate.edu could of been geocities.com If PHP4 existed in 1995 then http://www.phpauction.org could of been ebay.com If PHP4 existed in 1995 then http://www.audiogalaxy.com could of been napster.com

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    Hello Techies, Is it possible to have our own global variables that can be shared between more than one programs in php.Is there any other go to share between programs(Other than flat files and database).Any help is appreciate.

    Thanks in advance, Senthilvellan.

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    thanks to everybody who responded. carry

    Carry Ian e-mail: carrybharatnet.com

    -------------------------------------------------------------------------------------------------- Get real solutions to all your problems.

    http://www.salahkarindia.com - India's first advisory Portal

    Your friend, advisor, healer,companion!!!

    Register now to get free advice on all your problems.

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

    attached mail follows:


    Below is the result of your feedback form. It was submitted by Wendi Ann (Wendi22yahoo.com) on Saturday, September 1, 2001 at 08:17:35 ---------------------------------------------------------------------------

    message: NEW !! http://tiphanie1295.devil.ru NEW !!!

    To hell with porn sites.. Real people have web cams too!! http://tiphanie1295.devil.ru

    Don't believe me?? These pages are made by REAL girls like me and couples that WANT YOU TO WATCH THEM GET NAKED!!!!

    Some do more than just get naked!

    http://tiphanie1295.devil.ru

    Why not come take a look for yourself??

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

    attached mail follows:


    Hi, Renze,

    I have one doubt in HTML. I should not ask this in this group. I don't have any alternative. Please consider this.

    How to increase the length of the select box. It is comming width as very less. I would like to increase that width.

    see the following code..

    <BODY background="imacbg1.gif" ONLOAD="document.issue.inv_name.focus()">

    <form name="issue"> <div align="center"> <center> <h2>ISSUE</h2> <input type="hidden" name="issued_by" value="<?php echo $emp_name; ?>"/> <h2>Issuing by <?php echo $emp_name; ?> </h2> <table border="0" width="100%"> <tr> <th width="50%" align="right">

    <p align="right"><b><font size="2" face="Arial">Equipment Name&nbsp;</font></b></th> <td width="5%"></td>

    <td width="50%" align="left"> <select name="inv_name"> <script language="php"> $query = "SELECT distinct inv_name FROM inventory ORDER BY inv_name "; $result = mysql_query($query); if(mysql_num_rows($result)) { // we have at least one equipment, so show all equipments as options in select form

    print("<option value=\"\">select</option>"); while($row = mysql_fetch_row($result)) { print("<option value=\"$row[0]\">$row[0]</option>"); } } else { print("<option value=\"\">No equipment added yet</option>"); } </script> </select> </td> </tr> <tr> <th width="50%" align="right">

    <p align="right"><b><font size="2" face="Arial">Equipment Type&nbsp;</font></b></th> <td width="5%"></td>

    <td width="50%"> <select name="inv_type" > <script language="php"> $query = "SELECT distinct inv_type FROM inventory ORDER BY inv_type"; $result = mysql_query($query); if(mysql_num_rows($result)) { // we have at least one equipment, so show all equipments as options in select form print("<option value=\"\">select</option>"); while($row = mysql_fetch_row($result)) { print("<option value=\"$row[0]\">$row[0]</option>"); } } else { print("<option value=\"\">No equipment added yet</option>");

    } file://closing the mysql connection mysql_close($connection); // Get current time and date $today = date("Y:m:d H:i:s"); </script> </select> </td> </tr> <tr><td width="50%" align="right"><b><font size="2" face="Arial">Equipment Tag&nbsp;</font></b></td><td width="5%"></td><td width="40%" ><input type="text" name="inv_tag" size="20" value=""></td></tr> <tr><td width="50%" align="right"><b><font size="2" face="Arial">Issued To&nbsp;</font></b></td><td width="5%"></td><td width="40%"> <input type="text" name="issued_to" size="20" value=""></td></tr> <tr><td width="50%" align="right"><b><font size="2" face="Arial">Issue Date&nbsp;</font></b></td><td width="5%"></td><td width="40%"> <input type="text" name="issue_date" size="20" value="<?php echo $today;?>"></td></tr> <tr> <td width="50%" align="right"> <p align="left"> </td> <td width="5%"> </td> <td width="50%"> <p align="left"> <input type="button" Value="SUBMIT" OnClick="check();"></td> </tr> </table> </center> </div> </form> </BODY>

    Thanks and regards -Balaji


    attached mail follows:


    It sounds like you want to set the select box to something wider than the product names so that it always comes out the same width. There is likely some elegant way to do this, but a quick fix would be to fill one of the <option> cells with a line of unprintable characters;. You could make it the first <option> cell, the one usually blank, or put it last behind your products. The code would look something like:

    print "<option> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ..."; // use as many &nbsp;'s as needed.

    Hope this helps. Hugh

    ----- Original Message ----- From: Balaji Ankem <balaji.ankemwipro.com> To: Renze Munnik <renzedatalink.nl> Cc: <php-generallists.php.net> Sent: Friday, August 31, 2001 11:40 AM Subject: [PHP] hi

    > Hi, Renze, > > > I have one doubt in HTML. I should not ask this in this group. I don't have > any alternative. Please consider this. > > How to increase the length of the select box. It is comming width as very > less. > I would like to increase that width. > > see the following code.. > > <BODY background="imacbg1.gif" ONLOAD="document.issue.inv_name.focus()"> > > <form name="issue"> > <div align="center"> > <center> > <h2>ISSUE</h2> > <input type="hidden" name="issued_by" value="<?php echo $emp_name; ?>"/> > <h2>Issuing by <?php echo $emp_name; ?> </h2> > <table border="0" width="100%"> > <tr> > <th width="50%" align="right"> > > <p align="right"><b><font size="2" face="Arial">Equipment > Name&nbsp;</font></b></th> > <td width="5%"></td> > > <td width="50%" align="left"> > <select name="inv_name"> > <script language="php"> > $query = "SELECT distinct inv_name FROM inventory ORDER BY > inv_name "; > $result = mysql_query($query); > if(mysql_num_rows($result)) > { > // we have at least one equipment, so show all equipments as > options in select form > > print("<option value=\"\">select</option>"); > while($row = mysql_fetch_row($result)) > { > print("<option value=\"$row[0]\">$row[0]</option>"); > } > } > else > { > print("<option value=\"\">No equipment added yet</option>"); > } > </script> > </select> > </td> > </tr> > <tr> > <th width="50%" align="right"> > > <p align="right"><b><font size="2" face="Arial">Equipment > Type&nbsp;</font></b></th> > <td width="5%"></td> > > <td width="50%"> > <select name="inv_type" > > <script language="php"> > $query = "SELECT distinct inv_type FROM inventory ORDER BY > inv_type"; > $result = mysql_query($query); > if(mysql_num_rows($result)) > { > // we have at least one equipment, so show all equipments as > options in select form > print("<option value=\"\">select</option>"); > while($row = mysql_fetch_row($result)) > { > print("<option value=\"$row[0]\">$row[0]</option>"); > } > } > else > { > print("<option value=\"\">No equipment added yet</option>"); > > } > file://closing the mysql connection > mysql_close($connection); > // Get current time and date > $today = date("Y:m:d H:i:s"); > </script> > </select> > </td> > </tr> > <tr><td width="50%" align="right"><b><font size="2" face="Arial">Equipment > Tag&nbsp;</font></b></td><td width="5%"></td><td width="40%" ><input > type="text" name="inv_tag" size="20" value=""></td></tr> > <tr><td width="50%" align="right"><b><font size="2" face="Arial">Issued > To&nbsp;</font></b></td><td width="5%"></td><td width="40%"> <input > type="text" name="issued_to" size="20" value=""></td></tr> > <tr><td width="50%" align="right"><b><font size="2" face="Arial">Issue > Date&nbsp;</font></b></td><td width="5%"></td><td width="40%"> <input > type="text" name="issue_date" size="20" value="<?php echo > $today;?>"></td></tr> > <tr> > <td width="50%" align="right"> > <p align="left"> > </td> > <td width="5%"> > </td> > <td width="50%"> > <p align="left"> <input type="button" Value="SUBMIT" > OnClick="check();"></td> > </tr> > </table> > </center> > </div> > </form> > </BODY> > > > Thanks and regards > -Balaji > > >

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

    ----
    

    > -- > 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've been told that the files must be owned by the same person that owns the httpd. using ps ef |grep httpd, it says "grep httpd USERNAME= ENV=/home/police/.bashrc HISTSIZE=" my unix login is police. so, what does this mean as far as trying to get my chmod command to work?

    thanx

    __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com