Re: [PHP] How do I display new lines in a textearea?

2003-06-06 Thread Petre Agenbag
Hi Thanks, I DID use \n, BUT, I made a stupid mistake, I did: And the literal ' did not "parse" the \n, replacing with " works fine... On Thu, 2003-06-05 at 16:32, CPT John W. Holmes wrote: > > I want to have a textarea that contains details read from a mysql table, > > but I want to echo

Re: [PHP] How do I display new lines in a textearea?

2003-06-06 Thread CPT John W. Holmes
> I want to have a textarea that contains details read from a mysql table, > but I want to echo each row so that it is on a new line. What is the > "new-line" character for a textarea? ( in effect the reverse of nl2br() A newline is \n $text = "word\nword\nword\n"; echo "$word"; will have each

[PHP] How do I display new lines in a textearea?

2003-06-06 Thread Petre Agenbag
Hi I want to have a textarea that contains details read from a mysql table, but I want to echo each row so that it is on a new line. What is the "new-line" character for a textarea? ( in effect the reverse of nl2br() ) Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] How do I grab the first X characters of a string?

2003-06-04 Thread Jay Blanchard
RTFM http://us2.php.net/manual/en/function.substr.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How do I grab the first X characters of a string?

2003-06-04 Thread Erich Kolb
How do I grab the first X characters of a string? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how do I strip out data from a url?

2003-04-04 Thread Leif K-Brooks
//Beware, untested! preg_match('|.*([0-9]{10}).*|',$_SERVER['HTTP_REFERER'],$matches); $number = $matches[1]; Damon wrote: Hi, I have a realatively easy problem that I need help on. I want to take a 10-digit number out of a referring url and put it in a variable. Eg. www.jimmy.com/mypage/xy

[PHP] how do I strip out data from a url?

2003-04-04 Thread Damon
Hi, I have a realatively easy problem that I need help on. I want to take a 10-digit number out of a referring url and put it in a variable. Eg. www.jimmy.com/mypage/xyz0123456789xyz/index.php I just need the 10-digit number from this string. Thanks! Damon -- PHP General Mailing List (ht

Re: [PHP] How do i valadate an email address?

2003-03-27 Thread Jason Wong
On Thursday 27 March 2003 14:44, Philip J. Newman wrote: > How would i check that an e-mail has the right parts in it. for example. > > username @ domain . ext You would check the archives because this has been covered more times than I have fingers to keep count with. -- Jason Wong -> Gremlins

Re: [PHP] How do i valadate an email address?

2003-03-27 Thread AzFLSite
I keep forgetting to do the reply to all thing! :) Here it is for anyone else as well. if (!eregi('[EMAIL PROTECTED],5}$',$email)) { echo 'Invalid email address'; } else { //do whatever } That should do it. Sometimes I get these wrong off the top of my head. Silly >--- "Philip J. Newman" <

[PHP] How do i valadate an email address?

2003-03-26 Thread Philip J. Newman
How would i check that an e-mail has the right parts in it. for example. username @ domain . ext Thanks / Jim Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
By including "\n" the html source looks like this, which is fine. I'll RTFM about $_SERVER and post back if in trouble. Thanks for help. Stephen $_SERVER['PHP_SELF']= $_SERVER['SCRIPT_NAME'] (etc)= __FILE__=/path/sfindex03.php $SCRIPT_FILENAME=/path/sfindex03.php Basename=sfindex03.php --

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Leif K-Brooks
The Jason k Larson wrote: > I disagree. While I tend to stay away from short tags in general, the > use of the short echo tag has yet to cause any trouble for me. And it > makes code exceptionally easier to read, which proves to be a > valueable asset. Maybe you could provide and example w

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
I disagree. While I tend to stay away from short tags in general, the use of the short echo tag has yet to cause any trouble for me. And it makes code exceptionally easier to read, which proves to be a valueable asset. Maybe you could provide and example where a short tag is causing some trouble

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
I've checked up on strings, and it seems like the quoting is like the Korn shell. You can see below that I found basename() which works fine with __FILE__, but $_SERVER['PHP_SELF'] etc print nothing. Any ideas? Stephen =PHP== $_SERVER[\'PHP_SELF\']= '.$_SERVER['PHP_SELF'].""; echo '$_

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
'PHP_SELF'] the , should be a . (is this just a typo in the e-mail?) Thanks Mark -Original Message- From: Stephen Ford [mailto:[EMAIL PROTECTED] Sent: 27 February 2003 16:47 To: [EMAIL PROTECTED] Subject: Re: [PHP] How do I display the script file name? Partial success. The code

[PHP] how do I strptime?

2003-02-27 Thread Paul Chvostek
I currently do this: $raw="Nov 28 18:26:35 2002"; $when=`date -jf '%a %b %e %T %Y' "$raw" '+%s'`; when I'd much rather do this: $raw="Nov 28 18:26:35 2002"; $when=strptime($raw, '%a %b %e %T %Y'); which is of course a non-existent function in PHP. I'd like to stop calling a su

RE: [PHP] How do I display the script file name?

2003-02-27 Thread M.A.Bond
Stephen Ford [mailto:[EMAIL PROTECTED] Sent: 27 February 2003 16:47 To: [EMAIL PROTECTED] Subject: Re: [PHP] How do I display the script file name? Partial success. The code and output are shown below. There are no errors. What does the ".' '." do pls. Have tried a variety of

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
. is a string concatenation operator. ' or " are strings. Read http://www.php.net/manual/en/language.operators.string.php By the way, __LINE__ is available in addition to __FILE__. Hope that helps, Jason k Larson Stephen Ford wrote: Partial success. The code and output are shown below. There ar

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
Partial success. The code and output are shown below. There are no errors. What does the ".' '." do pls. Have tried a variety of combinations to see the effect. Nothing to see... :-( ===PHP== Line #1 ".' '.$_SERVER['PHP_SELF'], ""; echo "Line #2"; echo "Line #3"; echo "Line #4 ".'

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
The 'magic constant' __FILE__ is one way. or even better: HTH, Jason k Larson Stephen Ford wrote: How can I display the script file name? Presumably something like-: While I'm learning php and developing various Web page versions, I want to be sure the that the display is from the appropriat

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
Thanks I'll post back with results. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How do I display the script file name?

2003-02-27 Thread Rich Gray
> How can I display the script file name? Presumably something like-: > > echo $ScriptFileName; > ?> > > While I'm learning php and developing various Web page versions, I want to > be sure the that the display is from the appropriate script. > > Regards > Stephen Ford, Surrey, UK Try any of thes

[PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
How can I display the script file name? Presumably something like-: While I'm learning php and developing various Web page versions, I want to be sure the that the display is from the appropriate script. Regards Stephen Ford, Surrey, UK -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How do I set UID and GID to files.

2003-02-16 Thread Jason Sheets
Use the chown function, chown is documented at http://www.php.net/manual/en/function.chown.php Jason On Sat, 2003-02-15 at 21:00, David Duong wrote: > See topic. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General

[PHP] How do I set UID and GID to files.

2003-02-16 Thread David Duong
See topic. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How do I set the timezone on redhat via PHP? Ie. How to convert GMT to symbolic link?

2003-02-14 Thread Daevid Vincent
Given that I have a GMT offset via the select box below, how the hell do I turn that into a symbolic link to one of these files? How do I know which file to link too?!!! UGH. This is such a stupid way to set the timezone, why didn't RedHat just have a file with the offset in it? Something like "ech

[PHP] How do I force a 'timeout' in a loop for that itteration, or conversley how to timeout a 'ping" request?

2003-02-07 Thread Daevid Vincent
I'm trying to automate finding pingable domains given an IP or a domain. The problem is that some domains don't actually return "pings", and on Linux, it just sits there forever (ugh!). So... Can someone tell me how to 'abort' or 'timeout' an itteration of a loop. Maybe start a timer and then check

[PHP] How do I know alive session at this moment?

2003-01-24 Thread Henry

[PHP] How do I check if a process is running ?

2003-01-22 Thread Thomas Wessel Svensson
I need som guidance in the correct direction for som Task Manager-like problems in the PHP Manual of php.net. Anyone ? from Thomas is Oslo, Norway -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How do I find email patterns in a query string in a text and urlescape them?

2003-01-21 Thread Phil Powell
If I have a text of string like this: $stuff = "Hi my name is Phil, my email is [EMAIL PROTECTED] and you can find me at http://www.xx.yy?[EMAIL PROTECTED]";; What I want to do is to "validate" all patterns resembling an email address EXCEPT those found within the query string of a URL. I woul

RE: [PHP] How Do I Return Values Across Servers

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
2003 9:38 AM > To: Timothy Hitchens (HiTCHO); [EMAIL PROTECTED] > Subject: RE: [PHP] How Do I Return Values Across Servers > > > Yes, I want to get a value from a script on Server A that > runs against a database on Server A, returning that value to > a script variable on Se

RE: [PHP] How Do I Return Values Across Servers

2003-01-08 Thread Bill Arbuckle, Jr.
8, 2003 4:45 PM To: 'Bill Arbuckle, Jr.'; [EMAIL PROTECTED] Subject: RE: [PHP] How Do I Return Values Across Servers If I understand you want to be able to get a value from a script on another server. Well I would suggest a really each way would be to do have the calling server cal

RE: [PHP] How Do I Return Values Across Servers

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Platform Consulting e-mail: [EMAIL PROTECTED] > -Original Message- > From: Bill Arbuckle, Jr. [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 9 January 2003 8:17 AM > To: [EMAIL PROTECTED] > Subject: [PHP] How Do I Return Values Across Servers > > > This may be a no-bra

[PHP] How Do I Return Values Across Servers

2003-01-08 Thread Bill Arbuckle, Jr.
This may be a no-brainer for everyone but me but ... I have several php scripts residing on a web site on Server A. In a library file on Server A are misc. functions, some of which query an underlying database and return a text string as the result. On another web site on Server B I would like to

Re: [PHP] How do I get the entire data sended to the web server?

2003-01-08 Thread Marek Kilimajer
I don't think there is a single variable, but you can build it from various variables and functions: $_SERVER array: REQUEST_METHOD REQUEST_URI SERVER_PROTOCOL function getallheaders() |$HTTP_RAW_POST_DATA| |this should be all you need| Heiko Mundle wrote: Is it possible with php t

[PHP] How do I get the entire data sended to the web server?

2003-01-08 Thread Heiko Mundle
Is it possible with php to print the http header and the attached data for a transmitted http request? How can I do this? an example of what I want to see: POST /cgi-bin/CgiMfc1?MyQuery%3dQData HTTP/1.1 Accept: text/* User-Agent: HttpCall Accept-Language: en-us Host: localhost:680 Content-Length

Re: [PHP] How do I populate a select?

2002-12-10 Thread Tim Ward
t the function names wrong - I use an abstraction layer these days Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Steve Jackson <[EMAIL PROTECTED]> To: PHP General <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 3:24 PM Subject: [PHP] H

[PHP] How do I populate a select?

2002-12-10 Thread Steve Jackson
How do I populate a select list with a list of category names from a DB? I can select the names using a query but how do I loop through them to display them in a select? My query below will return the cat names. (when I do something with it like echoing the result) $mysql = mysql_query("SELECT c

Re: [PHP] How do I include specific files?

2002-12-02 Thread Jason Wong
On Monday 02 December 2002 23:57, Roddie Grant wrote: > In PHP the include_path stops this process in its tracks. I'm with an ISP > so I don't suppose I can control include_path (.:/usr/local/lib/php). Are > there any other options? You can set the include_path at run-time using: ini_set("incl

[PHP] How do I include specific files?

2002-12-02 Thread Roddie Grant
I'm new to PHP, but from Lasso I'm used to the following sort of arrangement (in pseudo-code) Search for matching records If number found=1 include "/folder/subfolder/file1" If number found>1 include "/folder/subfolder/file2" If number found=0 include "/anotherfolder/subfolder/file99" where t

Re: [PHP] How do I run a command as root?

2002-12-02 Thread Matthieu Le Corre
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 the commande run y PHP on the server are run as the user which apache is running as ...aka www or nobody in lot's of case ... so forget running a root commande ( infac for security reason ... it's not very good :/ ) Le Lundi 2 Décembre 2002 10:44, L

Re: [PHP] How do I run a command as root?

2002-12-02 Thread Marek Kilimajer
As your server process run as nobody or apache, you need a wrapper setuid root program that will execute the command you want, but you must be very carefull so it is not exploitable. Luke van Blerk wrote: Hi I'm trying to find out how to run a command on the server as root. Does anybody know h

RE: [PHP] How do I run a command as root?

2002-12-02 Thread Jon Haworth
Hi Luke, > I'm trying to find out how to run a command on the > server as root. Does anybody know how to do this? How about using a combination of exec() and sudo (assuming you're in the sudoers file, that is)? Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] How do I run a command as root?

2002-12-02 Thread John Wards
On Monday 02 Dec 2002 10:47 am, Luke van Blerk wrote: > Hi > > I'm trying to find out how to run a command on the server as root. Does > anybody know how to do this? > su root password: your_root_password then run your command This is a php list not a *nix list John -- PHP General Mailing List

[PHP] How do I run a command as root?

2002-12-02 Thread Luke van Blerk
Hi I'm trying to find out how to run a command on the server as root. Does anybody know how to do this? Thanks Luke

[PHP] How do I run a command as root?

2002-12-02 Thread Luke van Blerk
Hi I'm trying to find out how to run a command on the server as root. Does anybody know how to do this? Thanks Luke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How Do I install php on Apache 2.0

2002-11-30 Thread Tweak2x
Adam Voigt, > > On 27 Nov 2002 11:44:49 -0500, you wrote about "Re: [PHP] How Do I install > php on Apache 2.0" something that looked like this: > > >A. What does having Adobe installed matter? > > Where'd you get that?? > > >B. Why are you trying t

Re: [PHP] How Do I install php on Apache 2.0

2002-11-29 Thread -<[ Rene Brehmer ]>-
Hi Adam Voigt, On 27 Nov 2002 11:44:49 -0500, you wrote about "Re: [PHP] How Do I install php on Apache 2.0" something that looked like this: >A. What does having Adobe installed matter? Where'd you get that?? >B. Why are you trying to run 2.0? Apache 2.0 isn't even

Re: [PHP] How Do I install php on Apache 2.0

2002-11-27 Thread Adam Voigt
A. What does having Adobe installed matter? B. Why are you trying to run 2.0? Apache 2.0 isn't even recommended for use with PHP on linux systems yet, let alone windows. You'd have much better luck with the 1.3.27 version. On Wed, 2002-11-27 at 11:22, Tweak2x wrote: > Hello, I am on windows XP Pro

[PHP] How Do I install php on Apache 2.0

2002-11-27 Thread Tweak2x
Hello, I am on windows XP Pro, and I have adobe istalled. How can I get php to work on Apache? I download php-4.2.3 (the installer) and chose apache, and It didnt work. I still cant get my php to work for apache. Can somebody guide me step by steb through installing php on apache? thanks -- PHP

Re: [PHP] How do i provide Download facility ??

2002-11-27 Thread Brian McGarvie
Perhaps he wants to track downloads of files and obscure the physical locations... "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > > I am a newbie in this PHP world. I was just looking around for > > information on Download of files usin

Re: [PHP] How do i provide Download facility ??

2002-11-26 Thread Justin French
Hi, > I am a newbie in this PHP world. I was just looking around for > information on Download of files using PHP. > I need to provide link/button, by clicking which a user can download a file > (Say a CSV file..). Does PHP provide any class or methods to achieve the > same...? Looking forward fo

Re: [PHP] How do i provide Download facility ??

2002-11-26 Thread Chris Shiflett
--- Venkatesh Hosur <[EMAIL PROTECTED]> wrote: > I was just looking around for information on Download > of files using PHP. I need to provide link/button, by > clicking which a user can download a file (Say a CSV > file..) The best solution, in my opinion, is just to use a straightforward HTML l

[PHP] How do i provide Download facility ??

2002-11-26 Thread Venkatesh Hosur
Hello, I am a newbie in this PHP world. I was just looking around for information on Download of files using PHP. I need to provide link/button, by clicking which a user can download a file (Say a CSV file..). Does PHP provide any class or methods to achieve the same...? Looking forward for

[PHP] How do I Install PHP on Apache 2.0?

2002-11-24 Thread Tweak2x
can somebody please help me? I cant figure it out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How do I initialize a page to do something ONCE

2002-11-22 Thread @ Nilaab
ks to both of you for your help. :) - Nilaab > -Original Message- > From: Larry Brown [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 22, 2002 9:31 AM > To: PHP List; @ Nilaab > Subject: RE: [PHP] How do I initialize a page to do something ONCE > > > Your fir

RE: [PHP] How do I initialize a page to do something ONCE

2002-11-22 Thread Larry Brown
Your first post stated.. > The only problem is that it is not processing the second if block -- if($start_over == 1) -- unless I actually set start_over=1 in the get string. > Your second sounds like it is executing the second block... >The variable $initialize contains "int(1)", so it does set i

RE: [PHP] How do I initialize a page to do something ONCE

2002-11-22 Thread @ Nilaab
: Friday, November 22, 2002 2:36 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] How do I initialize a page to do something ONCE > > > On Friday 22 November 2002 07:26, [EMAIL PROTECTED] wrote: > > Hello, > > > > I have a newbie problem. I have an php page that has ma

Re: [PHP] How do I initialize a page to do something ONCE

2002-11-22 Thread Jason Wong
On Friday 22 November 2002 07:26, [EMAIL PROTECTED] wrote: > Hello, > > I have a newbie problem. I have an php page that has many layers of forms > to it. Once the user is finished with filling out one form and sending it, > another form appears. This is of course done using simple if-else or switc

[PHP] How do I initialize a page to do something ONCE

2002-11-21 Thread @ Nilaab
Hello, I have a newbie problem. I have an php page that has many layers of forms to it. Once the user is finished with filling out one form and sending it, another form appears. This is of course done using simple if-else or switch statements. The problem is, how do I initialize a function or any

Re: [PHP] how do I get for to display $_POST value?

2002-11-17 Thread Jeff Bluemel
I didn't know I could set a value on that... thanks for the info. "John Nichel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > maxlength="20"> > > Jeff Bluemel wrote: > > OK... I have the following code which works perfect. however, when submit > > is pres

Re: [PHP] how do I get for to display $_POST value?

2002-11-17 Thread John Nichel
Jeff Bluemel wrote: OK... I have the following code which works perfect. however, when submit is pressed I would like it to display the pin number in the form again. 8 Pin : Batch : Serial : -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mail

[PHP] how do I get for to display $_POST value?

2002-11-17 Thread Jeff Bluemel
OK... I have the following code which works perfect. however, when submit is pressed I would like it to display the pin number in the form again. 8 Pin : Batch : Serial : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How do I get email address of sender

2002-11-17 Thread AKHIL KODALI
Hi, How to I get from e-mail address using imap function. I was able to retrieve the name only. imap_fetch_overview doesn't provide this facility. -- AKHIL K 200101009 Room No. 15 BH-2 IIIT -- Look

RE: [PHP] How do i make an upload script?

2002-11-12 Thread Jon Haworth
Hi, > How do i make an upload script? You need an HTML form with an element, and a script to handle the upload. Post your code and tell us what problems you're having. If you haven't written any code yet, go and read this section of the manual: http://www.php.net/manual/en/features.file-uplo

[PHP] How do i make an upload script?

2002-11-12 Thread Tweak2x
How do i make an upload script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Ford, Mike [LSS]
> -Original Message- > From: Daevid Vincent [mailto:daevid@;daevid.com] > Sent: 06 November 2002 12:23 > To: [EMAIL PROTECTED] > > That's the EASY part John! > > The hard part is converting the array (which was a checkbox > array from a > form submission) into the binary string (as per t

Re: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Tom Rogers
Hi, Wednesday, November 6, 2002, 2:56:33 PM, you wrote: DV> Does anyone know of a nice efficient way to convert an array of values DV> into a "mask"... DV> Here's the deal. Given an array such that: DV> $purchitem[0] = 1; DV> $purchitem[1] = 3; DV> $purchitem[2] = 4; DV> I want to end up with a

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Ernest E Vogelsinger
At 13:43 06.11.2002, Daevid Vincent said: [snip] >Ernest, close but you have it reversed for my needs (i.e. true binary >form). Notice that my LSB is to the left, not right. Ah, ic, you want a <> like "1100101" - that's easy :) Note that I do _not_ pass

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
> Oooh! I think you're on to something there. Nice! > > Hey, what's the "@" symbol for? I see in the manual the "&" is a > reference (like a pointer in C I assume), but I can't find the "@" > explained. > > > if(@$purchitem[$y] == $x) It'll suppress warnings and errors. If the $purchitem does

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
Oooh! I think you're on to something there. Nice! Hey, what's the "@" symbol for? I see in the manual the "&" is a reference (like a pointer in C I assume), but I can't find the "@" explained. > if(@$purchitem[$y] == $x) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
everse($charArray); $revString = ""; while ( list($Key, $Val) = each($revchars) ) { $revString .= $Val; } return $revString; } > -Original Message- > From: Ernest E Vogelsinger [mailto:ernest@;vogelsinger.at] > Sent: Wednesday, November 06, 2002 1

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
> That's the EASY part John! > > The hard part is converting the array (which was a checkbox array from a > form submission) into the binary string (as per the original post) > > > Here's the deal. Given an array such that: > > $purchitem[0] = 1; //purchased book #1 checkbox enabled > > $purchit

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
charter.net] > Sent: Wednesday, November 06, 2002 4:19 AM > To: 'Jon Haworth'; [EMAIL PROTECTED] > Subject: RE: [PHP] How do I convert an array into a mask? > > > > Hi John, > > > > > > So given the example below, "10110" > > > >

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
> Hi John, > > > > So given the example below, "10110" > > > means that the person can view books 1, 3, and 4, > > > but not 2 or 5. dig? > > > > Explain that to me... I know binary, but I can't see > > how that equates to 1, 3, and 4. > > Because you know binary :-) > > The above is a series of

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Jon Haworth
Hi John, > > So given the example below, "10110" > > means that the person can view books 1, 3, and 4, > > but not 2 or 5. dig? > > Explain that to me... I know binary, but I can't see > how that equates to 1, 3, and 4. Because you know binary :-) The above is a series of yes/no flags, not a

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
> So given the example below, "10110" > means that the person can view books 1, 3, and 4, but not 2 or 5. dig? Explain that to me... I know binary, but I can't see how that equates to 1, 3, and 4. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Ernest E Vogelsinger
At 10:18 06.11.2002, Daevid Vincent said: [snip] >doesn't lend itself nicely to expansion, but may be my only way. I just >have a gut feeling that it can be automated somehow. To turn 1,3,4 into >10110 seems like there is some 'math' there that can work. I al

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
Michael, I like your idea, and had I designed this site, I would have the bitmask simmilar to what you suggest. However, I'm a contractor modding an existing/legacy site. Basically the way they have it, is that each user has a field in the db that is simply a string/mask of which books a person has

Re: [PHP] How do I convert an array into a mask?

2002-11-05 Thread Michael Sims
On Tue, 5 Nov 2002 20:56:33 -0800, you wrote: >Does anyone know of a nice efficient way to convert an array of values >into a "mask"... I'm going to assume that you mean a bitmask. I'm not exactly sure what you're trying to accomplish, so I may be off base here, but let me describe how I'm using

Re: [PHP] How do I convert an array into a mask?

2002-11-05 Thread rija
Why don't you ask Jim Carrey ??? He knew more that whoever here about "The MASK" !!! Good luck. - Original Message - From: "Daevid Vincent" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 3:56 PM Subject: [PHP]

[PHP] How do I convert an array into a mask?

2002-11-05 Thread Daevid Vincent
Does anyone know of a nice efficient way to convert an array of values into a "mask"... Here's the deal. Given an array such that: $purchitem[0] = 1; $purchitem[1] = 3; $purchitem[2] = 4; I want to end up with a variable like this: $mask = "10110"; Additionally, my theory is that then the pers

Re: [PHP] How do I check if a checkbox has been checked?

2002-11-01 Thread Tom Woody
The syntax as I have used it is (not the cleanest or best way to do it by a long run - but it works): > this will have the checkbox be checked by default, also you can do what ever other things you need to do based on the on/off conditions. On Fri, 1 Nov 2002 10:47:43 -0500 "DonPro" <[EMAIL PRO

Re: [PHP] How do I check if a checkbox has been checked?

2002-11-01 Thread John Nichel
if ( isset ( $_POST['shipper_save'] ) ) { echo ( "It's Checked" ); } Or use $_GET['shipper_save'] depending on your forum method. DonPro wrote: Hi, I have a form with a checkbox like so: When I submit, the value is always shown as "ON" regardless of whether I've checked the checkbox or not.

[PHP] How do I check if a checkbox has been checked?

2002-11-01 Thread DonPro
Hi, I have a form with a checkbox like so: When I submit, the value is always shown as "ON" regardless of whether I've checked the checkbox or not. So this begets the question, How can I code my PHP form processing script to determine whether the checkbox was checked? Thanks, Don -- PHP Ge

Re: [PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread Justin French
Wouldn't round() work??? Or, if you always want to round down, why not just split it on the decimal? Or as long as you're willing to give up year 10,000 compliance :), the year will "always" be the first four digits. Plenty of options :) I think I'd just use substr() Justin on 24/0

RE: [PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread Tom Callaghan
Subject: Re: [PHP] How do i assign Integers only and not real numbers? If you end up using floor(), watch for floating point errors. You could expect your division to come out to a whole number, say 12, but be represented by 11.999 in the computer. So that'll floor() to 11. You can

Re: [PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread 1LT John W. Holmes
years + ($themonth / 12) + 0.0001); ---John Holmes... - Original Message - From: "Support @ Fourthrealm.com" <[EMAIL PROTECTED]> To: "Tom" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, September 23, 2002 11:06 AM Subject: Re: [PHP] How do i assign

Re: [PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread Support @ Fourthrealm.com
Hi Tom, Try this: $years = round($years + ( $themonth / 12 )); From the manual: float round ( float val [, int precision]) Returns the rounded value of val to specified precision (number of digits after the decimal point). precision can also be negative or zero (default). ceil() and floor()

RE: [PHP] How do I use a Javascript variable in PHP?

2002-09-23 Thread kale
ot; I hope this help you Kale. -Original Message- From: Tom [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: [PHP] How do I use a Javascript variable in PHP? Hi all, I hope this is the right place to pose my question, so here goes:

RE: [PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread M . A . Bond
: [PHP] How do i assign Integers only and not real numbers? Hi all, I have a line of code that assigns a new year number: - $years = $years + ( $themonth / 12 ); but sometimes $years == 1998.08 or $year == 2002.75 etc... I cant find anything like a round() or floor() function in PHP so

[PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread Tom
Hi all, I have a line of code that assigns a new year number: - $years = $years + ( $themonth / 12 ); but sometimes $years == 1998.08 or $year == 2002.75 etc... I cant find anything like a round() or floor() function in PHP so that year would be 1998 or 2002 only. Does anyone know

Re: [PHP] How do I use a Javascript variable in PHP?

2002-09-23 Thread Support @ Fourthrealm.com
Tom, JavaScript is a client side language, while PHP is server side. This means that the PHP is parsed and evaluated before it ever reaches the surfers browser. And since the JavaScript variable will not be available until it is created by the browser, there is no way to interact with it. Pe

[PHP] How do I use a Javascript variable in PHP?

2002-09-23 Thread Tom
Hi all, I hope this is the right place to pose my question, so here goes: - I have a javascript function called calcMonth() and given a number it will return a date i.e. month = calcMonth( 57 ) - month will be 'sept 2002' The problem I`m having is at the beginning of my PHP file I`m ca

[PHP] How do I upgrade my version of PHP?

2002-09-11 Thread Monty
I've downloaded the patch file for 4.2.2 to 4.2.3 from the PHP website, but, not sure what to do with this file. I have a Linux 7.x server. Can anyone tell me how to patch my version of PHP or point me to a source that explains how this is done? Thanks! -- PHP General Mailing List (http://www.

RE: [PHP] How do I get milliseconds?

2002-09-04 Thread Mike richardson
)$sec); I haven't tested this out, but it looks right. Michael "phpzen" Richardson -Original Message- From: DonPro [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 11:47 AM To: php list Subject: [PHP] How do I get milliseconds? Using the following code, dat

Re: [PHP] How do I get milliseconds?

2002-09-04 Thread Jackson Miller
microtime(); will return microseconds. That is not milliseconds, but it may or may not solve your problem. I don't think there is a way to get milliseconds. -Jackson On Wed, 2002-09-04 at 14:47, DonPro wrote: > Using the following code, > > date("His") > > I get the hours, minutes and secon

RE: [PHP] How do I get milliseconds?

2002-09-04 Thread Jay Blanchard
[snip] [snip] Using the following code, date("His") I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? [/snip] $ms = (date("s")/1000); I don't think that there is a method to return it. I looked through php.net (searched millisecond and mil

RE: [PHP] How do I get milliseconds?

2002-09-04 Thread Jay Blanchard
[snip] Using the following code, date("His") I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? [/snip] $ms = (date("s")/1000); I don't think that there is a method to return it. I looked through php.net (searched millisecond and millisecon

[PHP] How do I get milliseconds?

2002-09-04 Thread DonPro
Using the following code, date("His") I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   6   7   8   9   >