[PHP] How to choose a crypt-standard in crypt()?
Hi, is it possible to tell php which crypting it should use in crypt()? My problem: The program is running on a linux-server (of course) and there is DES available and MD5; crypt() uses MD5. At home I'm developing on a win98 machine and there seems only DES to be available. Of course it would be usefull to use both times the same encryption - but how to tell the server to use DES?? Thank's for any help, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Handling of constants in strings
Hi, when reading about constants (define('MY_CONSTANT', 'my value')) I got convinced that they are pretty usefull. But now it seems to me, that I can't use them inside a string: $my_string = "This is MY_CONSTANT and I love it!"; but that I must take them out: $my_string = "This is" . MY_CONSTANT . "and I love it!"; Isn't there a way around? And must I suspect more strange things to come with constants? greetings, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Win98, Apache, PHP Config Problem
Hi, I just made the same (even on the same weekend) - it's working now. What exactly is going on and what have you done? With me one problem was (e.g.) that I forgot to set the document root properly in httpd.conf. Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: register_global, need some feedback
Hi, try these: http://www.php.net/manual/en/language.variables.predefined.php#language.vari ables.predefined http://www.php.net/manual/en/reserved.variables.php greetings, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Handling of constants in strings
Richard Lynch schrieb in Nachricht <20020701232114.VOAI6023.sccrmhc02.attbi.com@[192.168.1.103]>... > >Try this: >$my_string = "This is {MY_CONSTANT} and I love it!"; > >Can't promise it will work, mind you... > >It's not all that common to bury constants in strings... And is the extra " >. " K ". " that big a deal? Seems a small price for cleaner code. Thank's Richard, you are right: it's not such a big deal - I was just surprised that I can't integrate constants as variables. A question - since english is not my first language - what do you mean with >It's not all that common to bury constants in strings Is something bad about it? I would e. g. define our name with the formatting tags as a constant or parts of query clauses which will never change but are often used. Greetings, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $name = "My $row['name']" not longer possible?
Hi, I upgraded to 4.2 and now I get those errormessages "Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ..." when doing sth like: $name = "My $row['name']"; Why? greetings, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $name = "My $row['name']" not longer possible?
Hallo Matt, thank you for the explanation and for the manual-link! But - correct if I'm wrong - that has been possible before! Or not? Uwe Matt Schroebel schrieb in Nachricht <4B08FD7DB3CBD4119F560002A508C453015B3851@hsus3>... >> "Parse error: parse error, unexpected >> T_ENCAPSED_AND_WHITESPACE, expecting >> T_STRING or T_VARIABLE or T_NUM_STRING in ..." >> >> when doing sth like: >> $name = "My $row['name']"; > >You have to wrap array references in curly braces within double quoted strings. Proper form is: >$name = "My {$row['name']}"; > >See: http://www.php.net/manual/en/language.types.string.php#language.types.string .parsing.complex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to pass unknown number of variables to a function?
Hi everybody on this rainy morning! My problem: I give the user a form with a list of options with checkboxes. The list is long and not predictable - the values change always. I want to put the checked values (or all, that doesn't matter) in an array, to pass it to my function. How can I write those keys and values in an array? I suppose it will be best done with JS - but since I don't know JS ... Has anybody a ready solution? Thank's a lot! Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Handling of constants in strings
Miguel Cruz schrieb in Nachricht ... >On Tue, 2 Jul 2002, Uwe Birkenhain wrote: >> A question - since english is not my first language - what do you mean with >> >It's not all that common to bury constants in strings >> >> Is something bad about it? > >I think so. It would slow parsing down to a crawl and create a host of >ambiguities if every letter that ever appeared in a string had to be >compared against the list of defined constants (after all, you might have >a constant called 'a'). With normal variables, it only has to worry about >it when there's a $ before it or {} around it, which is much simpler. > >miguel Yeah, you are right about that! But since you have to take the constant out of the string (with {} or ". .") it shouldn't be a problem to use constants. Correct? Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to pass unknown number of variables to a function?
Thank's for the help everybody! I used something different (a little like this nice one from Terence (thank you!) but with JS: I named my form 'test' and included a hidden field 'collector'. At the checkboxes the name is the value I need. The box, when checked, gets the value 1. In the boxtags I added: onclick=add_values($name) where name is the value I want. Then I wrote this little script: $js = " function add_values(val) { document.test.'collector'.value += val; document.test.'collector'.value += \",\"; } "; It produces a comma separated list in the field 'collector' whith only the checked values. When sending the form, only this field is transmitted. This is just what I wanted and it works fine. Uwe Terence Kearns schrieb in Nachricht <[EMAIL PROTECTED]>... >This is a nice easy one :) > >It couldn't be simpler. > >Just put empty square brackets (as used in arrays) in front of your >checkbox name. >The example below assumes you have PHP 4.1 or greater (which uses >$_POST to contain form posted data) >notice how name="ck[]" > > > > > Untitled > > > >if(count($_POST)) { >foreach ($_POST["ck"] as $varval) { >print("".$varval.""); > } >} >?> > > > > > > > > > > > > > > > > > >in earlier versions of PHP, $_POST["ck"] would be equal to $ck >(although, the former is safer) > > >On Thu, 4 Jul 2002 10:52:37 +0200, "Uwe Birkenhain" ><[EMAIL PROTECTED]> said: >> Hi everybody on this rainy morning! >> >> My problem: >> I give the user a form with a list of options with checkboxes. >> The list is long and not predictable - the values change always. >> I want to put the checked values (or all, that doesn't matter) in an >> array, >> to pass it to my function. >> >> How can I write those keys and values in an array? >> >> I suppose it will be best done with JS - but since I don't know JS ... >> Has anybody a ready solution? >> >> Thank's a lot! >> >> Uwe >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > >[TK] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Development Tools
I think that - on windows - nothing is better than textpad (www.textpad.com). Simply the best editor the world has seen so far! What makes development tools better than a good editor? (serious question) Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php