OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Sun Jul 21 2002 - 19:37:45 CDT

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

    php-general Digest 22 Jul 2002 00:37:45 -0000 Issue 1478

    Topics (messages 108721 through 108781):

    Re: HTML E-mails
            108721 by: Justin French
            108753 by: Richard Lynch
            108768 by: Chris Earle
            108769 by: Chris Earle
            108776 by: Justin French

    newbie form problem
            108722 by: Dean Ouellette
            108723 by: Justin French
            108754 by: Richard Lynch

    get a list of clients with PHP
            108724 by: Norbert Pfeiffer
            108755 by: Richard Lynch

    Re: Problem with sessions.(Again Sorry :)
            108725 by: John Holmes
            108747 by: Richard Lynch
            108763 by: John Holmes

    <ot> Apache Gurus
            108726 by: vins
            108756 by: Richard Lynch

    Drop Down Box Question
            108727 by: WANDA HANSEN
            108731 by: Chris Wesley
            108732 by: John Holmes
            108757 by: Richard Lynch
            108762 by: John Holmes

    Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2
            108728 by: B i g D o g
            108759 by: Richard Lynch

    Re: To print in PHP
            108729 by: Dan Koken
            108752 by: Richard Lynch
            108770 by: Dan Koken

    Re: Which discussion forum to use?
            108730 by: Yves Vrancken

    No text in form submission
            108733 by: Dean Ouellette
            108735 by: Jason Wong
            108739 by: Dean Ouellette
            108740 by: Lee
            108741 by: Dean Ouellette
            108742 by: B i g D o g
            108743 by: Dean Ouellette
            108761 by: Richard Lynch
            108764 by: John Holmes
            108773 by: Justin French

    documentation to php 5
            108734 by: Joey
            108736 by: Tyler Longren
            108737 by: Joey
            108758 by: Richard Lynch

    web-based survey form design : PHP & MySQL
            108738 by: Dipendra Raj Subedi
            108760 by: Richard Lynch

    include files and global variables
            108744 by: Jon Wyatt
            108765 by: Chris Earle
            108779 by: Michael Hall

    Re: write some text over image
            108745 by: Liam MacKenzie
            108749 by: Richard Lynch

    Re: hay
            108746 by: Richard Lynch
            108766 by: Rad0s-ław Gajewski

    Re: need help exec command
            108748 by: Richard Lynch

    Re: Smart ass form
            108750 by: Richard Lynch
            108772 by: Chris Earle

    Re: Redirect Question
            108751 by: Richard Lynch

    Here's how to fix it
            108767 by: Chris Earle

    Submitting to cgi script
            108771 by: rdkurth.starband.net
            108775 by: B i g D o g
            108777 by: rdkurth.starband.net
            108778 by: Ray Hunter

    Re: if $char == "any form of white space"
            108774 by: Chris Earle

    Hex Help Please...
            108780 by: Georgie Casey

    Sessions vs passing variables
            108781 by: Mike Mannakee

    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:


    The original post was NOT about the validity of HTML Email in the world, but
    about the specific code. The reality is that I don't like <BLINK>blinking
    text</BLINK>, and will ALWAYS advise my clients against it, but if they WANT
    it, then I give it to them... it's their money, their site.

    Subsequently, if my client wants HTML email, and they aren't swayed by
    advice to the contrary, then I have to deliver it, and deliver it within a
    sufficient timeframe, with minimal bugs and hiccups.

    Hence I (he/she) need to know how it's done.

    Anyway, regardless of the above, the following was a bit odd:

    on 21/07/02 10:39 PM, Mark Gallagher (markcyberfuddle.com) wrote:

    > It also doesn't add anything. Pretty colours and flashing lights make
    > it harder to read email, and even if you just restrict yourself to basic
    > document formatting, well, is it *that* important that your text is
    > shown as <strong>strong emphasis</strong> rather than *strong emphasis*?

    Following this same logic, should we all just use <PRE> formatted green text
    on a black background?

    If formatting doesn't add anything, and if pretty colours make things harder
    to read, and plain text-isms like *emphasis* are okay, then why have you
    bothered to learn HTML to a "high standard", and chosen to use colors, bold
    text, and other *simple* GUI tricks on your own webpage?

    Perhaps the web was perfected at HTML2.0?

    Things need to move forward, rather than staying in the archaic past.
    Formatted emails are a natural progression of their plain-text ancestors...
    in addition to simple GUI and useability benefits, they can also subtly add
    value to an email in the areas of branding.

    Bad HTML email has the same problem as bad HTML on the web -- written
    poorly. It's not HTML's fault, or HTML email's fault, it's the bad
    writer/designer.

    Also, MANY people offering HTML-formatted email also offer the option of
    plain text -- it's not like it's being force-fed to every user.

    FWIW: I don't send in HTML, I don't like reading HTML email, I don't run any
    mailing lists that use HTML mail. The issue isn't about my preferences,
    it's about logic. There is a place for HTML email, in the hands of the
    right people.

    Justin French

    attached mail follows:


    >Subsequently, if my client wants HTML email, and they aren't swayed by
    >advice to the contrary, then I have to deliver it, and deliver it within a
    >sufficient timeframe, with minimal bugs and hiccups.
    >
    >Hence I (he/she) need to know how it's done.

    If your pointy-haired-boss or equally clue-challenged client *INSISTS* on
    HTML email, then you clearly haven't explained to them:

    Many of your recipients will delete it without reading.

    But, if they still insist on it, one answer, as I already said, lies here:

    http://phpclasses.org/

    I'm sure there are a zillion other solutions, that just happens to be one I
    know of.

    Why it takes a few thousand people on this list to search this out for you,
    when it's readily find-able in Google, or at least in a very brief search
    starting at http://php.net/links.php is also beyond my comprehension.

    Actually, though, when my clients insist on HTML email, I just tell them:
    "No. If you want that feature, you'll have to hire somebody else to do it.
    I've already explained why." I don't think I've lost a single client that
    way -- Every one of them has re-considered my advice, and outright refusal,
    and decided maybe I *do* know what the hell I'm talking about. YMMV.

    >> It also doesn't add anything. Pretty colours and flashing lights make
    >> it harder to read email, and even if you just restrict yourself to basic
    >> document formatting, well, is it *that* important that your text is
    >> shown as <strong>strong emphasis</strong> rather than *strong emphasis*?
    >
    >
    >Following this same logic, should we all just use <PRE> formatted green text
    >on a black background?

    Following your logic, should we install HUDs (Heads Up Display) *right*
    *now* in cars rolling off the manufacturing line of Detroit?

    No, of course not.

    Your average driver isn't trained to use them, and probably won't be trained
    to use them in any reasonable time frame.

    Similarly, your average email client, and average email user, are clearly
    *NOT* ready for HTML email. You only have to look at the spread of stupid
    email viruses to understand this *FACT*.

    Maybe, some day, with some reasonable effort on the part of an
    organization/company that actually understands email, HTML and *SECURITY*,
    there might actually *BE* a decent email client that can handle HTML-email,
    and we might even have an "information superhighway" (LOL) capable of
    handling the load that imposes across the board. Today is not that day.

    >If formatting doesn't add anything, and if pretty colours make things harder
    >to read, and plain text-isms like *emphasis* are okay, then why have you
    >bothered to learn HTML to a "high standard", and chosen to use colors, bold
    >text, and other *simple* GUI tricks on your own webpage?

    A web-page is *NOT* an email.

    More importantly, an email is *NOT* a web-page.

    If you want me to look at your damn pretty colors and junky graphics, send
    me an email with the link.

    If I want to waste my time downloading all that crap, I'll click. If not,
    buh-bye.

    If you want to insist on sending me inappropriate content for the selected
    medium, you'll get what you deserve -- I will delete your email without even
    looking at it, much less with a chance that I'll be interested enough to
    visit your web-site. I am not alone in this behaviour.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    > So most email programs suck. Consider that Outlook and OE are the two > single most popular mail clients in existance. Then, once you've > stretched out from the foetal position and stopped weeping > uncontrollably, try to educate people about HTML mail :-).

    Actually I enjoy my Outlook Express...

    "MIME-Version: 1.0\r\n" ."Content-type: text/html; charset=iso-8859-1\r\n"

    Is all that I add other than the default headers of From: and Reply (after the MIME ...) and it works for me.

    Also, not to start a flame war, but you might want to look at http://abcnews.go.com/sections/scitech/TechTV/techtv_hackertargets020719.htm l

    attached mail follows:


    All I add to my headers to make them work are:

    "MIME-Version: 1.0\r\n" ."Content-type: text/html; charset=iso-8859-1\r\n" ."From: e-mailaddress.com\r\n" ."Reply-To: $ReplyEmail");

    I'm running Outlook Express and that works perfectly.

    attached mail follows:


    on 22/07/02 6:40 AM, Richard Lynch (richphpbootcamp.com) wrote:

    > But, if they still insist on it, one answer, as I already said, lies here: > > http://phpclasses.org/ > > I'm sure there are a zillion other solutions, that just happens to be one I > know of. > > Why it takes a few thousand people on this list to search this out for you, > when it's readily find-able in Google, or at least in a very brief search > starting at http://php.net/links.php is also beyond my comprehension.

    Hang on -- I already know how to do HTML mail -- was defending the OP!!

    > Actually, though, when my clients insist on HTML email, I just tell them: > "No. If you want that feature, you'll have to hire somebody else to do it. > I've already explained why." I don't think I've lost a single client that > way -- Every one of them has re-considered my advice, and outright refusal, > and decided maybe I *do* know what the hell I'm talking about. YMMV.

    :)

    >>> It also doesn't add anything. Pretty colours and flashing lights make >>> it harder to read email, and even if you just restrict yourself to basic >>> document formatting, well, is it *that* important that your text is >>> shown as <strong>strong emphasis</strong> rather than *strong emphasis*? >> >> >> Following this same logic, should we all just use <PRE> formatted green text >> on a black background? > > Following your logic, should we install HUDs (Heads Up Display) *right* > *now* in cars rolling off the manufacturing line of Detroit? > > No, of course not. > > Your average driver isn't trained to use them, and probably won't be trained > to use them in any reasonable time frame.

    We were all trained to cook in microwaves pretty quick smart -- an extremely different way of cooking. Not quite the same as a plain formatted email and one with a little bit of layout, clarity and visual hierarchy.

    > Similarly, your average email client, and average email user, are clearly > *NOT* ready for HTML email. You only have to look at the spread of stupid > email viruses to understand this *FACT*.

    Yup -- couldn't agree more.

    > Maybe, some day, with some reasonable effort on the part of an > organization/company that actually understands email, HTML and *SECURITY*, > there might actually *BE* a decent email client that can handle HTML-email, > and we might even have an "information superhighway" (LOL) capable of > handling the load that imposes across the board. Today is not that day.

    Agree totally.

    > A web-page is *NOT* an email. > > More importantly, an email is *NOT* a web-page.

    Correct. An email is a communication medium. And long term, people are going to expect that email can have simular simple visual cues, formatting and layout that they can achieve as "second nature" in such shite as M$ Word.

    > If you want me to look at your damn pretty colors and junky graphics, send > me an email with the link. > > If I want to waste my time downloading all that crap, I'll click. If not, > buh-bye. > > If you want to insist on sending me inappropriate content for the selected > medium, you'll get what you deserve -- I will delete your email without even > looking at it, much less with a chance that I'll be interested enough to > visit your web-site. I am not alone in this behaviour.

    Okay, I agree with all this, but there's definitely a mix-up here: *I* don't want to send HTML email. I hate it, never send it, don't like receiving it, don't run any lists that support it, and always attempt to subscribe to mailing lists as a text-only reader.

    However, I do believe HTML mail (or *some* form of formatting) has a place, and in the right hands (impossible, I know), can be useful with minimal burden, and the original poster was well within their rights to ask how it was done, because realistically, they may have to achieve it. It's not truly you place or mine to dictate to them how evil it is -- just warn them as much as possible.

    Justin

    attached mail follows:


    I have a form and I cannot figure out why this is not working. Not getting any error messages, I am just not getting the e-mail to show the form was filled out. Here it is, any help much appreciated, thanks <? $MailToAddress = "myemailhere.com"; $MailSubject = "Group volunteer list"; if (!$MailFromAddress) { $MailFromAddress = "$email"; } $Header = ""; $Footer = ""; ?> <? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= "$key = $val\n"; } if ($Header) { $Message = $Header."\n\n".$Message; } if ($Footer) { $Message .= "\n\n".$Footer; } mail( "$MailToAddress", "$MailSubject", "$Message", "From: $MailFromAddress"); ?>

    attached mail follows:


    What version of PHP are you running? If it's >= 4.1, then you should be using the $_POST array for the post vars.

    It looks to me that you're just trying to loop through the POSTed vars, and print them as the message... if so, try something like this:

    <? $MailToAddress = "myemailhere.com"; $MailSubject = "Group volunteer list"; if (!$MailFromAddress) { $MailFromAddress = "$email"; } $Header = ""; $Footer = "";

    foreach($_POST as $key => $val) { $val = stripslashes($val); $Message .= "$key = $val\n"; }

    if ($Header) { $Message = $Header."\n\n".$Message; }

    if ($Footer) { $Message .= "\n\n".$Footer; }

    mail($MailToAddress, $MailSubject, $Message, "From: {$MailFromAddress}"); ?>

    Untested code of course :)

    1. I'm not really sure why you were testing if HTTP_POST_VARS *wasn't* an array (pretty sure it's always an array)

    2. I'm not really sure what you were doing with $GLOBALS, but the above should achieve what you want.

    3. In the mail() (and in most of PHP) you don't need to put double quotes around $vars... only $vars within strings... and it also helps to wrap $vars within strings inside {curly braces} eg "From: {$MailFromAddress}"

    Justin French

    on 21/07/02 11:11 PM, Dean Ouellette (deanouellette.ws) wrote:

    > I have a form and I cannot figure out why this is not working. > Not getting any error messages, I am just not getting the e-mail to show > the form was filled out. > > Here it is, any help much appreciated, thanks > > <? > $MailToAddress = "myemailhere.com"; > $MailSubject = "Group volunteer list"; > if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } > $Header = ""; > $Footer = ""; > ?> > > > <? > if (!is_array($HTTP_POST_VARS)) > return; > reset($HTTP_POST_VARS); > while(list($key, $val) = each($HTTP_POST_VARS)) { > $GLOBALS[$key] = $val; > $val=stripslashes($val); > > $Message .= "$key = $val\n"; > } > > if ($Header) { > $Message = $Header."\n\n".$Message; > } > > if ($Footer) { > $Message .= "\n\n".$Footer; > } > > mail( "$MailToAddress", "$MailSubject", "$Message", "From: > $MailFromAddress"); > ?> >

    attached mail follows:


    ><? >$MailToAddress = "myemailhere.com"; >$MailSubject = "Group volunteer list"; > if (!$MailFromAddress) {

    This should probably be:

    if (!isset($MailFromAddress) || !$MailFromAddress)){

    Hard to tell if this is cut out from a bigger script or what...

    You also have a very unusual (but at least consistent) indenting style for { and }...

    > $MailFromAddress = "$email"; > } >$Header = ""; >$Footer = ""; >?> > > > <? > if (!is_array($HTTP_POST_VARS)) > return;

    You may want to use isset() first here as well, and to check for the new $_POST array.

    >reset($HTTP_POST_VARS); > while(list($key, $val) = each($HTTP_POST_VARS)) { > $GLOBALS[$key] = $val;

    It would be better to use $$key = $val instead of stuffing things into $GLOBALS.

    Variable variables are a documented feature. Assigning stuff into $GLOBALS is not. Don't think it will ever really break, but it's always safer to use documented features.

    > $val=stripslashes($val); > > $Message .= "$key = $val\n";

    To be strictly RFC-compliant, use \r\n, not just \n

    > } > > if ($Header) { > $Message = $Header."\n\n".$Message; > } > > if ($Footer) { > $Message .= "\n\n".$Footer; > } > >mail( "$MailToAddress", "$MailSubject", "$Message", "From: >$MailFromAddress");

    The quotes on the first three arguments are silly -- not harmful, just silly. You're forcing PHP to create another string to hold the strings you already have. A trifle wasteful, I suppose, but mostly just silly.

    Also use Reply-to: as well as From: if you want maximum number of email clients to do the right thing.

    You should be getting and checking the return value of the mail() function:

    $success = mail($MailToAddress, $MailSubject, $Message, "From: $MailFromAddress\r\nReply-to: $MailFromAddress); if ($success){ echo "Mail successfully queued.<BR>\n"; } else{ echo "Unable to queue email.<BR>\n"; }

    This last part may not help you figure out *WHY* the email isn't arriving, but you can at least pin-point the problem to either *BEFORE* PHP ever gets the email shoved into sendmail's queue, or after sendmail got the email.

    If this prints "Unable to queue email" you know PHP is not talking nice enough to sendmail to get the email into sendmail's queue. If it claims the email was queued, you need to look at sendmail and see why it has decided not to send the email after all.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Hello,

    there is a problem in a enterprise LAN: On each PC runs a Client, which waits at a haven for messages. With fsockopen(); messages are sent to all existing Clients. Functioned only, if one knows, the which Clients are switched on. If the Script meets a IP, whose PC is switched off, it dies. All following IP's receives no more message.

    My problem: How can I receive a list of the PC's switched on at present with PHP? System calls are not a genuine solution. The Script is not only to work under Linux.

    Thank you for your assistance

    w. b. r. Norbert ______________________________ normally: +49-(0)2292-681769 mobil call: +49-(0)177-2373368 ------------------------------ e.o.m.

    attached mail follows:


    >Hello, > >there is a problem in a enterprise LAN: >On each PC runs a Client, which waits at a haven for messages. >With fsockopen(); messages are sent to all existing Clients. >Functioned only, if one knows, the which Clients are switched on. >If the Script meets a IP, whose PC is switched off, it dies. >All following IP's receives no more message. > >My problem: >How can I receive a list of the PC's switched on at present with PHP? >System calls are not a genuine solution. >The Script is not only to work under Linux.

    I don't think fsockopen's failure to open a socket will "kill" a PHP script...

    Show us source code for that bit, and the loop you use to visit all the PC's...

    Also be sure you are setting a reasonable time-out on the fsockopen (http://php.net/fsockopen) as well as on PHP itself (http://php.net/set_time_limit)

    Try adding as much error-checking code as you can around the fsockopen functions calls, and log the stuff to a file or something where you can get it. http://php.net/error_log

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    > -----Original Message----- > From: Richard Lynch [mailto:richphpbootcamp.com] > Sent: Sunday, July 21, 2002 1:05 AM > To: php-generallists.php.net > Subject: [PHP] Re: Problem with sessions.(Again Sorry :) > > >I have a login script which calls this function if it is a proper user > etc. > > > >function register_in_session($uinfo){ > >// Used in conjuction with validate to input user info into the session > > $_SESSION['uid'] = $uinfo[0]; > > $_SESSION['gid'] = $uinfo[1]; > > $_SESSION['banid'] = $uinfo[2]; > > $_SESSION['username'] = $uinfo[3]; > > $_SESSION['fname'] = $uinfo[4]; > > $_SESSION['lname'] = $uinfo[5]; > > $_SESSION['email'] = $uinfo[6]; > >} > > Don't cram things into $_SESSION. Use this: > > session_register('uid'); > global $uid; > $uid = $uinfo[0];

    With PHP 4.2, you don't have to use session_register. You can do it exactly like the OP is. I do it all the time. Whether that is a "feature" or a bug, I don't know.

    ---John Holmes...

    attached mail follows:


    >> Don't cram things into $_SESSION. Use this: >> >> session_register('uid'); >> global $uid; >> $uid = $uinfo[0]; > >With PHP 4.2, you don't have to use session_register. You can do it >exactly like the OP is. I do it all the time. Whether that is a >"feature" or a bug, I don't know.

    It happens to work because that happens to be how Sessions are implemented this week.

    Programming 101: Rule #27: Relying on implementation minutia instead of documented functions is just a Bad Idea (tm).

    Use the functions that are documented to work. Anything else is a HACK and subject to break without notice.

    In PHP 4.3 or 5.0 or 7.3.1, when it *DOESN'T* work anymore and you have a zillion lines of code cramming junk into $_SESSION scattered all through your application, don't come crying to me. :-)

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    > From: Richard Lynch [mailto:richphpbootcamp.com] > > >> Don't cram things into $_SESSION. Use this: > >> > >> session_register('uid'); > >> global $uid; > >> $uid = $uinfo[0]; > > > >With PHP 4.2, you don't have to use session_register. You can do it > >exactly like the OP is. I do it all the time. Whether that is a > >"feature" or a bug, I don't know. > > It happens to work because that happens to be how Sessions are implemented > this week. > > > Programming 101: > Rule #27: Relying on implementation minutia instead of documented > functions > is just a Bad Idea (tm). > > > Use the functions that are documented to work. Anything else is a HACK > and > subject to break without notice. > > In PHP 4.3 or 5.0 or 7.3.1, when it *DOESN'T* work anymore and you have a > zillion lines of code cramming junk into $_SESSION scattered all through > your application, don't come crying to me. :-)

    Always a good method to follow, but the manual says you can use the $_SESSION method I gave. There is no need to use session_register() or the like. I would imagine that the older method would be depreciated eventually. It's a whole lot easier to just treat sessions like a variable without that whole register/unregister stuff.

    The manual actually cautions against using session_register/unregister if register_globals is OFF.

    http://www.php.net/manual/en/ref.session.php

    ---John Holmes...

    attached mail follows:


    Hi. Sorry for this (ot) message, the apache mailing list isn't very helpful.

    I need some information on mod_rewrite and mod_vhost_alias.

    My server doesn't want to detect subdomains. Please Help

    E-mail: vinswebonline.co.za

    Thankx

    attached mail follows:


    >Hi. >Sorry for this (ot) message, the apache mailing list isn't very helpful. > >I need some information on mod_rewrite and mod_vhost_alias. > >My server doesn't want to detect subdomains.

    mod_rewrite Rule #1.

    Use that EngineLog or whatever it is to crank up your logging of mod_rewrite as high as it will go. Never mind the warning in the Apache manual about dire consequences to performance right now -- You'll *NEVER* intuit what the hell mod_rewrite is doing without that log. Trust me on this one :-) Lost a lot of hair before I got brave enough to ignore that particular warning in the manual. EXCEPTION: You're *not* doing this to a *LIVE* *PRODUCTION* server, right?!!!

    Don't know squat about the mod_vhost_alias, or how it might be involved with the rewrite bit.

    You are reading everything you can find about these at http://apache.org, right? Very nice web-site, once you figure out the format of the documentation. If your head is spinning, study the documentation on the simplist directive you think you *completely* understand, and then work with one that you think you understand that's a bit more similar to the one that's giving you problems, and then go back to your problem directive... Seeing the documentation "in context" with other directives often makes clear a single line that otherwise is just gibberish :-) YMMV.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Hello, Is there a way to handle data gathered from a drop down menu that allows multiple selections using PHP? Thank you, Julian

    attached mail follows:


    On Sun, 21 Jul 2002, WANDA HANSEN (AKA Julian) wrote:

    > Is there a way to handle data gathered from a drop down menu that allows > multiple selections using PHP?

    Sure ... check out this demo:

    http://cwwesley.net/php/snippets/combobox.php

    and the source: http://cwwesley.net/php/snippets/snip_source.php?show=combobox.php

    g.luck, ~Chris

    attached mail follows:


    > Hello, > Is there a way to handle data gathered from a drop down menu that allows > multiple selections using PHP?

    Of course. Name your select box as an array, and include the 'multiple' keyword.

    <select name='something[]' multiple>

    Then you'll have an array on your processing page that holds all of the values that were selected. $_POST['something'][]. Note that it starts at zero.

    You can use count($_POST['something']) to see how many were selected, etc...

    ---John Holmes...

    attached mail follows:


    >> Hello, >> Is there a way to handle data gathered from a drop down menu that >allows >> multiple selections using PHP? > >Of course. Name your select box as an array, and include the 'multiple' >keyword. > ><select name='something[]' multiple> > >Then you'll have an array on your processing page that holds all of the >values that were selected. $_POST['something'][]. Note that it starts at >zero. > >You can use count($_POST['something']) to see how many were selected, >etc...

    If you need specific IDs or something from the OPTIONs presented, other than the text between the tags, you can even use the VALUE= attribute to pass around data so that $_POST['something'] doesn't just start at 0 and count up:

    <?php while (list($id, $name) = each($ineeddatacaptain)){ echo "$id: $name<BR>\n"; } ?> <SELECT NAME=ineeddatacaptain[] MULTIPLE SIZE=5> <OPTION VALUE=1>Captain Kirk</OPTION> <OPTION VALUE=2>Spock</OPTION> <OPTION VALUE=3>McCoy</OPTION> <OPTION VALUE=4>Scotty</OPTION> <OPTION VALUE=5>Sulu</OPTION> <OPTION VALUE=6>Uhura</OPTION> <OPTION VALUE=7>Chekov</OPTION> </SELECT>

    If you click on Spock, instead of just 0, Spock, you'll get 2, Spock -- You get his ID number as well as his name.

    This is extremely convenient. And you sure can't do that in ASP easily :-)

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    > -----Original Message----- > From: Richard Lynch [mailto:richphpbootcamp.com] > Sent: Sunday, July 21, 2002 5:06 PM > To: php-generallists.php.net > Subject: Re: [PHP] Drop Down Box Question > > >> Hello, > >> Is there a way to handle data gathered from a drop down menu that > >allows > >> multiple selections using PHP? > > > >Of course. Name your select box as an array, and include the 'multiple' > >keyword. > > > ><select name='something[]' multiple> > > > >Then you'll have an array on your processing page that holds all of the > >values that were selected. $_POST['something'][]. Note that it starts at > >zero. > > > >You can use count($_POST['something']) to see how many were selected, > >etc... > > If you need specific IDs or something from the OPTIONs presented, other > than > the text between the tags, you can even use the VALUE= attribute to pass > around data so that $_POST['something'] doesn't just start at 0 and count > up: > > <?php > while (list($id, $name) = each($ineeddatacaptain)){ > echo "$id: $name<BR>\n"; > } > ?> > <SELECT NAME=ineeddatacaptain[] MULTIPLE SIZE=5> > <OPTION VALUE=1>Captain Kirk</OPTION> > <OPTION VALUE=2>Spock</OPTION> > <OPTION VALUE=3>McCoy</OPTION> > <OPTION VALUE=4>Scotty</OPTION> > <OPTION VALUE=5>Sulu</OPTION> > <OPTION VALUE=6>Uhura</OPTION> > <OPTION VALUE=7>Chekov</OPTION> > </SELECT> > > If you click on Spock, instead of just 0, Spock, you'll get 2, Spock

    --
    > You
    > get his ID number as well as his name.
    

    That's confusing. There's no way to get "Spock" from the code. You only get the number in the value attribute. If the user were to choose Spock and McCoy, then you'd have:

    $_POST['ineeddatacaptain'][0] --> 2 $_POST['ineeddatacaptain'][1] --> 4

    It's up to the programmer to associate 2 with Spock, and 4 with McCoy.

    ---John Holmes...

    attached mail follows:


    if the install directory /usr/local/pgql or /usr/local/pgsql

    What does your phpinfo() give for postgres?

    .: B i g D o g :.

    ----- Original Message ----- From: "Eric" <emayopozicom.net> To: <php-dblists.php.net> Sent: Sunday, July 21, 2002 9:09 AM Subject: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2

    > Can someone please tell me what the hell I am doing wrong. (2 days of no > success = very frustrated). > > PGSQL is up and running no problem. I start it with: > postmaster -D /path/to/data/cluster -i & > > I can connect to the postgresql v.7.2.1 database from remote workstations > and execute queries no problem. > > > In my php code I have tried: > dl("pgsql.so") even though there is no pgsql.so on the server. > I have installed both Postgres7.2 and PHP4 from source. Where does pgsql.so > come from? (PHP or Postgre compile?) > > Tried to copy the /lib/libpgsql.2.2.so into place and rename. PHP erros out > that > pgsql.so is not a valid PHP library. (Kind of suspected this would happen). > > Tried include("DB/pgsql.php") and this gives endless errors > about class db_common can't inherit etc... > > Isn't there any clear cut examples or step-by-step how tos? > > What am I missing here? > > By the way, I have set the LD_LIBRARY_PATH and I have included > /usr/local/pgsql/lib > path in /etc/ld.so.conf. > > Compiled PHP4 as follows: > ./configure --enable-track-vars --with-gettext --enable-force-cgi-redirect > --with-apache=../apache_1.3.26 --without-mysql > --with-pgsql=/usr/local/pgql > > > PHP code is working with Apache because other things work. Just that > pg_connect() is always 'unknown function'. > > Here is how apache was compiled: > ./configure --enable-module=so --activate-module=src/modules/php4/libphp4.a > --enable-module=php4 > > Suggestions and help are very greatly appreciated! > > Eric > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    >if the install directory /usr/local/pgql or /usr/local/pgsql > >What does your phpinfo() give for postgres? > > >> By the way, I have set the LD_LIBRARY_PATH and I have included >> /usr/local/pgsql/lib >> path in /etc/ld.so.conf.

    You should also do "ld_config" I think...

    I do that any time I muck with /etc/ld.so.conf

    >> >> Compiled PHP4 as follows: >> ./configure --enable-track-vars --with-gettext --enable-force-cgi-redirect >> --with-apache=../apache_1.3.26 --without-mysql >> --with-pgsql=/usr/local/pgql >> >> PHP code is working with Apache because other things work. Just that >> pg_connect() is always 'unknown function'.

    Aha!

    That means that even though you *ASKED* configure to give you --with-pgsql=/usr/local/pgql it didn't work. ./configure was able to stumble through, but it did give you a warning message about it, somewhere in that mass that scrolled by.

    You could look in config.log, only it doesn't contain the "Yes/No" and other error output, so it only shows that ./configure *tried* to get PostgreSQL, not what actually happened. (Grrrrr.)

    You could try reading config.cache, if your brain is twisted enough. Mine isn't. :-(

    Re-do the ./configure, only this time like this:

    ./configure ... 2>&1 > configure.output &

    Or is that '2&>1' ? I never really did grok the combination of > with & and how it turns into "shove stderr output in with stdout"...

    Then, you can use: tail -f configure.output to examine configure.output as it is happening, but also use vi or less or grep to look at it again later. Don't ask me why ./configure itself doesn't give you the info you need in config.log -- I sure don't understand it.

    Anyway, for some reason, PostgreSQL never got compiled into PHP, which is why there is no function named "pg_connect"

    First Guess: /usr/local/pgql should be /usr/local/pgsql or /usr/local/psql or something other than /usr/local/pgql

    Also don't ask me to explain why configure would just continue on and not give a fatal error when it can't give you what you asked for... As near as I can figure, if what you asked for is what it would have done by default, but it still can't do it, it will just keep going... That's pretty silly, if you ask me.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Ben, I have a system with lots of different types of reports. Like you I decided I didn't want to use the browser to print. Looked at PDF, RTF. I liked the printer functions, but they only worked on M$. After looking at all the alternatives I ended up going back to the browser for several reasons: It works on all the browsers, It's code you already know, it's fast. But I looked into the printer problem, not as a report, but as a system. And I developed a printer file system. When a user prints a report, it is run on the server side, so it is very fast. The output is put into the printer DB file, and an entry is made in the users IN BASKET. When they bring up the printer system it list all the reports in the IN BASKET. I have the alphabet across the top so they can go to any folder beginning with that letter, or use a folder field to list all the reports in that folder. When someone deletes a report from a folder it is sent to the WASTE BASKET folder, and stays there for 10 days before disappearing. So they have 10 days to get it out of the WASTE BASKET and file it back into another folder. There is a drop-down list of users the person may send the report to. If the user sends the report to 10 people for example, then they all get it in their IN BASKET, but only one detail of the report is on file. A lot of other stuff is on the list, like the date printed, title, who sent it, and a comment. The user can create other folders, for example a folder for WEEKLY COST and file, or move the data from the IN BASKET. If they they want to see the detail they can bring up as many pages as they wish (default is 5). They can ask for specific pages and jump around. If they click the print button it is printed. For the most part, I have eliminated the need for printed reports, since they have them filed and can look at reports anytime they wish. The system also lets you set up reports to run at certain times, like every Monday morning at 8:00AM, and copy as many users as you want. The report then shows up in everyone's IN BASKET at 8:00AM Monday.

    So far the feedback has been great, and eliminated a lot of paper reports laying around, that they usually don't look at anyway.

    Every system is different and it may not fit your application. But I Hope this gives you some help or ideas.

    Have a great day.... Dan

    Benjamin Woen wrote: > Dear all, > > I am using PHP+MySQL to develop a database app, I want to include > printing feature in this application that able to print > to a standard format instead of using print function from the browser, > anybody in this list that ever do something like this ? > Appreciate if you can share with me the trick > > Thanks and best regards > > Ben Woen >

    attached mail follows:


    >decided I didn't want to use the browser to print. Looked at PDF, RTF. I >liked the printer functions, but they only worked on M$. After looking

    Excuse me.

    PDF works JUST FINE not only on Macs, but is also well-supported under Linux.

    http://php.net/pdflib

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Correct PDF does work and is well supported on Macs and Linux, and just about everywhere I looked. But, for out system, it don't work 'JUST FINE'. After a lot of test we decided it was just too slow for our use. Every system is different, and if you can live with PDF and it works for you, use it.

    Notice the period after RTF. The part I'm talking about is the printer functions. http://www.php.net/manual/en/ref.printer.php PHP: Printer functions - Manual

    Richard Lynch wrote:

    >>decided I didn't want to use the browser to print. Looked at PDF, RTF. I >>liked the printer functions, but they only worked on M$. After looking >> > > Excuse me. > > PDF works JUST FINE not only on Macs, but is also well-supported under > Linux. > > http://php.net/pdflib > >

    attached mail follows:


    My experience is limited to the phpBB forum and I think it could serve any purpose. A number of modifications exist that would make it possible for you to alter it to your own demands. You can always check it out: http://www.phpbb.com/

    I am sorry, I am not much of any help when it comes to the other forums.

    --Yves

    "Dasmeet Singh" <dasmeettunmail.com> wrote in message news:3D383351.4020308tunmail.com... > I wish to implement a discussion forum for an educational site. I have > heard of several PHP/MySQL ones available like postnuke, PHPBB, > NeoPlanet etc. > Which one is best and shall be good for educational site. > Thx in advance. > Dasmeet > > > --- > Watch Indian TV Schedules Online http://www.einfotimes.com > Earn Money to Read Emails (NOT SPAM) http://hp.fedoxpress.com >

    attached mail follows:


    Been working on trying to get form submission to work. Now have it so when click enter it e-mails me, but there is no text subitted in the e-mail Any ideas? <? $MailToAddress = "deanemail.com"; $MailSubject = "Group volunteer list"; if (!$MailFromAddress) { $MailFromAddress = "$email"; } $Header = ""; $Footer = ""; foreach($_POST as $key => $val) { $val = stripslashes($val); $Message .= "$key = $val\n"; } if ($Header) { $Message = $Header."\n\n".$Message; } if ($Footer) { $Message .= "\n\n".$Footer; } mail($MailToAddress, $MailSubject, $Message, "From: {$MailFromAddress}"); ?>

    attached mail follows:


    On Monday 22 July 2002 01:52, Dean Ouellette wrote: > Been working on trying to get form submission to work. > > Now have it so when click enter it e-mails me, but there is no text > subitted in the e-mail

    What version of php are you using?

    > <? > $MailToAddress = "deanemail.com"; > $MailSubject = "Group volunteer list"; > if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } > $Header = ""; > $Footer = ""; > > foreach($_POST as $key => $val) > { > $val = stripslashes($val); > $Message .= "$key = $val\n"; > }

    What do you see when you: print_r($_POST)

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

    /* <JALH> regex are more than some crappy posix thing <JALH> they are an art form

    - Marc Zealey on #kernelnewbies */

    attached mail follows:


    Is there a way to tell, just contacted my host and they do not know, they said they could look it up Monday when back in office

    -----Original Message----- From: Jason Wong [mailto:php-generalgremlins.com.hk] Sent: Sunday, July 21, 2002 2:26 PM To: php-generallists.php.net Subject: Re: [PHP] No text in form submission

    On Monday 22 July 2002 01:52, Dean Ouellette wrote: > Been working on trying to get form submission to work. > > Now have it so when click enter it e-mails me, but there is no text > subitted in the e-mail

    What version of php are you using?

    > <? > $MailToAddress = "deanemail.com"; > $MailSubject = "Group volunteer list"; > if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } > $Header = ""; > $Footer = ""; > > foreach($_POST as $key => $val) > { > $val = stripslashes($val); > $Message .= "$key = $val\n"; > }

    What do you see when you: print_r($_POST)

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

    /* <JALH> regex are more than some crappy posix thing <JALH> they are an art form

    - Marc Zealey on #kernelnewbies */

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

    attached mail follows:


    Create a new php file and just put the following in it:

    <?php phpinfo(); ?>

    should get you all the info you need

    Cheers

    Lee ----- Original Message ----- From: "Dean Ouellette" <deanouellette.ws> To: <php-generallists.php.net> Sent: Sunday, July 21, 2002 9:08 PM Subject: RE: [PHP] No text in form submission

    > Is there a way to tell, just contacted my host and they do not know, > they said they could look it up Monday when back in office > > -----Original Message----- > From: Jason Wong [mailto:php-generalgremlins.com.hk] > Sent: Sunday, July 21, 2002 2:26 PM > To: php-generallists.php.net > Subject: Re: [PHP] No text in form submission > > On Monday 22 July 2002 01:52, Dean Ouellette wrote: > > Been working on trying to get form submission to work. > > > > Now have it so when click enter it e-mails me, but there is no text > > subitted in the e-mail > > What version of php are you using? > > > <? > > $MailToAddress = "deanemail.com"; > > $MailSubject = "Group volunteer list"; > > if (!$MailFromAddress) { > > $MailFromAddress = "$email"; > > } > > $Header = ""; > > $Footer = ""; > > > > foreach($_POST as $key => $val) > > { > > $val = stripslashes($val); > > $Message .= "$key = $val\n"; > > } > > What do you see when you: print_r($_POST) > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > <JALH> regex are more than some crappy posix thing > <JALH> they are an art form > > - Marc Zealey on #kernelnewbies > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    PHP Version 3.0.16

    -----Original Message----- From: Jason Wong [mailto:php-generalgremlins.com.hk] Sent: Sunday, July 21, 2002 2:26 PM To: php-generallists.php.net Subject: Re: [PHP] No text in form submission

    On Monday 22 July 2002 01:52, Dean Ouellette wrote: > Been working on trying to get form submission to work. > > Now have it so when click enter it e-mails me, but there is no text > subitted in the e-mail

    What version of php are you using?

    > <? > $MailToAddress = "deanemail.com"; > $MailSubject = "Group volunteer list"; > if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } > $Header = ""; > $Footer = ""; > > foreach($_POST as $key => $val) > { > $val = stripslashes($val); > $Message .= "$key = $val\n"; > }

    What do you see when you: print_r($_POST)

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

    /* <JALH> regex are more than some crappy posix thing <JALH> they are an art form

    - Marc Zealey on #kernelnewbies */

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

    attached mail follows:


    Tell your web hosting company to do an upgrade...or find a different hosting co...

    .: B i g D o g :.

    ----- Original Message ----- From: "Dean Ouellette" <deanouellette.ws> To: <php-generallists.php.net> Sent: Sunday, July 21, 2002 2:20 PM Subject: RE: [PHP] No text in form submission

    > PHP Version 3.0.16 > > -----Original Message----- > From: Jason Wong [mailto:php-generalgremlins.com.hk] > Sent: Sunday, July 21, 2002 2:26 PM > To: php-generallists.php.net > Subject: Re: [PHP] No text in form submission > > On Monday 22 July 2002 01:52, Dean Ouellette wrote: > > Been working on trying to get form submission to work. > > > > Now have it so when click enter it e-mails me, but there is no text > > subitted in the e-mail > > What version of php are you using? > > > <? > > $MailToAddress = "deanemail.com"; > > $MailSubject = "Group volunteer list"; > > if (!$MailFromAddress) { > > $MailFromAddress = "$email"; > > } > > $Header = ""; > > $Footer = ""; > > > > foreach($_POST as $key => $val) > > { > > $val = stripslashes($val); > > $Message .= "$key = $val\n"; > > } > > What do you see when you: print_r($_POST) > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > <JALH> regex are more than some crappy posix thing > <JALH> they are an art form > > - Marc Zealey on #kernelnewbies > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    I have a different host I use for my sites, this is one I took over, and they insist I use this hosting company, friend of an owner. Have been trying to get to switch but wont. So any ideas on how can get this to work, no text coming in email

    When I print_r($_POST) ((((what does that do?))) I get

    print_r($_POST) Fatal error: Call to unsupported or undefined function foreach() in /www/docs/www.electjoemarine.com/email.php on line 71

    > PHP Version 3.0.16 > > <? > > $MailToAddress = "deanemail.com"; > > $MailSubject = "Group volunteer list"; > > if (!$MailFromAddress) { > > $MailFromAddress = "$email"; > > } > > $Header = ""; > > $Footer = ""; > > > > foreach($_POST as $key => $val) > > { > > $val = stripslashes($val); > > $Message .= "$key = $val\n"; > > } > > What do you see when you: print_r($_POST) > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > <JALH> regex are more than some crappy posix thing > <JALH> they are an art form > > - Marc Zealey on #kernelnewbies > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    >Been working on trying to get form submission to work. > >Now have it so when click enter it e-mails me, but there is no text >subitted in the e-mail > >Any ideas? ><? >$MailToAddress = "deanemail.com"; >$MailSubject = "Group volunteer list"; >if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } >$Header = ""; >$Footer = ""; >

    var_dump($_POST); reset($_POST); echo "_POST isset? ", isset($_POST), "<BR>\n";

    >foreach($_POST as $key => $val) > { > $val = stripslashes($val); > $Message .= "$key = $val\n"; > } > >if ($Header) { >$Message = $Header."\n\n".$Message; >} > >if ($Footer) { >$Message .= "\n\n".$Footer; >} > >mail($MailToAddress, $MailSubject, $Message, "From: >{$MailFromAddress}"); ?> >

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    > I have a different host I use for my sites, this is one I took over, and > they insist I use this hosting company, friend of an owner. Have been > trying to get to switch but wont. So any ideas on how can get this to > work, no text coming in email > > When I print_r($_POST) ((((what does that do?))) > I get

    $_POST doesn't exist in PHP 3. Use $HTTP_POST_VARS. Also check your settings of track_vars and register_globals in PHP.ini (or your phpinfo() page). Check the manual on what each of those settings mean and how they affect your script, too.

    http://www.php.net/manual/en/configuration.php

    ---John Holmes...

    attached mail follows:


    Create a file with phpinfo() in it.

    Justin

    on 22/07/02 6:08 AM, Dean Ouellette (deanouellette.ws) wrote:

    > Is there a way to tell, just contacted my host and they do not know, > they said they could look it up Monday when back in office

    attached mail follows:


    Hello,

    the most difference between php 4 and php 5 is the new zend engine - right? As far as i know (Alexey Zakhlestine told me) does the new php 4.3 release already include zend engine 2. My question is now: Will there be a completly new documentation for php 5 (or the new engine)? Or will the new functions and the new syntax rules just be added to the regular doc? When do you think will the completed doc be online?

    When will php 5 be released?

    Thanks for your answers!

    Joey

    attached mail follows:


    Why don't you just hit up the php.net website for answers to most of these questions?

    tyler

    On Sun, 21 Jul 2002 20:02:54 +0200 "Joey" <joey.brunnergmx.net> wrote:

    > Hello, > > the most difference between php 4 and php 5 is the new zend engine - > right? As far as i know (Alexey Zakhlestine told me) does the new php > 4.3 release already include zend engine 2. My question is now: > Will there be a completly new documentation for php 5 (or the new > engine)? Or will the new functions and the new syntax rules just be > added to the regular doc? When do you think will the completed doc be > online? > > When will php 5 be released? > > Thanks for your answers! > > Joey > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hi,

    I just found that page : http://www.php.net/source.php?url=/zend2_example.phps Thats all, but it does not answer my questios. If I didn´t find a page, i am really sorry, but i searched a lot.

    I hope you can answer some of these questions.

    thx Joey "Tyler Longren" <tylercaptainjack.com> schrieb im Newsbeitrag news:20020721133156.6a702200.tylercaptainjack.com... > Why don't you just hit up the php.net website for answers to most of > these questions? > > tyler > > On Sun, 21 Jul 2002 20:02:54 +0200 > "Joey" <joey.brunnergmx.net> wrote: > > > Hello, > > > > the most difference between php 4 and php 5 is the new zend engine - > > right? As far as i know (Alexey Zakhlestine told me) does the new php > > 4.3 release already include zend engine 2. My question is now: > > Will there be a completly new documentation for php 5 (or the new > > engine)? Or will the new functions and the new syntax rules just be > > added to the regular doc? When do you think will the completed doc be > > online? > > > > When will php 5 be released? > > > > Thanks for your answers! > > > > Joey > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    >the most difference between php 4 and php 5 is the new zend engine - right?

    Don't know. The changes are documented in the ChangeLog available in CVS at http://cvs.php.net and on pages linked from the home page of PHP http://php.net/

    I reckon you can read them as well as I can.

    >As far as i know (Alexey Zakhlestine told me) does the new php 4.3 release >already include zend engine 2. My question is now: >Will there be a completly new documentation for php 5 (or the new engine)? >Or will the new functions and the new syntax rules just be added to the >regular doc? When do you think will the completed doc be online? > >When will php 5 be released?

    Past upgrades have remained largely backwards-compatible, and I expect PHP 4.3/5 to also do so. There will always be exceptions for various reasons.

    In the past, upgrades to PHP have simply altered the existing on-line manual. I would expect that the next version would also do so, but only the PHP Documentation team would know for sure.

    There will never, ever, be a completed documentation for PHP on-line, or anywhere else :-) Generally, the PHP docs "lag" behind the actual functions by a few weeks or so, depending on who wrote the functions, and how many people use/need those functions. Functions with few users and/or more complicated interfaces may lag woefully behind average. Feel free to join the documentation team and reduce this lag time. :-)

    I trolled for answers to the "when will PHP 5 happen" in the PHP-Dev list recently. Use the archives. Search for "tea leaves" to find the thread. YMMV. Note that all the answers, if any were public, were "off the record"

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Hi all, I am newbie in PHP. I am just learning the PHP through tutorials and this mailing list. I have very first goal of doing one project "Design web-based survey" using PHP and MySQL. I would appreciate if anybody give me some links that help to develope such skills.

    Thanks and sorry for asking a lazy question.

    Dipendra

    __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com

    attached mail follows:


    > I am newbie in PHP. I am just learning the PHP >through tutorials and this mailing list. I have very >first goal of doing one project "Design web-based >survey" using PHP and MySQL. I would appreciate if >anybody give me some links that help to develope such >skills.

    Search the code archives linked from http://php.net/links.php

    You will doubtless find a *LOT* of web-based Survey packages in varying stages of complexity and completion within them.

    Here, however, is yet another free one to get you started:

    <HTML><BODY> <?php require 'connect.inc'; # This file is in your home dir and has in it: # <?php $connection = mysql_connect('localhost', 'USERNAME', 'PASSWORD');?> # Change your include_path in .htaccess or php.ini PHP can find that file. $answer = substr($answer, 0, 1); $answer = strtolower($answer); if ($answer != 'y'){ echo "Wrong answer.<BR>\n"; } $query = "insert into answers (answer) value('$answer')"; $insert = mysql_query($query, $connection) or error_log(mysql_error()); if (!$insert){ "Unable to record your answer. Ask the site administrator to read his Apache error_log.<BR>\n"; } else{ echo "Thanks for filling out our Survey!<BR>\n"; } if (!isset($answer) || $answer != 'y'){ ?> <FORM ACTION=<?=$PHP_SELF?> METHOD=POST> Should I have searched the archives and code repositories before posting to PHP-General?<BR> <INPUT TYPE=RADIO NAME=answer VALUE=y CHECKED> Yes<BR> <INPUT TYPE=RADIO NAME=answer VALUE=n> No<BR> <INPUT TYPE=SUBMIT> </FORM> <?php } ?> </BODY></HTML>

    PS The logical error some readers will think they have spotted on lines 10 and 21 is not, in fact, a bug at all. :-)

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    I have some pages which include a number of files. In one of the include files I have a function which I wish to be executed everytime the include file is loaded.

    Therefore I place the function name in the include file at the top.

    However, this function uses a session variable to decide whether to call another function and it appears that this variable is not being carried across. For example, the start of the include file might look like this:-

    <?php

    checkMaster();

    function checkMaster() { global $master_session; if ($master_session[db_host]) { connectToDB(); } }

    function connectToDB() { ... ....

    The master_session variable is not set and hence connectToDB is never called. If I place the checkMaster code in each page that includes this file then it all works fine. How do I get round this?

    Thanks.

    jon.

    Better than having your body rubbed vigorously with a cheese grater. http://www.samuri.co.uk.

    _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

    attached mail follows:


    Hmm. Here's how you can make it load EVERYtime the file is included, plain and simply. In the include file, create the function.and the call it after you've made it. To get the other function to work, you might want to try placing the function ABOVE checkMaster(); (you should probably simply put that in the same file, but above it). functions.php <? function myfunction () {}

    myfunction(); ?>

    I have the feeling that the problem with the session variable is that you're calling it before anything has been done to define it in the main page, so it is null when you check it. Try debugging it with echo statements here and there that call out variables so that you know they're defined correctly. Also, turn on "error_reporting(E_ALL);" (you can simply call it at the top of the page--first thing). That will tell you when variables are used if they're null and other errors that aren't fatal, but might cause problems.

    "Jon Wyatt" <samur2hotmail.com> wrote in message news:F85oN3d4OMMLUDDxjU000019f21hotmail.com... > > I have some pages which include a number of files. > In one of the include files I have a function which I wish to be executed > everytime the include file is loaded. > > Therefore I place the function name in the include file at the top. > > However, this function uses a session variable to decide whether to call > another function and it appears that this variable is not being carried > across. For example, the start of the include file might look like this:- > > > <?php > > checkMaster(); > > > function checkMaster() > { > global $master_session; > if ($master_session[db_host]) > { > connectToDB(); > } > } > > > function connectToDB() > { > ... > .... > > > The master_session variable is not set and hence connectToDB is never > called. > If I place the checkMaster code in each page that includes this file then it > all works fine. How do I get round this? > > Thanks. > > jon. > > Better than having your body rubbed vigorously with a cheese grater. > http://www.samuri.co.uk. > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx >

    attached mail follows:


    I think that you need to call the checkMaster() function AFTER you declare it, not before. Try moving "checkMaster();" beneath the function definition.

    Mick

    On Sun, 21 Jul 2002, Jon Wyatt wrote:

    > > I have some pages which include a number of files. > In one of the include files I have a function which I wish to be executed > everytime the include file is loaded. > > Therefore I place the function name in the include file at the top. > > However, this function uses a session variable to decide whether to call > another function and it appears that this variable is not being carried > across. For example, the start of the include file might look like this:- > > > <?php > > checkMaster(); > > > function checkMaster() > { > global $master_session; > if ($master_session[db_host]) > { > connectToDB(); > } > } > > > function connectToDB() > { > ... > .... > > > The master_session variable is not set and hence connectToDB is never > called. > If I place the checkMaster code in each page that includes this file then it > all works fine. How do I get round this? > > Thanks. > > jon. > > Better than having your body rubbed vigorously with a cheese grater. > http://www.samuri.co.uk. > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > >

    -- 
    --------------------------------
    n   i   n   t   i  .   c   o   m
    php-python-perl-mysql-postgresql
    --------------------------------
    Michael Hall     nintininti.com
    --------------------------------
    

    attached mail follows:


    http://www.hotscripts.com/PHP/Tips_and_Tutorials/Image_Manipulation/

    ----- Original Message ----- From: "Alawi" <alawiphp4web.com> To: <php-generallists.php.net> Sent: Sunday, July 21, 2002 4:40 PM Subject: [PHP] write some text over image

    > Hi > how can I write some text on the left corner of the image? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    >how can I write some text on the left corner of the image?

    http://php.net/image

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Sorry that I write your prov address but it seems to me that you >are quite like guru in PHP so I would like to share with you with >my problem and i would be glad to hear from you where and what >kind of problem there is.

    I don't use Classes.

    > $this=&$GLOBALS["cache"];

    I would not expect this to work. PHP is going to finalize and return the class, and you're assignment to $this is meaningless.

    If you want this to work, you'll have to do more like this:

    <?php $cache = array(); function new_A(); global $cache; if (!isset($cache['A'])){ $cache['A'] = new A(); } return $cache['A']; } ?>

    In other words, keep your cache "external" to the actual object implementation.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    On Sun, 21 Jul 2002, Richard Lynch wrote: ++>I don't use Classes. How it is possible?:))) I prefer OOP and I use it as much as possible even in PHP ++>> $this=&$GLOBALS["cache"]; ++>I would not expect this to work. ++>PHP is going to finalize and return the class, and you're assignment to ++>$this is meaningless. Oh...you can do everything with this in PHP. $this="text",$this=new B(); and it have a sense - j want to replace an object with another. (but i know that it is not supported by other languages) ++> ++>If you want this to work, you'll have to do more like this: it is some solution... ++><?php ++> $cache = array(); ++> function new_A(); ++> global $cache; ++> ++> if (!isset($cache['A'])){ ++> $cache['A'] = new A(); ++> } ++> return $cache['A']; ++> } ++>?> ++> ++>In other words, keep your cache "external" to the actual object ++>implementation. ++> ++>

    -- 
    --
                                         pozdr
                                            Rad0s
    

    Radek Gajewski rgajewsgh.waw.pl GG:694459 ICQ:110153822 --------------------------------------------------------

    attached mail follows:


    >Hi Gurus, > >I am using PHP 4.1.1, Postgresql 7.2 and Perl 5.6.0 on Linux. > >I want to execute a perl script throgh a PHP, which will take backup of the >database after submit button on the PHP is clicked. > >I am using exec command, but as PHP runs as "nobody" user, it does not have >access to Postgres database. So it creates a file of 0 byte. > >Can anybody tell me how to change user for execution of a particular PHP, or >is there any other alternative. > >Thanking you in anticipation.

    If you're going to do this from a web-page, you will need some kind of shell script with 'sudo' (man sudo) permissions to do what needs to be done.

    *OR* add a new mime-type to your httpd.conf that runs PHP as a CGI as the 'postgres' user which *does* have permission to do this.

    *OR* alter the permissions of pg_dump to be world-executable, and of the directory where the files are stored as well.

    *OR* just pass in the username/password using -U to pg_dump (man pg_dump)

    *OR* ...

    There's a zillion ways to skin this cat, but which is least risky (or even possible) depends on who can access the box, who can access the web page, and whether or not you have root access on the box.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Hi all. I have this form with some dynamically made fields. One of them >fields is truly making me nuts. The thing is, I have a table in which I >store the user id, the development language he/she uses and the time >he/she has been using it. Something like this: > >+--------+--------+------------------+-------------------------+ >| expid | devid | devlanguage | devtime | >+--------+--------+------------------+-------------------------+ >| 1 | 1 | PHP | less than 1 year | >| 2 | 1 | MySQL | less than 1 year | >| 3 | 1 | HTML | more than 5 years | >+--------+------+--------------------+-------------------------+ > >Now, in the HTML form I want to display each language along with a >checkbox for selection and a dropdown with a list of time periods. Some >tough me in this list about naming the form fields like “language[]” in

    Don't use just language[] Use language[$devid]

    >order to create an array and use it when it was not empty. Fine, the >thing is that I also want to display a list of some 3 blank textboxes >along with time periods drop downs so anyone who knows another language >can add it to the list... the questions are as follows: > >1) What would be the best approach to do this and how should I >call all the checkboxes, textfields and drop downs?

    Same answer. Use some reasonable variable name, with [$devid] after it.

    >2) How can I manage them after the form was submitted?

    while (list($dev_id, $lang) = each($language)){ }

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    +--------+--------+------------------+-------------------------+ | expid | devid | devlanguage | devtime | +--------+--------+------------------+-------------------------+ | 1 | 1 | PHP | less than 1 year | | 2 | 1 | MySQL | less than 1 year | | 3 | 1 | HTML | more than 5 years | +--------+------+--------------------+-------------------------+

    I'll use that as the template:

    I'll assume that you know how to get the expid and devid in there and I'll just put them in there as numbers. <? $devselect = "<SELECT NAME=\"devtime[]\" SIZE=\"1\"> <OPTION VALUE=\"<1y\">Less than 1 year <OPTION VALUE=\">5y\">More than 5 years etc </SELECT>";?>

    <FORM><TABLE> <TR> <TH>expid</TH><TH>devid</TH><TH>devlangu</TH><TH>devtime</TH> </TR> <!-- a loop will generate each new row --> <TR> <TD>1</TD><TD>1</TD><TD><?=$LanguageName[$expid]?><INPUT TYPE="Check"<? if ($UserKnows[$expid]) { echo " CHECKED"; }?> VALUE="language[]"></TD><TD><?=$devselect?></TD> </TR> <!-- this will end what the loop outputs --> <TR> <TD>2</TD><TD>1</TD><TD><?=$LanguageName[$expid]?><INPUT TYPE="Check"<? if ($UserKnows[$expid]) { echo " CHECKED"; }?> VALUE="language[]"></TD><TD><?=$devselect?></TD> </TR> etc... <!-- here's the hardcoded extras --> <TD>-</TD><TD>1</TD><TD><INPUT TYPE="Text" NAME="DevSetLang[]" VALUE=""><TD><?=$devselect?></TD> etc.. </TABLE></FORM>

    Now you can access them by (I think) doing something like this: if (!empty($_POST["language"][0])) // (I think that check boxes give "" if they're not checked) if (!empty($_POST["DevSetLang"][0])) // you might consider making a separate "devselect" variable for the text boxes, which will make it easier to check (the array index will work easier)

    I hope that that helps.

    attached mail follows:


    >Instead of outputting a header to redirect the browser would it be safer to >use the meta-refresh tag? > >The reason I ask is because I heard that some versions of IE have trouble >with the header

    There are probable even more browsers that can't handle the META tag...

    Which versions of IE is somebody claiming can't handle a Location: header?

    Cuz, like, even IE *CAN'T* be that broken, can it?

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    You have to use a FOR or WHILE loop. PHP 3 doesn't supported the foreach loop.

    You can get identical results by using the examples here: http://www.php.net/manual/en/control-structures.foreach.php

    "Dean Ouellette" <deanouellette.ws> wrote in message news:000b01c230f5$7837aa70$9c89adacyoda... > I have a different host I use for my sites, this is one I took over, and > they insist I use this hosting company, friend of an owner. Have been > trying to get to switch but wont. So any ideas on how can get this to > work, no text coming in email > > When I print_r($_POST) ((((what does that do?))) > I get

    print_r shows everything in the array on the screen.

    > print_r($_POST) > Fatal error: Call to unsupported or undefined function foreach() in > /www/docs/www.electjoemarine.com/email.php on line 71 > > > PHP Version 3.0.16 > > > <? > > > $MailToAddress = "deanemail.com"; > > > $MailSubject = "Group volunteer list"; > > > if (!$MailFromAddress) { > > > $MailFromAddress = "$email"; > > > } > > > $Header = ""; > > > $Footer = ""; > > > > > > foreach($_POST as $key => $val) > > > { > > > $val = stripslashes($val); > > > $Message .= "$key = $val\n"; > > > } > > > > What do you see when you: print_r($_POST)

    I believe it says "Array ( $whatevertheKEYis => $theVALUE, $nextKEY => $nextValue)" on screen for it. Basically, it makes it so you could copy and paste it and create a replica of THAT array. Mostly used for debugging.

    attached mail follows:


    How can I do this

    I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this <FORM ACTION="/cgi-bin/siteUserEmail/siteUserEmail.cgi" METHOD="POST">

    <FORM ACTION="siteUserEmail.php" METHOD="POST"> <INPUT TYPE="TEXT" NAME="forwardaddr" SIZE="32" VALUE=""> <TEXTAREA NAME="aliases" ROWS="5" COLS="32"></TEXTAREA> <INPUT TYPE="CHECKBOX" NAME="vacationmode" VALUE="on" > <TEXTAREA NAME="vacationmsg" ROWS="5" COLS="32"></TEXTAREA>> <INPUT TYPE="HIDDEN" NAME="name" SIZE="-1" VALUE="tester54321"> <INPUT TYPE="HIDDEN" NAME="group" SIZE="-1" VALUE="site53"> <INPUT TYPE="HIDDEN" NAME="page" SIZE="-1" VALUE="siteuseremail"> <input type="submit" name="Submit" value="submit"> </FORM>

    The siteUserEmail.php file <? $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg &name=$name&group=$group&page=$page"; exec($cmd); ?>

    -- 
    Best regards,
     rdkurth                          mailto:rdkurthstarband.net
    

    attached mail follows:


    In your example you are using the method of POST to pass the form data to the cgi script. However, when you pass the data to the cgi script from the php script you are using the GET method to pass the data.

    Check and see if the cgi can accept with METHOD="GET"

    .: B i g D o g :.

    ----- Original Message ----- From: <rdkurthstarband.net> To: "php-general" <php-generallists.php.net> Sent: Sunday, July 21, 2002 5:46 PM Subject: [PHP] Submitting to cgi script

    > How can I do this > > I have a form that I want to submit to a second php script that in turn > submits to a cgi script but I can not get it to work. If I submit > from the form to the cgi script it works just fine. But there are > something that I need to do with the data besides submitting to the > cgi script. Could you look at the sample code below and see if I am > doing something wrong. I hope this makes sense I am not quit sure how > to ask what I want to know > If I was submitting directly to the cgi script the form action would > look like this > <FORM ACTION="/cgi-bin/siteUserEmail/siteUserEmail.cgi" METHOD="POST"> > > > > <FORM ACTION="siteUserEmail.php" METHOD="POST"> > <INPUT TYPE="TEXT" NAME="forwardaddr" SIZE="32" VALUE=""> > <TEXTAREA NAME="aliases" ROWS="5" COLS="32"></TEXTAREA> > <INPUT TYPE="CHECKBOX" NAME="vacationmode" VALUE="on" > > <TEXTAREA NAME="vacationmsg" ROWS="5" COLS="32"></TEXTAREA>> > <INPUT TYPE="HIDDEN" NAME="name" SIZE="-1" VALUE="tester54321"> > <INPUT TYPE="HIDDEN" NAME="group" SIZE="-1" VALUE="site53"> > <INPUT TYPE="HIDDEN" NAME="page" SIZE="-1" VALUE="siteuseremail"> > <input type="submit" name="Submit" value="submit"> > </FORM> > > The siteUserEmail.php file > <? > $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr > &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg > &name=$name&group=$group&page=$page"; > exec($cmd); > ?> > -- > Best regards, > rdkurth mailto:rdkurthstarband.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Hello B, I just submitted directly to the cgi script and did it with a GET and it worked so that is not the problem. Any other suggestions

    Sunday, July 21, 2002, 4:52:09 PM, you wrote:

    BigDog> In your example you are using the method of POST to pass the form data to BigDog> the cgi script. However, when you pass the data to the cgi script from the BigDog> php script you are using the GET method to pass the data.

    BigDog> Check and see if the cgi can accept with METHOD="GET"

    BigDog> .: B i g D o g :.

    BigDog> ----- Original Message ----- BigDog> From: <rdkurthstarband.net> BigDog> To: "php-general" <php-generallists.php.net> BigDog> Sent: Sunday, July 21, 2002 5:46 PM BigDog> Subject: [PHP] Submitting to cgi script

    >> How can I do this >> >> I have a form that I want to submit to a second php script that in turn >> submits to a cgi script but I can not get it to work. If I submit >> from the form to the cgi script it works just fine. But there are >> something that I need to do with the data besides submitting to the >> cgi script. Could you look at the sample code below and see if I am >> doing something wrong. I hope this makes sense I am not quit sure how >> to ask what I want to know >> If I was submitting directly to the cgi script the form action would >> look like this >> <FORM ACTION="/cgi-bin/siteUserEmail/siteUserEmail.cgi" METHOD="POST"> >> >> >> >> <FORM ACTION="siteUserEmail.php" METHOD="POST"> >> <INPUT TYPE="TEXT" NAME="forwardaddr" SIZE="32" VALUE=""> >> <TEXTAREA NAME="aliases" ROWS="5" COLS="32"></TEXTAREA> >> <INPUT TYPE="CHECKBOX" NAME="vacationmode" VALUE="on" > >> <TEXTAREA NAME="vacationmsg" ROWS="5" COLS="32"></TEXTAREA>> >> <INPUT TYPE="HIDDEN" NAME="name" SIZE="-1" VALUE="tester54321"> >> <INPUT TYPE="HIDDEN" NAME="group" SIZE="-1" VALUE="site53"> >> <INPUT TYPE="HIDDEN" NAME="page" SIZE="-1" VALUE="siteuseremail"> >> <input type="submit" name="Submit" value="submit"> >> </FORM> >> >> The siteUserEmail.php file >> <? >> $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr >> &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg >> &name=$name&group=$group&page=$page"; >> exec($cmd); >> ?> >> -- >> Best regards, >> rdkurth mailto:rdkurthstarband.net >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    Best regards,
     rdkurth                            mailto:rdkurthstarband.net
    

    attached mail follows:


    Instead of doing it as a command, try it through the webserver....

    <?php

    header( "Location: http://localhost/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwar daddr&aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg&n ame=$name&group=$group&page=$page" );

    ?>

    Or you can use something else...but send it to the web server...

    .: B i g D o g :.

    ----- Original Message ----- From: <rdkurthstarband.net> To: "B i g D o g" <bigdogventicon.com>; "php-general" <php-generallists.php.net> Sent: Sunday, July 21, 2002 6:15 PM Subject: Re[2]: [PHP] Submitting to cgi script

    > Hello B, > I just submitted directly to the cgi script and did it with a GET and > it worked so that is not the problem. Any other suggestions > > Sunday, July 21, 2002, 4:52:09 PM, you wrote: > > > BigDog> In your example you are using the method of POST to pass the form data to > BigDog> the cgi script. However, when you pass the data to the cgi script from the > BigDog> php script you are using the GET method to pass the data. > > BigDog> Check and see if the cgi can accept with METHOD="GET" > > BigDog> .: B i g D o g :. > > > BigDog> ----- Original Message ----- > BigDog> From: <rdkurthstarband.net> > BigDog> To: "php-general" <php-generallists.php.net> > BigDog> Sent: Sunday, July 21, 2002 5:46 PM > BigDog> Subject: [PHP] Submitting to cgi script > > > >> How can I do this > >> > >> I have a form that I want to submit to a second php script that in turn > >> submits to a cgi script but I can not get it to work. If I submit > >> from the form to the cgi script it works just fine. But there are > >> something that I need to do with the data besides submitting to the > >> cgi script. Could you look at the sample code below and see if I am > >> doing something wrong. I hope this makes sense I am not quit sure how > >> to ask what I want to know > >> If I was submitting directly to the cgi script the form action would > >> look like this > >> <FORM ACTION="/cgi-bin/siteUserEmail/siteUserEmail.cgi" METHOD="POST"> > >> > >> > >> > >> <FORM ACTION="siteUserEmail.php" METHOD="POST"> > >> <INPUT TYPE="TEXT" NAME="forwardaddr" SIZE="32" VALUE=""> > >> <TEXTAREA NAME="aliases" ROWS="5" COLS="32"></TEXTAREA> > >> <INPUT TYPE="CHECKBOX" NAME="vacationmode" VALUE="on" > > >> <TEXTAREA NAME="vacationmsg" ROWS="5" COLS="32"></TEXTAREA>> > >> <INPUT TYPE="HIDDEN" NAME="name" SIZE="-1" VALUE="tester54321"> > >> <INPUT TYPE="HIDDEN" NAME="group" SIZE="-1" VALUE="site53"> > >> <INPUT TYPE="HIDDEN" NAME="page" SIZE="-1" VALUE="siteuseremail"> > >> <input type="submit" name="Submit" value="submit"> > >> </FORM> > >> > >> The siteUserEmail.php file > >> <? > >> $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr > >> &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg > >> &name=$name&group=$group&page=$page"; > >> exec($cmd); > >> ?> > >> -- > >> Best regards, > >> rdkurth mailto:rdkurthstarband.net > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > Best regards, > rdkurth mailto:rdkurthstarband.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    If you want to use ereg just [:space:] ... I'm not too sure about what to do with the Perl one.

    "Justin French" <justinindent.com.au> wrote in message news:B96059E8.AF67%justinindent.com.au... > Is this the best way to check if a $char is ANY FORM OF WHITESPACE (space, > \t, \r, \n, etc etc)? > > > if(preg_match('/\s/', $char)) > { > ... > } > > ?? > > > Thanks > Justin >

    attached mail follows:


    Rite,

    There's a PHP script that takes a monochrome BMP and converts it into some sort of hex code and I've noticed some patterns with this code. This image is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, theres 252 chars, which is 1008 divided by 4.

    So I guessed the image is split into 4 pixels each. So if I pass an image with the first pixel black and everyhting else white, it returns 8 for those 4. If I pass an image with the first and second black, it returns c.

    With the first three black, it returns e. With the first 4, f. And if I have the 5th pixel black it goes onto the next char code, eg returning f for the first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the next 4. In total it returns f8.

    PS I tried reading in each pixel of the script, checking if it was black or white, 1 for black, 0 for white. Then converting these 0s and 1s from decimal to hex, then converting from binary to hex, but to no avail. Then I tried taking a set of 4 1s or 0s and converting them, but still no luck.

    So my questions is, does anyone know how theyre encoding the image???? I could probably could decipher the coding with some experimentation but it really looks like hex and I might be wasting my time.

    TIA

    attached mail follows:


    When I try to pass a variable from one page to another the variable is completely inaccessible IF I have a session going. The data has to be passed from one page to the next through the link, as the link tells which product the user hit. Any thoughts?

    Mike Mannakee