Re: [PHP] Re: how to send spaces in the url

2002-05-09 Thread Kevin Stone
LOL! A standard!? In Javascript!? You must be joking. :-) Nope. But it's not difficult. You simply have to access the url string with 'document.location.href', parse out the values individually and replace the space placeholders. Can't remember what the exact javascript function would be..

Re: [PHP] date comparison again

2002-05-09 Thread Miguel Cruz
On Wed, 8 May 2002, Scott St. John wrote: > Sorry to be so thick this morning, but I have a unix time stamp in my MS > Sql server that is the date, plus 60 days to expire a password. I want to > take today's date and compare to the two to see: > 1)How many days until the password expires > 2)If

Re: [PHP] date comparison again

2002-05-09 Thread Scott St. John
Thank you Miguel! I was missing the /86400 and it works much better now :) On Thu, 9 May 2002, Miguel Cruz wrote: > On Wed, 8 May 2002, Scott St. John wrote: > > Sorry to be so thick this morning, but I have a unix time stamp in my MS > > Sql server that is the date, plus 60 days to expi

[PHP] register_globals in php4

2002-05-09 Thread Patrick Hsieh
Hello list, php4.1 recommends to set register_globals=off in php.ini to make php more strict. My question is, if I turn off register_globals, what will happen if any malicious user just try to modify the variable values in the url? Say, http://www.domain.com/xxx.php?id=3&sex=female Does it wor

Re: [PHP] register_globals in php4

2002-05-09 Thread Miguel Cruz
On Fri, 10 May 2002, Patrick Hsieh wrote: > php4.1 recommends to set register_globals=off in php.ini to make php > more strict. My question is, if I turn off register_globals, what will > happen if any malicious user just try to modify the variable values in > the url? Say, > > http://www.domain

Re: [PHP] A pen pal system with Photo upload feature

2002-05-09 Thread Bogdan Stancescu
You may also use blobs to store the images in the database. That may induce some major slowdown for large numbers of images. I would suggest going with a directory structure on the filesystem, managing the structure from PHP and allowing no more that 100 images per directory. For example:

Re: [PHP] PHP --> HTML

2002-05-09 Thread Matt Williams
On Thursday 09 May 2002 1:23 pm, Dan Hardiker wrote: > You could also use some form of spider to go through your website. These > are usually aimed at downloading a website to your local machine, or for > mass caching. > This should have the effect your after with minimum fuss and no rewriting >

Re: [PHP] Re: error-catching

2002-05-09 Thread J Smith
You can write your own error handlers using set_error_handler(). Then, depending on the error code, you can decide whether you should display the error message, email it to you, log it, whatever. http://www.php.net/manual/en/function.set-error-handler.php If you just want to hide the error me

Re: [PHP] Re: error-catching

2002-05-09 Thread Gert Mellak
J Smith <[EMAIL PROTECTED]> schrieb in im Newsbeitrag: [EMAIL PROTECTED] > > You can write your own error handlers using set_error_handler(). Then, > depending on the error code, you can decide whether you should display the > error message, email it to you, log it, whatever. > > http://www.php.ne

[PHP] Re: error-catching

2002-05-09 Thread Andreas Indahl
use or die ("DB-server down"); at the end of you line. "Gert Mellak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hi! > > When I open a database connection and i. e. the db-server is down, > I get a very long, long error message telling me that the server is down. > > What I wa

[PHP] include text from a html-file online

2002-05-09 Thread Andreas Indahl
I want to include text from a html-file that is online at another website. To be more precise: I want to include my seti-stats from http://setiathome.ssl.berkeley.edu/ on my own homepage. Can I do this with PHP? Sincerely Andreas Indahl -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] error-catching

2002-05-09 Thread Herbert Mraz
Gert, to prevent PHP to output any error messages, you can prefix the expression with @, i.e. $db = @mysql_connect( $host, $user, $password) or die ('Sorry, server is down!'); Greetings, Herb - Original Message - From: "Gert Mellak" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thur

[PHP] Re: include text from a html-file online

2002-05-09 Thread Gert Mellak
Andreas Indahl <[EMAIL PROTECTED]> schrieb in im Newsbeitrag: [EMAIL PROTECTED] > I want to include text from a html-file that is online at another website. > To be more precise: I want to include my seti-stats from > http://setiathome.ssl.berkeley.edu/ on my own homepage. Can I do this with > PH

Re: [PHP] A pen pal system with Photo upload feature

2002-05-09 Thread Tyler Longren
This might help you: http://www.phpbuilder.com/columns/william19990908.php3?page=1 Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: "Thomas Edison Jr." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 09, 2002 12:2

[PHP] Nitpicking - PHP 4.2.0 for windows says version is 4.1.2

2002-05-09 Thread Garth Dahlstrom
Anyone notice this... when you do a you get "PHP Version 4.1.2", while my apache window says "Apache/1.3.20 (Win32) PHP/4.2.0 running..." -G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] gobbling replace

2002-05-09 Thread Josh & Valerie McCormack
I'm doing a str_replace (same thing happens with ereg and preg) and when the pattern is found it's erasing everything after it and doing a strange replace, too. I'm using a seven column CSV (new_data.csv) where the first [0] column is first name and the second [1] is last name. This is what I'

RE: [PHP] Re: how to send spaces in the url

2002-05-09 Thread Matthew Walker
Might I suggest using PHP's urlencode() to encode the string, and Javascript's function unescape()? Matthew Walker Senior Software Engineer ePliant Marketing -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 11:37 AM To: [EMAIL PROTECTED] Sub

Re: [PHP] Re: error-catching

2002-05-09 Thread Miguel Cruz
On Thu, 9 May 2002, Gert Mellak wrote: >> If you just want to hide the error message, there's nothing wrong with >> using @. > > ok, it's a new point of view... I've always thought that this is bad > programming style! It's bad if you're using it to hide errors rather than fixing them. If you h

[PHP] fsockopen, and remaining data in buffer

2002-05-09 Thread Demitrious S. Kelly
Hello Guys! I'm having troubles with not knowing the amount of data which is waiting to be received in the buffer for a specific socket I can use fsockopen, establish a connection, and write to the socket, I can read from the socket just fine as well. The trouble I'm running into is illustrate

Re: [PHP] Nitpicking - PHP 4.2.0 for windows says version is 4.1.2

2002-05-09 Thread Garth Dahlstrom
Interesting that you mention that, when I do PHP-CLI > test.html I get Version 4.2.0 ... which is the CGI version Built April 20 2002 However my web server (I run it as an SAPI module) has: "Apache/1.3.20 (Win32) PHP/4.2.0 running..." in the console window and gives me Version 4.1.2, Build M

[PHP] simple array question (Am a Newbie kindly excuse.)

2002-05-09 Thread r
Greetings my PHP people. Will do things a bit backwork code first and what i want as that seems the easiest way to explain Here is the code: "); while(list($aa1,$aa2) = each ($a1)) { print($aa2 . ","); } ?> Which gives out the output: Tesing arrays: ryan1, ryan1.2, ryan2, ryan2.1.1.1.1.1, ryan3

RE: [PHP] simple array question (Am a Newbie kindly excuse.)

2002-05-09 Thread Matthew Walker
Try this: "); for($i=0; $i < count($a1); $i++) { { echo($a2[$i]); if ($i != (count($a1) - 1)) { echo ","; } } ?> Matthew Walker Senior Software Engineer ePliant Marketing -Original Message- From: r [mailto:[EMAIL PROTECTED]] Sent: Friday, May

Re: [PHP] simple array question (Am a Newbie kindly excuse.)

2002-05-09 Thread Miguel Cruz
echo join (',', $a1); On Fri, 10 May 2002, r wrote: > Here is the code: > $a1[]="ryan1"; > $a1[]="ryan1.2"; > $a1[]="ryan2"; > $a1[]="ryan2.1.1.1.1.1"; > $a1[]="ryan3"; > $a1[]="ryan3.2"; > reset($a1); > > print("Tesing arrays:"); > while(list($aa1,$aa2) = each ($a1)) > { > print($aa2 . ","); >

Re: [PHP] Destroying Sessions

2002-05-09 Thread Steve Buehler
Best bet is to go to any book store that carries programming books and pick up a book on PHP. There are so many different things that you need to know that nobody can mention them all here. The other option is to go to http://www.php.net and read everything the site has. $var = $value assigns

[PHP] multi-dimensional array

2002-05-09 Thread Steve Buehler
I am trying to learn some new things in the hopes that it would help me with my mysql/PHP programming. The following code gives me an error: " Warning: Illegal offset type in z.php on line 25 ". $result=mysql_query("SELECT * FROM division"); while(($row=mysql_fetch_object($result))){ $div_id=$

Re: [PHP] Multiple File Download

2002-05-09 Thread Miguel Cruz
Any luck? I started playing with it but then ran into the fact that we don't have the gz functions compiled into our PHP. Before I really dug in, thought I'd check whether you got it working. miguel On Tue, 7 May 2002, Steven Walker wrote: > Miguel, > > That is very nice of you! I found the

Re: [PHP] multi-dimensional array

2002-05-09 Thread Miguel Cruz
Line 25 looks like this: $division[$div_id][$array]=array(); The first subscript to division is $div_id, which is fine. The second one is $array, which is an array. That doesn't make any sense. Array keys have to be strings or numbers. You'd have to create a separate array at each subscrip

[PHP] Solved:->Simple array question (Walker,Cruz)

2002-05-09 Thread r
Hey guys, Just wanted to let you know Thanks for the help and solving my problem. I posted that mail and 10 minutes later i got my answer...are these guys (Matthew walker,Miguel cruz) helpful or what? Helpful,kind people,quick answers this list is great, but its only the people who make the list..

RE: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-09 Thread David Freeman
> I was talking in general. The BBS was simply an example to > make things clearer. I am *not* developing a BB system! > If you want you can think of a immaginary tool that makes > a website load twice as fast, need the half web > space and makes the website look nicer, of course at lowe

RE: [PHP] problems with

2002-05-09 Thread David Freeman
> a table with several contents, and I have a form on every > row, the problem is that the form is to big, so the tab le > looks ugly, I tried with everything I could come up with, The tags imply a break which adds space vertically. It's contrary to doing good html and will most likely c

[PHP] Re: multi-dimensional array

2002-05-09 Thread J Smith
You can't set an array subscript using an array; it should be a numerical value or a string. What you want to do is $division[$div_id] = $array; Better yet, try: $divison[$div_id] = mysql_fetch_array($result, MYSQL_ASSOC); J Steve Buehler wrote: > I am trying to learn some new things i

[PHP] Is there any way to change the process user (logon user) for a running script??

2002-05-09 Thread Jeffrey D. Means
I have come across a situation where I need to temporarly change the user profile in the middle of a script. I would prefer to do this than to change ownership of files to allow the script to be able to read them. I don't know whose files I will be reading when the script runs, however I need to

[PHP] External authentication and PHP_AUTH_PW containing plain text password

2002-05-09 Thread Lenny Miceli
I've tried to search the archives/bug reports/faq's and didn't find any definitive answers on the security issue dealing with the plain text password being kept in PHP_AUTH_PW even when you use external authentication. Since it seems like the developers haven't answered any of the bug reports rel

Re: [PHP] register_globals in php4

2002-05-09 Thread 1LT John W. Holmes
- Original Message - From: "Patrick Hsieh" <[EMAIL PROTECTED]> > Hello list, > > php4.1 recommends to set register_globals=off in php.ini to make php > more strict. My question is, if I turn off register_globals, what will > happen if any malicious user just try to modify the variable val

[PHP] why doesn't $books[$val][display] show the value

2002-05-09 Thread Peter J. Schoenster
Hi, I've got an array like the following: $books = array( "1572316217" => array( category=> 'tech', display => 'Steve McConnell\'s Software Project Survival Guide', href=>

Re: [PHP] register_globals in php4

2002-05-09 Thread Kevin Stone
- Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: "Patrick Hsieh" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, May 09, 2002 11:52 AM Subject: Re: [PHP] register_globals in php4 > On Fri, 10 May 2002, Patrick Hsieh wrote: > > php4.1 recommends to set register

[PHP] Re: why doesn't $books[$val][display] show the value

2002-05-09 Thread Philip Hallstrom
It has to do with precedence (I think). When inside a double quoted string PHP evalutes "$books[$val]" *first* and doesn't catch that there's more to it... You can do this: $html.= " Yaddda yadda " . $books[$val][display]; And I think this (or something close to it): $html.= " Yaddda yadda {$

Re: [PHP] register_globals in php4

2002-05-09 Thread Miguel Cruz
On Thu, 9 May 2002, Kevin Stone wrote: >> If register_globals is off, then you'll get $_GET['id'] = 3 and >> $_GET['sex'] = female. It's then up to you to make sure those are okay. >> But at least $id and $sex won't get set until you explicitly set them in >> your code. > > Hmm. No offense Migue

Re: [PHP] External authentication and PHP_AUTH_PW containing plaintext password

2002-05-09 Thread Rasmus Lerdorf
The code is pretty obvious in sapi/apache/mod_php4.c in the init_request_info() function. On Thu, 9 May 2002, Lenny Miceli wrote: > I've tried to search the archives/bug reports/faq's and didn't find any > definitive answers on the security issue dealing with the plain text password > being kept

[PHP] passing variables between php forms

2002-05-09 Thread baldey_uk
Hi sorry to annoy you AGAIN, but i cant seem to get it working i think its something to do with the order that i put things in: #end of html and start of php script '; ?>php # end of php script back into html Are your details correct? If i put the echo or INPUT type outside of the

[PHP] DOMXML......aaaahhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!!

2002-05-09 Thread Jarrad Kabral
Im tearing my hair out over how buggy DOMXML is! Im trying to get my Hosting provider to update to PHP 4.2 cause I hear alot of memory leaks for DOMXML are dealt with in this versioncan anyone who has 4.2 confirm or deny this?? Thanking you all in advance Jarrad Kabral -- PHP General

[PHP] DOMXML in 4.2.0 problems

2002-05-09 Thread Thalis A. Kalfigopoulos
I'm trying to get DOMXML to work with PHP4.2.0. I've compiled with --with-dom and phpinfo() says it's there: DOM/XML enabled libxml Version 2.4.18 HTML Support enabled XPath Support enabled XPointer Support enabled The following program though doesn't seem to work: $xmlstring='a valid xml docum

Re: [PHP] passing variables between php forms

2002-05-09 Thread Bogdan Stancescu
What exactly goes wrong? Indeed, you _should_ have $_POST["testvar"] available in the next page... The only problem I see is that you first echo the input and only then do you start the forms... which is an HTML problem, not a PHP one. Bogdan baldey_uk wrote: >Hi sorry to annoy you AGAIN, bu

[PHP] multiple db, multiple table join

2002-05-09 Thread Dan Vande More
Good evening all, I have a strange situation which I cannot think myself out of. To make it simple my db looks like this (hr db, emp_master table) ++---+ | emp_id | last_name | ++---+ | 1 | smith | | 3 | wesson| |

Re: [PHP] Multiple File Download

2002-05-09 Thread Steven Walker
Miguel, Thanks for following up. I got the zip functions all working last night. I deconstructed a zip file created by ZipIt and was able to discover where the PHP class was going wrong. Basically, there is a segment called 'data descriptor' that was being written into the file without the pr

RE: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-09 Thread SP
Obviously most coders are in the middle ground. They are not writing "the killer app of all time" but is of significant value. I don't know what people on here are charging but I can't add $2880 a year to my overhead for the zend encoder. Plus add $1875 per cpu for the zend accelerator for each

Re: [PHP] multiple db, multiple table join

2002-05-09 Thread Miguel Cruz
This really isn't a PHP question at all. Anyway, you just need to give nicknames to multiple instances of the same table (here I use e1 and e2). Something like... select order_id, e1.last_name, e2.last_name from tools.orders, hr.emp_master e1, hr.emp_master e2 where orders.emp_id=e1.emp_i

[PHP] Array loop help

2002-05-09 Thread CDitty
Can someone offer any help with the code below? I have a cookie that is set and is separated by pipes (|). For each segment, I have to look up the id in a text file. I can loop through the cookie and get each segment, but when I open the text file and loop through it, it only matches the first seg

RE: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-09 Thread David Freeman
> Obviously most coders are in the middle ground. > They are not writing "the killer app of all time" > but is of significant value. I don't know what > people on here are charging but I can't add $2880 > a year to my overhead for the zend encoder. Plus > add $1875 per cpu for the zend ac

Re: [PHP] Destroying Sessions

2002-05-09 Thread Steve Buehler
Nokeep writing to the list. Next time, you might actually give the example like you did here so that, hopefully someone will be able to answer you better (I have a problem of not including enough myself). The first question, in itself, sounded like a basic question. I would be

Re: [PHP] Destroying Sessions

2002-05-09 Thread Chris Knipe
> I am not an expert at PHP / MySQL. To me it would sound like the > one = is assigning the $VerifyPasword[ContactID] whatever is in > $_SESSION['ContactID'] which would mean that the else part would never be > executed. Honestly though, there is a lot that I don't know. I know very I

Re: [PHP] gobbling replace

2002-05-09 Thread Analysis & Solutions
On Thu, May 09, 2002 at 03:17:09PM -0400, Josh & Valerie McCormack wrote: > I'm doing a str_replace (same thing happens with ereg and preg) and when > the pattern is found it's erasing everything after it and doing a > strange replace, too. > > I'm using a seven column CSV (new_data.csv) where

Re: [PHP] gobbling replace

2002-05-09 Thread Analysis & Solutions
On Thu, May 09, 2002 at 11:39:34PM -0400, Analysis & Solutions wrote: > On Thu, May 09, 2002 at 03:17:09PM -0400, Josh & Valerie McCormack wrote: > > > 6 123 123 123 123 123 123 John Smith 456 456 456 456 4 > > The odd replacement is due to the itterations for each record in the csv file Pa

Re: [PHP] Destroying Sessions

2002-05-09 Thread Jason Wong
On Friday 10 May 2002 10:52, Steve Buehler wrote: > Nokeep writing to the list. Next time, you might actually Good idea. [snip] > >What baffles me, is > > > > while ($VerifyPassword = mysql_fetch_array($PasswordCheckSQL)) { > > // Compare UserIDs > > if

Re: [PHP] passing variables between php forms

2002-05-09 Thread Jason Wong
On Friday 10 May 2002 07:41, baldey_uk wrote: > Hi sorry to annoy you AGAIN, but i cant seem to get it working i think > its something to do with the order that i put things in: > > > #end of html and start of php script > > > #Take the Variables from enterdetails.php that are posted from an

Re: [PHP] Destroying Sessions

2002-05-09 Thread Chris Knipe
> if ($VerifyPasword[ContactID] = $_SESSION['ContactID']) > > This statement is /always/ true if $_SESSION['ContactID'] is non-zero, or > non-empty. > > If your code is copy-and-paste then the error is most likely because you used > a single 's' in $VerifyPasword[ContactID]. And also is better t

[PHP] Date Q

2002-05-09 Thread Jason Soza
If I have a MySQL field full of dates and other info, and my PHP script displays all this, how would I isolate the min and max in the date field? Like I want to print something like: Information, from 01-03-2001 through 01-03-2002 If someone could give me an example or point me to the manual sec

[PHP] Bandwidth monitoring {!?}

2002-05-09 Thread Liam MacKenzie
Hi all, I was wondering if anyone knows of a system that will keep track of the amount of bandwidth a site has used. For example, someone has webspace, but is limited to 1 gig of data transfer. Someone downloads a 500M file off their site, so they've obviously got 500M left. Is there a script th

Re: [PHP] Date Q

2002-05-09 Thread Jason Wong
On Friday 10 May 2002 13:02, Jason Soza wrote: > If I have a MySQL field full of dates and other info, and my PHP script > displays all this, how would I isolate the min and max in the date field? > Like I want to print something like: > > Information, from 01-03-2001 through 01-03-2002 > > If som

RE: [PHP] Date Q

2002-05-09 Thread Jason Soza
Thanks for the code, but I already have: $result = mysql_query("SELECT * FROM table"); And I use while ($row = mysql_fetch_array($result)) along with extract($row) to get my data. It's been my general understanding that querying twice in one script is bad. How do I incorporate your code into my

RE: [PHP] Date Q

2002-05-09 Thread Miguel Cruz
On Thu, 9 May 2002, Jason Soza wrote: > Thanks for the code, but I already have: > $result = mysql_query("SELECT * FROM table"); > > And I use while ($row = mysql_fetch_array($result)) along with extract($row) > to get my data. > > It's been my general understanding that querying twice in one sc

Re: [PHP] Bandwidth monitoring {!?}

2002-05-09 Thread Miguel Cruz
On Fri, 10 May 2002, Liam MacKenzie wrote: > I was wondering if anyone knows of a system that will keep track of the > amount of bandwidth a site has used. > For example, someone has webspace, but is limited to 1 gig of data transfer. > Someone downloads a 500M file off their site, so they've obvi

Re: [PHP] Re: why doesn't $books[$val][display] show the value

2002-05-09 Thread Peter J. Schoenster
On 9 May 2002 at 15:25, Philip Hallstrom wrote: > It has to do with precedence (I think). When inside a double quoted > string PHP evalutes "$books[$val]" *first* and doesn't catch that > there's more to it... > > You can do this: > > $html.= " Yaddda yadda " . $books[$val][display]; > > And

RE: [PHP] Date Q

2002-05-09 Thread Martin Towell
if you insist in using your existing loop, try this (in pseudo-code) min_date = some really large date (31-Dec-2100 maybe?) max_date = some really small date (01-Jan-1970 maybe?) while (row = fetch(result)) { if (curr_date > max_date) max_date = curr_date if (curr_date < min_date) min_date

[PHP] Adding up values

2002-05-09 Thread Liam MacKenzie
Hey all, another real basic question, how would I add up all the numbers in a log file in this format? Start log file 6353 3309 294 762 6443 6353 3309 - - - - - - 294 762 6353 6443 3309 - - - - - - - - 294 867 859 7695 97 49 - - - - --- end log file how can I

[PHP] php_register_variable()

2002-05-09 Thread Serguei I. Ivantsov
Hello! I need some help with subj function. I execute that function before php_execute_script() but variables seems to be not available within my script. How can I register variable from the C program (/sapi/cli) to see it available in the script ? -- Regards, Serguei I. Ivantsov

Re: [PHP] Adding up values

2002-05-09 Thread Miguel Cruz
There's really not much to it. The intval of '-' is 0, so it doesn't cause any problems. $numbers = file('path/logfile.txt'); $total = 0; foreach ($numbers as $num) $total += intval($num); miguel On Fri, 10 May 2002, Liam MacKenzie wrote: > another real basic question, how would I add up

[PHP] PHP builds

2002-05-09 Thread Liam MacKenzie
Hi all, I need some opinions, what are some good modules to build into PHP? I'm starting a hosting service (properly) Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Getting the HTML Name Value in Forms(newbie)

2002-05-09 Thread Daniel
ok, i have the following script HTML File --- Your name: You email: Product1 Product2 --- End HTML Form --- Ok, its just a simple purchase script for a free online game.. I know how to get the value of the thing via $Prod1 or $Prod2.. however this form is emailed, so how can i get

[PHP] Array usage affecting server

2002-05-09 Thread Kevin Meredith
Hi. When a database query is done and the results are put into an array, what are the resources used? I name all arrays differently and was wondering how it would affect the performance of the server if many people connected with many arrays being full. I am assuming the array gets 'dropped' wh

Re: [PHP] Adding up values

2002-05-09 Thread Jason Wong
On Friday 10 May 2002 14:27, Miguel Cruz wrote: > There's really not much to it. The intval of '-' is 0, so it doesn't cause > any problems. > > $numbers = file('path/logfile.txt'); > $total = 0; > foreach ($numbers as $num) $total += intval($num); Or use array_sum(): $numbers = file('pa

[PHP] Web hoster solution?

2002-05-09 Thread Darren Gamble
Good day, A friend of mine has been asked to set up a simple website for a third party, which will be used by visitors to order products. She has been programming for a little while now, but, she doesn't have much experience with other web hosting companies (and neither do I, really). I know th

Re: [PHP] Date Q

2002-05-09 Thread Jason Wong
On Friday 10 May 2002 13:14, Jason Soza wrote: > Thanks for the code, but I already have: > $result = mysql_query("SELECT * FROM table"); select *, min(datefield) as mindate, max(datefield) as maxdate from table; Should work. > It's been my general understanding that querying twice in one scr