[PHP] need help with a chat code problem

2002-08-29 Thread Deadsam
Im building a chat with php/mySQL but I dont want my database to be filled up with messages upon messages, what I want to do is make it start deleting rows after lets say 100 rows (which hold the messages)(each individual row holds one chat message), is there a way of doing this through deleting

[PHP] SESSION ARRAY

2002-08-29 Thread Randy Johnson
What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SESSION ARRAY

2002-08-29 Thread Todd Pasley
What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Yep, providing youre using session_start() and session_register(_SESSION) you can assign any type of data, just like a regular hash. Todd. - Original Message - From: Randy Johnson [EMAIL

Re: [PHP] How can I strip the code from HTML pages to extract thecontents of a HTML page.

2002-08-29 Thread Charles Fowler
I was looking into stripping HTML files that contain alot of links. I was trying to avoid the manual way of data entry. The contents i need are the name of the link (plain text which sits out side the HTML code) and all the a href tags. I would like the a href (ie.the hyperlink) tags to be

[PHP] Re: wish list for my host's new compile

2002-08-29 Thread Justin French
Hi Philip, There's definitely MySQL support in there, and I think FTP is enabled (FTP Support: enabled). What are the options for fonts in GD without freetype? The GD site doesn't have any sample images... I assume it means you can't use TTF, and you can't get anti-aliasing. GD2 is in Beta,

Re: [PHP] How can I strip the code from HTML pages to extract thecontents of a HTML page.

2002-08-29 Thread Todd Pasley
Hi Charles, Not sure exactly what you are after, but function displayLinks ($pagecontents) { $search = '/a (.*?)href=(.*?)(.*?)\/a/im'; $replace = 'a $1href=recordstep.php?clientid=$clientidtestid=$testidlink=$2$3/a'; return (preg_replace ($search, $replace,

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 -

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

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 parse

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

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 [EMAIL

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

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

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... ? $total = 0; $count = 0; // get each of the numbers foreach($array_of_the_numbers as $key = $value) { $total += $array_of_the_numbers[$key]; ++$count; } // wow, that's a toughie! $average = $total / $count; // then you could

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;$icount($numberArray);$i++) $sum += $numberArray[$i]; return $sum / count($numberArray); } echo average(array (1,2,3,4,5)); Hope

[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: ?php $fileLoc = Bid2002/pictures.txt; $zFile = fopen($fileLoc, r); $zContents = fread($zFile, filesize($fileLoc)); fclose($zFile); echo a

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

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 database

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 Ok so

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

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 could earlier see

[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 the

[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,

[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 Lotus

[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

[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- From:

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 in

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

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 how

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 it do it

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

[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

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? :)

[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

<    1   2