Re: [PHP] and or statement

2002-08-29 Thread Charles Fowler
 PHP and MYSQL Web Development manual by Welling and Thompson states  that logical operators are as follows: ___ Operator    Name    Use Result _

[PHP] Average Number For Math Functions

2002-08-29 Thread JohnP
Ok I looked at all the math functions for PHP but saw no way of returning the average of a set of numbers - I plan on using this for a rating system - any help? -- John

[PHP] PHP Toolbar for Homesite...

2002-08-29 Thread Matt Zur
I made a php toolbar for Homesite v5. It's currently at v1.0 right now, but I'm looking for any suggestions anyone might have for the next version. http://zurnet.com/dl/hsphptb/ -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5t

FW: [PHP] Re: credit card auth using curl function

2002-08-29 Thread phplist
Thanks for the help. I made the change as follows, as I don't mind it be transient data... but I still get the string outputted on the web page. I can parse the string all I want, but the following code still prints out the annoying string on the webpage. Any ideas where I am going wrong? Stan H

Re: [PHP] Re: credit card auth using curl function

2002-08-29 Thread Mike Mannakee
Try curl_setopt($ch, CURL_NOBODY, 1); Mike "Phplist" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks for the help. I made the change as follows, as I don't mind it > be transient data... but I still get the string outputted on the web page. I > can pa

RE: [PHP] Average Number For Math Functions

2002-08-29 Thread Martin Towell
just sum them up and divide by the count - making sure to deal with a count of zero -Original Message- From: JohnP [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 10:56 AM To: [EMAIL PROTECTED] Subject: [PHP] Average Number For Math Functions Ok I looked at all the math functio

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread JohnP
Ok so how do I sum up an entire column in my db? For example if one row is : 1 , the next is 2, and the next is 1 - I need to have a total of 4 and the be able to divide by the num_rows The problem I ma having is the "inside" row addition "Martin Towell" <[EMAIL PROTECTED]> wrote in message [

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread Steve Edberg
At 05:55 PM 8/29/02 , JohnP wrote: >Ok I looked at all the math functions for PHP but saw no way of returning >the average of a set of numbers - I plan on using this for a rating system >- any help? > >-- >John Nope - you'll have to 'roll your own' by looping though the set, or (if you have v

Re: [PHP] SESSION ARRAY

2002-08-29 Thread Keith Vance
$_SESSION is a predefined variable, session_start() session_register('BILLARRAY') should work though :) Keith Vance Vance Consulting LLC www.vanceconsulting.net (206) 355-2399 Try my open source PHP authentication system, Rampart by visiting http://rampart.sourceforge.net/. Commercial support i

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread VolVE
Can't you just count the elements and then divide the total by the count? It seems pretty obfuscating to consider a function that takes an unknown number of elements, unless it were an array... still, seems pretty easy to count and divide total... doesn't it? -VolVE > - Original Message ---

RE: [PHP] Average Number For Math Functions

2002-08-29 Thread Dave at Sinewaves.net
if i remember 4th grade math class correctly... $value) { $total += $array_of_the_numbers[$key]; ++$count; } // wow, that's a toughie! $average = $total / $count; // then you could make it pretty $pretty_average = number_format($average, 1); ?> booyah. :) dave -Origina

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread Andrew Brampton
I can't seem to see a pre-built functions but here is one I just wrote in my email client: function average($numberArray) { $sum = 0; for ($i=0;$i To: <[EMAIL PROTECTED]> Sent: Friday, August 30, 2002 1:55 AM Subject: [PHP] Average Number For Math Functions Ok I looked at all the math f

[PHP] New as of today

2002-08-29 Thread stu9820
Im new to PHP (came from ASP). I'm trying to make pictures (.jpgs) come out of a folder and display on a page. Here is my code so far: $zContents"; ?> I dont have database support on the server i use (school server). I have all the picture names in a text file and i want to pull out the nam

RE: [PHP] New as of today

2002-08-29 Thread Martin Towell
if you have each filename on a new line, then use file() to grab the contents. It returns an array, each line is an element in the array. You can then do what you want with the array HTH Martin -Original Message- From: stu9820 [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 1:0

RE: [PHP] Average Number For Math Functions

2002-08-29 Thread David Freeman
> Ok so how do I sum up an entire column in my db? > For example if one row is : 1 , the next is 2, and the next > is 1 - I need to > have a total of 4 and the be able to divide by the num_rows > > The problem I ma having is the "inside" row addition If you're doing it on values from a d

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread VolVE
What database are you using? MySQL has a SUM function which automatically selects the total of a column. -VolVE - Original Message - From: "JohnP" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 29, 2002 21:25 Subject: Re: [PHP] Average Number For Math Functions > O

Re: [PHP] PHP Toolbar for Homesite...

2002-08-29 Thread olinux
Very cool! Here's a few suggestions: cookie should open a dialog box so you can input values similar to mail. ability to enter more than one array value at once maybe the dialog box has a drop down [1-10] which so if you select 4 then 4 fields appear to enter more values mysql functions are qu

Re: [PHP] Where is my REMOTE_USER?

2002-08-29 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > At 06:03 29/8/2002 -0400, David T-G wrote: > > > Frank, et al -- > > ..and then Frank said... > > % > > % Hi, > > % > > % when logging in with username and password with the good old "Require > user" > > % mechanism in Apache I

[PHP] Re: date from mysql

2002-08-29 Thread David Robley
In article <01ae01c24f4f$51dc7bd0$b50a@web18>, [EMAIL PROTECTED] says... > i want Y (year format) printed on my php script (looping), i already tried > it but i got same Year format (ex 1978) in all row in my table > > my loop script is: > > > $query = ("select * from table"); > $result =

[PHP] Re: eregi_replace() problems

2002-08-29 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Can anyone tell me why my emoticons arent appearing? Please? > > Note: $message is a variable set by a web form. The field `pattern` is the > string to search for, like ":-)", and `url` is the relative url to the > emoticon. I just get

[PHP] subject in big5 characters of an email can't be read in Lotus Notes

2002-08-29 Thread Ellen O'Neal
I have sent an email using mail function in which the subject and email body have charset=big5. Customers with outlook express can read the big5 chinese characters without any trouble. However, people who read their emails from Lotus Notes complain that they cannot read the subject. But, they

[PHP] Re: subject in big5 characters of an email can't be read in LotusNotes

2002-08-29 Thread Manuel Lemos
Hello, On 08/30/2002 01:43 AM, Ellen O'Neal wrote: > I have sent an email using mail function in which the > subject and email body have charset=big5. > > Customers with outlook express can read the big5 > chinese characters without any trouble. However, > people who read their emails from Lo

[PHP] session_unregister - but w00t about the back button?

2002-08-29 Thread Victor
I can logout with session_unregister - but w00t about the back button? This is probably so trivial that it has been discussed before, if anyone has some knowledge or link at hand mind passing it on? Thanks. - Victor > www.argilent.com ___

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread JohnP
I am still very new to PHP so things are still a little foreign to me - what exactly is the SUM finction - I tried to locate one on both the PHP and MySQL site but found nothing! Thanks ~ John "Volve" <[EMAIL PROTECTED]> wrote in message 02d901c24fd5$aba46020$7800a8c0@idiom">news:02d901c24fd5$ab

[PHP] Simple regexp

2002-08-29 Thread Adam Alkins
Hi, I'm trying to do a simple regexp to validate if a whole string only contains the numbers 0 to 9, Letters a - f and A - F and the character : Why isn't ereg("[a-zA-Z0-9:]",$string) working? Guidance appreciated. -- Adam Alkins http://www.rasadam.com --

Re: [PHP] subject in big5 characters of an email can't be read in Lotus Notes

2002-08-29 Thread @ Edwin
I'm not sure if this will help but using mb_send_mail() instead of mail() solved the problems I had with Japanese characters... However, it might be the mail client itself. Check if they had no problem before (when they received similar e-mails from other sources). - E > >I have sent an email

RE: [PHP] Average Number For Math Functions

2002-08-29 Thread Martin Towell
if you have a table called "ratings" and a field called "score" in it, then doing this will show you the sum of all the scores: select sum(score) from ratings; eg, if the scores were 5, 2, 5, 8, and 2 then this sql should return 22 (unless I added it wrong... :/ ) -Original Message- Fr

Re[2]: [PHP] Average Number For Math Functions

2002-08-29 Thread Tom Rogers
Hi, Friday, August 30, 2002, 3:10:09 PM, you wrote: J> I am still very new to PHP so things are still a little foreign to me - what J> exactly is the SUM finction - I tried to locate one on both the PHP and J> MySQL site but found nothing! J> Thanks ~ John J> "Volve" <[EMAIL PROTECTED]> wrote i

Re: [PHP] Simple regexp

2002-08-29 Thread Todd Pasley
Hi, you would be better off with preg_match, as its a little quicker apparently. try: preg_match("/^[:0-9a-f]*$/i",$string) or change the * to a + to ensure $string is not null the main problems you had: - not ensuring that only those characters are found by using ^ and $ - not allowing multip

RE: [PHP] Simple regexp

2002-08-29 Thread Martin Towell
try this ereg("^[a-zA-Z0-9:]*$",$string) all your's is doing is looking for any char in $string that's a-z or A-Z or 0-9 or : instead of all chars, from start to end, being them -Original Message- From: Adam Alkins [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 3:20 PM To: PHP

Re: [PHP] Average Number For Math Functions

2002-08-29 Thread @ Edwin
> >I am still very new to PHP so things are still a little foreign to me - what >exactly is the SUM finction - I tried to locate one on both the PHP and >MySQL site but found nothing! http://www.mysql.com/doc/en/Group_by_functions.html#IDX1364 Well, it's close to "nothing" but if you study ho

Re: [PHP] Re: Reading from a file using fgets()

2002-08-29 Thread David Christensen
Interesting. It's not documented. On Thu, 2002-08-29 at 14:44, Dallas Thunder wrote: > Well, this is exactly what function file() does. > > "David Christensen" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > When PHP reads from a file using fgets(), does

Re: [PHP] Re: Reading from a file using fgets()

2002-08-29 Thread @ Edwin
Or, is it? :) http://www.php.net/manual/en/function.file.php - E > >Interesting. It's not documented. > > >On Thu, 2002-08-29 at 14:44, Dallas Thunder wrote: > > Well, this is exactly what function file() does. > > > > "David Christensen" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTEC

[PHP] Re: New as of today

2002-08-29 Thread Justin Garrett
Look at fgets and explode. Depending on the format of your txt file you can use a combination of fgets and explode to get your desired results. http://www.php.net/manual/en/function.fgets.php http://www.php.net/manual/en/function.explode.php If each picture name is on a separate line then the f

Re: [PHP] Re: Reading from a file using fgets()

2002-08-29 Thread David Christensen
Ok, file() is docuemted, but it doesn't say anything about whether or not it reads data sequentially from top to bottom or if there's an option to read bottom to top or anything in between. Dave On Thu, 2002-08-29 at 22:37, @ Edwin wrote: > Or, is it? :) > > http://www.php.net/manual/en/func

[PHP] Using cURL

2002-08-29 Thread Henry
Dear All, I'm using a shared server hosted by an ISP. I cannot get PHP recompiled with --with-curl. I've read the information about cURL but it appears that I need to be root in order to install it? I cannot do this. Does this mean that I cannot use cURL or CURL at all? If it doesn't what do I ne

Re: [PHP] Re: Reading from a file using fgets()

2002-08-29 Thread @ Edwin
I see what you mean. But, personally, if the documentation didn't explicitly say anything about it, I'd assume that it's from top to bottom and that there's no option--of course, I could be wrong you know, there must be something hidden... - E > >Ok, file() is docuemted, but it doesn't say an

[PHP] Re: Properly installing curl in windows 2000

2002-08-29 Thread Steinar Kolnes
A.J. It seems that you have exact same problem as me. Everything seems correctly set up, the phpinfo shows; curl CURL support enabled CURL Information libcurl 7.9 (OpenSSL 0.9.6b) For the third day, I am trying to find out, but still I have not got any useful information from the

<    1   2