Re: [PHP] Regular Expressions?

2001-04-19 Thread Brian Clark
Hi Jason, @ 3:08:06 AM on 4/20/2001, Jason Caldwell wrote: > Sorry if I seem dense. Your answer (although probably right on target) > leaves me still confused :-) No problem at all. > The example you gave me: > $string = '.'; > print(eregi("^([[:alnum:]]+\.[[:alnum:]]+)", $string) ?

Re: [PHP] bounces from messages send to this list

2001-04-19 Thread Brian Clark
@ 2:52:37 AM on 4/20/2001, B. van Ouwerkerk wrote: ... > Some are caused by misconfigured mailserver (solfix.net is a very good > example). Those morons (solfix.net) have been bugging absolute the s*$t out of me with that stupid subscription request for months. Maybe someone crafty should send

RE: [PHP] displaying string combinations

2001-04-19 Thread Jack Dempsey
why not do this: //generate your random number and save it in $randomNumber switch($randomNumber){ case 1: echo "$banner1"; break; case 2: echo "$banner2"; break; case 3: echo "$banner3";

Re: [PHP] Regular Expressions?

2001-04-19 Thread Jason Caldwell
Brian -- Sorry if I seem dense. Your answer (although probably right on target) leaves me still confused :-) The example you gave me: $string = '.'; print(eregi("^([[:alnum:]]+\.[[:alnum:]]+)", $string) ? 'matched' : 'no match'); Now with your example (above) the following MATCHED (wh

RE: [PHP] Newbie question: Page Counter

2001-04-19 Thread Jack Dempsey
chmod is a *nix command. you do it to the file: chmod 777 counter.inc on the command line -jack -Original Message- From: Marthe Kristiansen [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 3:04 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Newbie question: Page Counter >then m

[PHP] displaying string combinations

2001-04-19 Thread Ray Iftikhar
hello, I have a bunch of "Banner" strings (ie. $banner1, $banner2, $banner3, $banner4). I have another set of "random" strings that randomly generate a value 1-4 ($RandBanner1, $RandBanner2, $RandBanner3,$RandBanner4). Now I want to display $banner1-4 randomly. I plan on doing this by: print "

Re: [PHP] SETUP PHP , MYSQL, APACHE

2001-04-19 Thread B. van Ouwerkerk
>Hello all, hope that everyone had a nice weekend. >I'm new to this form. I am about to install mysql, apache, and php on my >linux box >(redhat 7) WHy do you think people have invented archives for lists like these This question has been asked some many times I can't even remember. Same

[PHP] bounces from messages send to this list

2001-04-19 Thread B. van Ouwerkerk
Hi, I'm getting LOTS of bounces whenever I send a message to this list. This is the only lists from which I'm experiencing this kind of problems. It's very annoying to receive multiple bounces because of one message. Some are caused by misconfigured mailserver (solfix.net is a very good examp

RE: [PHP] Newbie question: Page Counter

2001-04-19 Thread Marthe Kristiansen
>then make a file called count.inc and chmod it to 777 so anyone can write to >it. insert a number into the file. Hey! I tried to make this counter.php-file, that went ok, I think My problem is to make the count.inc-file, I could make it but I have no idea how to put "chmod" to "777" in it. The n

[PHP] Re: Using mogrify ..

2001-04-19 Thread Mathur
Bob Friesenhahn wrote: > On Thu, 12 Oct 2000, Mathur wrote: > > > Hi ! > > Now I have installed jpeg library seperately, and recompiled Imagemagick > > --without-perl > > The status after ./configure indicates that jpeg library is now available. > > Now I am able to resize image from command li

Re: [PHP] Lynx, Cron and PHP

2001-04-19 Thread Tom Rogers
Hi Just run lynx -dump url > /dev/null in the cron Tom At 10:55 AM 20/04/01 +1000, Chris Aitken wrote: >I have a PHP script which runs a query, and emails the results to me. I am >trying to make Cron run this script. > >I can get it to launch my PHP script and it emails me fine, but the >pro

Re: [PHP] Regular Expressions?

2001-04-19 Thread Brian Clark
Hi Jason, @ 2:43:26 AM on 4/20/2001, Jason Caldwell wrote: > Actually ordered that very book (earlier) tonight on Amazon. Looking > forward to getting it. It's likely to be one of the most valuable books you own. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list

Re: [PHP] Regular Expressions?

2001-04-19 Thread Brian Clark
Hi Jason, @ 2:40:34 AM on 4/20/2001, Jason Caldwell wrote: > I'm a little lost as to the exact function of the following: > ^ and $ ^ beginning of a string. $ end of a string. > I noticed in the example below... that when I added the $ to the end of the > expression, I wasn't able anymore to

Re: [PHP] Regular Expressions?

2001-04-19 Thread Jason Caldwell
Thats what the book said too... but what I'm confused about is the word START and END -- at what point does the start end, and the end begin? If you look at my example below aaa.a! <-- matched > > aaa.! <-- no match > > after I put the $ on the end > > aaa.a! <-- no match > > aaa.aa32 <-- matc

Re: [PHP] Regular Expressions?

2001-04-19 Thread David Robley
On Fri, 20 Apr 2001 15:49, Jason Caldwell wrote: > Thanks Brian! > > Very helpful. Is there a good website that covers Regular Expressions? > > Jason > >From my collection - there are duplicates^W^W^W. Heck, might as well tidy this up. There aren't duplicates. Thanks to those who have variously

Re: [PHP] regarding time()

2001-04-19 Thread David Robley
On Fri, 20 Apr 2001 16:03, [EMAIL PROTECTED] wrote: > hi.. > i have some problem regarding time() functions.it returns the time with > some offset w.r.t to our normal system time.for eg,if according to > indian time its 2.10 it shows 4.30.how to solve this problem??? i have > tried using many othe

RE: [PHP] Regular Expressions?

2001-04-19 Thread Jack Dempsey
if you put ^ at the start of your regexp, that means you want the start of the string to match your expression...$ is used for the end of the string... -jack -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 2:41 AM To: [EMAIL PROTECTED] Subj

Re: [PHP] Regular Expressions?

2001-04-19 Thread Jason Caldwell
Actually ordered that very book (earlier) tonight on Amazon. Looking forward to getting it. Thanks. "Brian Clark" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Jason, > > @ 2:19:48 AM on 4/20/2001, Jason Caldwell wrote: > > > Thanks Brian! > > No proble

Re: [PHP] Regular Expressions?

2001-04-19 Thread Jason Caldwell
I'm a little lost as to the exact function of the following: ^ and $ I noticed in the example below... that when I added the $ to the end of the expression, I wasn't able anymore to put a non-alphanumeric character in the end, for example (without the $) I was able to enter the following and ge

Re: [PHP] Regular Expressions?

2001-04-19 Thread Brian Clark
Hi Jason, @ 2:19:48 AM on 4/20/2001, Jason Caldwell wrote: > Thanks Brian! No problemo. > Very helpful. Is there a good website that covers Regular Expressions? There is a GNU Regular Expressions Document out there somewhere if you want to know most of it inside an out (google.com will proba

Re: [PHP] How do I detect if mysql_connect failes?

2001-04-19 Thread Steve Edberg
At 5:22 AM +0200 4/20/01, Marcus Rasmussen wrote: >I CAN detect if an erro occours. (just some error I did) > >I still don't get any return from mysql_errno() or mysql_error() >I don't iether get a return from mysql_errno() or mysql_error() when >I do not surpress with @ (the function, mysql_conn

[PHP] regarding time()

2001-04-19 Thread reena_aanchal
hi.. i have some problem regarding time() functions.it returns the time with some offset w.r.t to our normal system time.for eg,if according to indian time its 2.10 it shows 4.30.how to solve this problem??? i have tried using many other functions date,mktime(),etc.. please help in this regard..

Re: [PHP] Regular Expressions?

2001-04-19 Thread Jason Caldwell
Thanks Brian! Very helpful. Is there a good website that covers Regular Expressions? Jason "Brian Clark" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Jason, > > @ 1:43:19 AM on 4/20/2001, Jason Caldwell wrote: > > ... > > I want to match any of the fo

Re: [PHP] Regular Expressions?

2001-04-19 Thread Brian Clark
Hi Jason, @ 1:43:19 AM on 4/20/2001, Jason Caldwell wrote: ... > I want to match any of the following: > 1.1 or a.a > or . or .<-- any number of digits (0-9) or alpha (a-z) > on either side of the dot. > if(eregi("^([0-9][a-z]\.[0-9][a-z]", $myArray[x])) Your parentheses

[PHP] Re: Regular Expressions?

2001-04-19 Thread yanto
(eregi("([0-9][a-z][A-Z]\.[0-9][a-z][A-Z]", $myArray[x])) and don't use character '^' in front of the pattern. -toto- Jason Caldwell writes: > I'm looking to compare if my array values match any digits or alpha > characters with a dot between them... so, if I think I understand Regular > Expr

[PHP] Re: Newbie question: Page Counter

2001-04-19 Thread yanto
this counter'll increment the counter, no matter where are you go the page from. If you only want that the counter increment for the first time visitor visit the website, put the code at mainpage file, and check also the page referrer weather it's a local url or not. -toto- Adam writes: > mak

Re: [PHP] Regular Expressions?

2001-04-19 Thread elias
It seems good to me except there is an unbalanced '('... -elias http://www.kameelah.org/eassoft ""Jason Caldwell"" <[EMAIL PROTECTED]> wrote in message 9boi65$ipb$[EMAIL PROTECTED]">news:9boi65$ipb$[EMAIL PROTECTED]... > I'm looking to compare if my array values match any digits or alpha > char

[PHP] Regular Expressions?

2001-04-19 Thread Jason Caldwell
I'm looking to compare if my array values match any digits or alpha characters with a dot between them... so, if I think I understand Regular Expressions (from what I could gather from PHP.net and Core PHP Programming by Leon Atkinson.) I want to match any of the following: 1.1 or a.a or .1

Re: [PHP] Newbie question: Page Counter

2001-04-19 Thread Adam
make a file called counter.php and include this text: //-counter.php-- ---// //-- --// then make a file called count.inc and chmod it to 777 so anyo

Re: [PHP] HTML and slashes.

2001-04-19 Thread Floyd Piedad
Could you enlighten me on the advantages or disadvantages and dangers of turning-on both magic_quotes_gpc and magic_quotes_runtime? Thanks, Floyd Piedad Plutarck wrote: > Check magic_quotes_runtime in your ini. If it's on, turn it off. > > Use the htmlspecialchars() family of functions. They w

[PHP] Use of special characters in filenames results in IE problems

2001-04-19 Thread Floyd Piedad
Hi, I discovered a bug in my program for uploading files, which stores the filename in the database in order to create a link for it on the web page in the future. The bug is when the filename makes use of special characters (e.g. Oplæg). When I create a link to the file, the link works with Ne

RE: [PHP] Output HTML Compression

2001-04-19 Thread Andrew Braund
you might want to look at mod_gzip http://www.remotecommunications.com/apache/mod_gzip/ Regards Andrew Braund > -Original Message- > From: Floyd Piedad [mailto:[EMAIL PROTECTED]] > Sent: Friday, 20 April 2001 13:33 > Cc: [EMAIL PROTECTED] > Subject: [PHP] Output HTML Compression > > >

[PHP] Output HTML Compression

2001-04-19 Thread Floyd Piedad
Hi, Any tips on how to speed-up dynamic page loads by either lessening the HTML file sent or compressing it? I found two ways but don't exactly know how to do it. 1. Enable output buffering with compression. This seems to be only available on php4.04. Is there a way to do this with php4.01? 2.

RE: [PHP] Which is better coding style...

2001-04-19 Thread Joe Sheble \(Wizaerd\)
egads... it distracts me to no end to see an if-else block broken up that way... to me seeing if( some expression ) { some action } else { some other action } is the most normal thing in the world. Same goes for the { at the end of the expression, such as for( ... ) { } whil

[PHP-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4

2001-04-19 Thread Rasmus Lerdorf
rasmus Thu Apr 19 20:34:10 2001 EDT Modified files: /CVSROOTavail cvsusers gen_acl_file.m4 Log: PEAR account for Jeffery Charles Cann Index: CVSROOT/avail diff -u CVSROOT/avail:1.149 CVSROOT/avail:1.150 --- CVSROOT/avail:1.149 Thu Apr 19 15:08:21 2001 +

Re: [PHP] How do I detect if mysql_connect failes?

2001-04-19 Thread Marcus Rasmussen
I CAN detect if an erro occours. (just some error I did) I still don't get any return from mysql_errno() or mysql_error() I don't iether get a return from mysql_errno() or mysql_error() when I do not surpress with @ (the function, mysql_connect(), then prints a message.) Guess I could surpress

Re: [PHP] Handling Macintosh filenames in PHP

2001-04-19 Thread Julian Wood
On a Mac it is just diskname:folder1:folder2:blah.txt The colon is the path delimiter, and is the only illegal character in a mac path. But I'm most curious as to why you would need this. Presumably you're writing your client in a web browser? In that case you're never really exposed to the pec

Re: [PHP] How do I detect if mysql_connect failes?

2001-04-19 Thread David Robley
On Fri, 20 Apr 2001 12:19, Marcus Rasmussen wrote: > Hello. > > My question is: > How do I detect if mysql_connect() failed when I'm surpressing the > error message with @ like $linkid = > @mysql_connect("host","user","pass"); > And how do I, if it failes, get the error message? > > The manuel say

[PHP] How do I detect if mysql_connect failes?

2001-04-19 Thread Marcus Rasmussen
Hello. My question is: How do I detect if mysql_connect() failed when I'm surpressing the error message with @ like $linkid = @mysql_connect("host","user","pass"); And how do I, if it failes, get the error message? The manuel says that it: [quote]Returns a positive MySQL link identifier on succ

RE: [PHP] SESSIONS, a weird, funny yet strange error happens to wrong people...

2001-04-19 Thread Maxim Maletsky
Funny isn't it? The fact is that it is only her to see the error. The site is being tested on all the browsers, especially on one particular machine in here overloaded with all kind of different browsers for testing. Nothing, never seen that error, only her on her browser... I use cookies to mai

Re: [PHP] more an SQL issue but I can't find any help

2001-04-19 Thread David Robley
On Fri, 20 Apr 2001 11:35, Marian Vasile wrote: > I have a table with users and their birthdates. > I want to SELECT all the users who have more than 18 years. How I can > do that using bisect years ? (february 28 days and 29 days) > > plz help ... > > Marian Vasile > IT Manager > Schnecker van Wy

RE: [PHP] Newbie question: Page Counter

2001-04-19 Thread Maxim Maletsky
make one yourself: a table with the data you want to store, on every hit you insert there info, including Unique Session ID. then use simple SQL queries to read your stats. also see http://www.phpbeginner.com/columns/McDonald/counter there's an idea for beginners on how else it could work.. S

Re: [PHP] SQL Select Unique() ?

2001-04-19 Thread CC Zona
In article <9bng4u$ftc$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("James, Yz") wrote: > $sql = "SELECT * FROM table WHERE category LIKE 'Public House / Restaurant' > OR description LIKE 'Public House / Restaurant'"; > > Surely that would bring the same row back twice Surely not. Have you trie

[PHP] Newbie question: Page Counter

2001-04-19 Thread Marthe Kristiansen
Hey! I'm a bit new at PHP, my page's at http://www.marthe.com. My problem is that the counter on the page, from TheCounter.com, is far too ugly. Since I'm updating the page, I'm wondering if anyone has any good ideas on how I should make one and what I should do. Greetings, Marthe -- PHP Gene

[PHP] Handling Macintosh filenames in PHP

2001-04-19 Thread Shawn Reed
Greetings all, I'm currently in the middle of developing a rather large piece of software written in PHP. I'll spare you the details, but essentially it is a glorified FTP client. The goal here, of course, is to develop a client that will work on any platform. In theory, this SHOULD work, b

[PHP] more an SQL issue but I can't find any help

2001-04-19 Thread Marian Vasile
I have a table with users and their birthdates. I want to SELECT all the users who have more than 18 years. How I can do that using bisect years ? (february 28 days and 29 days) plz help ... Marian Vasile IT Manager Schnecker van Wyk & Pearson www.investments.ro +40 (0) 1 2309000 -- PHP Gener

Re: [PHP] Cache Control with forms

2001-04-19 Thread Rasmus Lerdorf
> Hi everyone! I have the following problem: > I don't want any of my site's pages to be saved on any browser's cache. > Yet, I want all HTML forms to keep their data when the user changes to > another page without submiting and then comes back using the back button. > > I have seen changing the

Re: [PHP-CVS] cvs: php4 /ext/oci8 oci8.c

2001-04-19 Thread Jason Greene
hahah I don't always notice everything : ) -Jason - Original Message - From: "Joe Brown" <[EMAIL PROTECTED]> To: ""Jason Greene"" <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 6:28 PM Subject: Re: [PHP-CVS] cvs: php4 /ext/oci8 oci8.c > Why didn't you Note to Not while you were at

Re: [PHP] SQL Select Unique() ?

2001-04-19 Thread David Robley
On Fri, 20 Apr 2001 05:41, James, Yz wrote: > Hi Guys, > > Is there a method of extracting rows from a MySQL table Uniquely (as in > only once) ?. For example, when a user performs a search, using two > words, it may return the same row twice if the search is spread over > two or more SQL "sel

[PHP] Cache Control with forms

2001-04-19 Thread Diego Fulgueira
Hi everyone! I have the following problem: I don't want any of my site's pages to be saved on any browser's cache. Yet, I want all HTML forms to keep their data when the user changes to another page without submiting and then comes back using the back button. I have seen changing the session.cac

Re: [PHP] Which is better coding style...

2001-04-19 Thread Szii
IMHO, I like the second. Too much real-code time to break old habits. I don't like returning mid-method. I -really- don't like it. =) As for the placement of braces...I like /* return type */ function PhpFunction(params) { } I'm usually not too worried about whitespace, either, so I'm all ab

[PHP] Lynx, Cron and PHP

2001-04-19 Thread Chris Aitken
I have a PHP script which runs a query, and emails the results to me. I am trying to make Cron run this script. I can get it to launch my PHP script and it emails me fine, but the problem is lynx gets caught up in a loop and it doesnt kill off after running the script. Is there something I n

Re: [PHP] Starting PHP script with crontab

2001-04-19 Thread Chris Lee
compile php as a cgi then do this php -q test.php done. no problem, it will probably install php into /usr/local/bin make sure its in the path -- Chris Lee [EMAIL PROTECTED] ""Bertjan Schrader"" <[EMAIL PROTECTED]> wrote in message 9bmddj$hdd$[EMAIL PROTECTED]">news:9bmddj$hdd$[EMAIL P

Re: [PHP] Which is better coding style...

2001-04-19 Thread Chris Lee
I would like to see an editor with a built in code beutifier and un-beutifier. I like the if (true) { } else { } method, but pear standards are if (true) { } else { } it would be nice to see ultra edit convert it to the first format for me and save it as the second for pear. -- Chri

Re: [PHP] Which is better coding style...

2001-04-19 Thread Chris Lee
I agree with your bracket style not your return policy. oh well :) if ($true) { // do something } else { // do something else } -- Chris Lee [EMAIL PROTECTED] ""Sander Pilon"" <[EMAIL PROTECTED]> wrote in message 008d01c0c90f$c712bbc0$ce6278d4@cc6755b">news:008d01c0c90f$c712bbc0

Re: [PHP] Which is better coding style...

2001-04-19 Thread Chris Lee
I preffer the first. -- Chris Lee [EMAIL PROTECTED] ""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Which is better? function blah() { switch( $bob ) { case 1: return "this"; case 2: return "that"; default:

Re: [PHP] Treestructure

2001-04-19 Thread Chris Lee
this is my make_tree() function like your make_node() I think function _make_tree($category_id) { global $database; static $padding = -1; foreach($database->select_array('', 'category', "WHERE category_parent = $category_id ORDER BY category_name") as $pos => $result) {

RE: [PHP] image-resize (thumbnail 150x150 code)

2001-04-19 Thread ..s.c.o.t.t..
this is what i use to scale down an arbitrary .GIF or .JPG image to 150x150... $image_name is the name of the original file that you want to create a thumbnail of... function save_thumb($image_name,$image_type) { global $Svar; $new_w = 150; $new_h = 150; $image_path

Re: [PHP] PHP and Ranges

2001-04-19 Thread Plutarck
One way is: $min = 0; $max = 65535; if ($var >= $min && $var <= $max) { ... } Though I haven't heard of a range comparison, it would be nice if one existed...especially if it could be something like "0-4, 6-8, 9-21", and it would return true of the value was within any of the specified ran

Re: [PHP] PHP and Ranges

2001-04-19 Thread Chris Lee
I can do it, it aint pretty though $val) if (in_array($val, $range)) echo "True "; else echo "False "; ?> works, just aint pretty. -- Chris Lee [EMAIL PROTECTED] ""Jason Caldwell"" <[EMAIL PROTECTED]> wrote in message 9bnos3$flm$[EMAIL PROTECTED]">news:9bnos3$flm$[EMAIL PR

RE: [PHP] Last Element in an Array?

2001-04-19 Thread ..s.c.o.t.t..
you can get the amount of elements in an array using count() and use that # as an index value for 1+ the last value (the last value that's NOT IN the array) $a = array('12', '198', 'b'); print count($a); this'll give you "3", which, as you can see, the last valid subscript of $a is $a[2]; > -

Re: [PHP] Which is better coding style...

2001-04-19 Thread Plutarck
Personally I use to use: if () { ... } But I found it utterly horrible to debug. I always missed a bracket, so I switch to: if () { ... } I find that even in multi-thousand line files I can flick my scroll mouse as fast as I can while still being able to follow brackets using that styl

Re: [PHP] List Files

2001-04-19 Thread Joe Stump
$foo = `ls help*`; $files = explode("\n",$foo); while(list(,$fname) = each($files)) echo $fname."\n"; --Joe On Thu, Apr 19, 2001 at 08:25:19AM -0400, [EMAIL PROTECTED] wrote: > Hi, > > Does anyone know how I can list all the files begining with help in one of my > pages. > > So I have a dir

RE: [PHP] PHP and Ranges

2001-04-19 Thread ..s.c.o.t.t..
this works: $r_start = 0; $r_end = 65535; $a = array('12', '198', 'b'); while ( list($k,$v) = each($a) ) { if ( ($v > $r_start) && ($v < $r_end) ) { print "[$v] OK\n"; } else { print "[$v] NOPE\n"; } } > -Original Messag

Re: [PHP] image-resize/convert

2001-04-19 Thread Joe Stump
Again - if you have imagemagick installed email me and I'll email you my little class that does this. --Joe On Thu, Apr 19, 2001 at 10:02:47AM +0200, De Bodemschat wrote: > Hello, > > I'm creating a bunch of photogalleries and wondering about the following: > > - Is it possible to convert an i

Re: [PHP] how to scale down image using ImageMagick?

2001-04-19 Thread Joe Stump
I just created a class that gets info resizes and stamps an image with text. It's pretty simple, but works. If anyone wants it email me privately. --Joe On Wed, Apr 18, 2001 at 06:00:38PM -0400, Morgan Curley wrote: > according to the docs use > -geometry 175x175> picture.jpeg > > man mogrify:

[PHP] ClibPDF -- problems with cpdf_rect and cpdf_lineto

2001-04-19 Thread galkin
Hi, I've been playing around with ClibPDF and am pulling my hair out trying to figure out some functions, specifically, cpdf_rect. and cpdf_lineto. They seem straight forward enough, but I just can't get them to work. Here's what I've tried so far: cpdf_setrgbcolor_fill($pdf, 253, 15, 15); cpdf

Re: [PHP] Newbie Technical Question

2001-04-19 Thread Plutarck
On the last question, technically yes. The key is, how big is big? If the global file is less than 1000-2000 lines, I wouldn't worry about it. If it starts getting so large that it's 50-100k, then yes you should probably break it up. Under 40k and don't even worry about it unless you are under

Re: [PHP] Last Element in an Array?

2001-04-19 Thread Andrew Hill
Jason, You can use array_pop() to return the last element of the array - $last_item = array_pop ($array); but if you just want your array processing to stop when it's reached the last item in the array (and avoid the loop) then do something like: while (list ($var1, $var2) = each ($array)) H

Re: [PHP] Last Element in an Array?

2001-04-19 Thread Rasmus Lerdorf
What are you trying to do? -Rasmus On Thu, 19 Apr 2001, Jason Caldwell wrote: > Is there a command which will tell me that it is the last in an array? > > When I use END it just gives me the value IN the array... I want to know > when I hit the last element in an array... > > This is driving me

[PHP] Last Element in an Array?

2001-04-19 Thread Jason Caldwell
Is there a command which will tell me that it is the last in an array? When I use END it just gives me the value IN the array... I want to know when I hit the last element in an array... This is driving me crazy... Thanks. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] how to scale down image using ImageMagick?

2001-04-19 Thread Noah Spitzer-Williams
right my goal was to actually alter the file size for quicker downloads and less bandwidth. the solution was a combination of morgan's and joe's posts. thansk guys! - Noah "Morgan Curley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This is a neat bit of co

Re: [PHP] HTMLSpecialchars

2001-04-19 Thread Dddogbruce \(@home.com\)
Thanks for all the advice, Brian. If you're referring to a database as MySQL or any other database technology then I guess I haven't been precise enough. I'm really quite new into PHP and I'm just using text files for now. I'm slowly working my way up to MySQL, but fooling around with my learn

[PHP] gd php freetype problem solved

2001-04-19 Thread Kurth Bemis
This is just a post to get in the archives. So if someone searches the archives for this they'll hopefully hit this one and their problems will be solved. I've battled this for two days..and have finally solved the problem. I figure that the should help someone who had problems similar to

Re: [PHP] Advanced Help Needed

2001-04-19 Thread Szii
Did you remember to base64 it? Perhaps some embedded chars in the binary file are messing with you. 'Luck -Szii - Original Message - From: Chris Anderson <[EMAIL PROTECTED]> To: Marc Davenport <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 6:36 AM Subject: Re: [

[PHP] PHP4 4.04pl1 ODBC/Openlink/Progress8.3 COUNT Problem

2001-04-19 Thread Grant Walters
Hi, Using the above combination I issue the statement SELECT COUNT(*) FROM mytable I have tried using either odbc_prepare or odbc_do with each of the cursor types SQL_CUR_USE_ODBC SQL_CUR_IF_NEEDED SQL_CUR_USE_DRIVER SQL_CUR_DEFAULT Instead of geting a resultset set with 1 row containing the

Re: [PHP] Which is better coding style...

2001-04-19 Thread David Bouw
Your coding style is not the most used.. But I must be honest and tell you that I also find the clearest way... I also use it on all my own code.. It has got the advantage that you always see all brackets (no need to scroll to the right to find a bracket) and if you go down on the same horizontal

Re: [PHP] Advanced Help Needed

2001-04-19 Thread Matt Friedman
I would put the code: at the bottom of your form page and run the page, without posting a file, and see what the phpinfo says about file uploading. Perhaps it is disabled. Even so, I can't understand why you would get a server not found. Hrm, well maybe this will shed some light. Matt Friedman

Re: [PHP] Advanced Help Needed

2001-04-19 Thread Chris Anderson
I have seen this before. For me it was a problem with the post operation.I'd give specifics, but frankly I can't remember...sorry :( - Original Message - From: "Marc Davenport" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 6:19 PM Subject: [PHP] Advanced Help N

[PHP] imap

2001-04-19 Thread Martin Oust
how can i convert the charset in an e-mail from ascii or any iso-standard, to the unicode-standard, so the webmail can be used outside english-speaking areas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

[PHP] PHP and Ranges

2001-04-19 Thread Jason Caldwell
is there a way to compare a value to a preset range. for example; $preset_ range = [0...65535] $a[0] = "12"; $a[1] = "198"; $a[2] = "B"; $ac = count($a); for($x=0; $x < $ac; $x++) { if($a[$x] != $preset_range) { $valid = 0; } else { valid = 1; } pr

[PHP] Advanced Help Needed

2001-04-19 Thread Marc Davenport
I need some help figuring something out that my host denies is his problem. I have a suspicion that only someone who has run into this problem once before has the answer. I have this form which posts to a PHP file. Sometimes I pass a file along. This was info for a database and a picture alo

[PHP-CVS] cvs: CVSROOT / avail gen_acl_file.m4

2001-04-19 Thread Rasmus Lerdorf
rasmus Thu Apr 19 15:08:21 2001 EDT Modified files: /CVSROOTavail gen_acl_file.m4 Log: Karma for Joey Index: CVSROOT/avail diff -u CVSROOT/avail:1.148 CVSROOT/avail:1.149 --- CVSROOT/avail:1.148 Thu Apr 19 04:57:04 2001 +++ CVSROOT/avail Thu Apr

[PHP] unsubscribe me

2001-04-19 Thread Bruno Mário Amaral Almeida

[PHP] Treestructure

2001-04-19 Thread Johan Evers Petersen
I'm Newbie - sorry if this is the wrong list! I'm trying to print this treestructure I've made, but it doesn't seem to print more than the first level. The subtree array of the children is empty, perhaps because I do not use the correct reference passing? Thank you for helping me out. This is t

[PHP-CVS] cvs: php4 /ext/oci8 oci8.c

2001-04-19 Thread Jason Greene
jason Thu Apr 19 15:00:35 2001 EDT Modified files: /php4/ext/oci8 oci8.c Log: Change all // to /* */, fixed small whitespace. Builds on Solaris now. Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.117 php4/ext/oci8/oci8.c:1.118 --- php4/e

Re: [PHP] Which is better coding style...

2001-04-19 Thread Chris Adams
On 19 Apr 2001 14:08:13 -0700, ..s.c.o.t.t.. [gts] <[EMAIL PROTECTED]> wrote: >OOooo... > >it drives me nuts when i see beginning brackets >on seperate lines ;) > >i like to start brackets on the same line as the >statement and finish them on a line of their own. Very strong agreement here. I thi

[PHP] Newbie - treestructure

2001-04-19 Thread Johan Evers Petersen
I'm Newbie - sorry if this is the wrong list! I'm trying to print this treestructure I've made, but it doesn't seem to print more than the first level. The subtree array of the children is empty, perhaps because I do not use the correct reference passing? Thank you for helping me out. This

Re: [PHP] killing a session

2001-04-19 Thread Phillip Bow
Check out http://php.net/manual/en/function.session-destroy.php -- phill ""Ellis Heckman"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This does seem to work well. Thanks a lot. > > unlink(session_save_path().'/sess_'.$PHPSESSID); > setcookie('PHPSESSID',''

[PHP] killing a session

2001-04-19 Thread Ellis Heckman
This does seem to work well. Thanks a lot. unlink(session_save_path().'/sess_'.$PHPSESSID); setcookie('PHPSESSID','',time()-3600,'/'); Ellis Heckman [EMAIL PROTECTED] http://www.sigmathree.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: [PHP] submit form values to new site after validation

2001-04-19 Thread Phillip Bow
Using the POST method will prevent the credit card data from being included in the url. I would still be careful about sending data like this via a POST to a form handler on an entirely different site. It would be better if there was some sort of secure socket to transfer the data through. -- ph

RE: [PHP] Which is better coding style...

2001-04-19 Thread Philip Olson
coding style? here's what pear has to say : http://www.php.net/manual/en/pear.standards.php http://www.php.net/manual/en/pear.standards.control.php [ example ] switch (condition) { case 1: action1; break; case 2: action2; break; default: defaultac

[PHP-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-04-19 Thread Andi Gutmans
andiThu Apr 19 14:42:45 2001 EDT Modified files: /php4/ext/odbc php_odbc.c Log: - Use memcpy() instead of strlcpy() which is faster. Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.81 php4/ext/odbc/php_odbc.c:1.82 --- php4/ext/odb

Re: [PHP] Which is better coding style...

2001-04-19 Thread Norbert Pfeiffer
Hi, This participates the clearest for me, but unfortunately not usual. if (...) {...commands... switch(...) {case commands... case commands... case commands... } while(...) {...commands... } } else {...commands...

Re: [PHP] Add data to three tables at once from one form

2001-04-19 Thread Julian Wood
> That's it. There's nothing special to do. Except if one insert fails and the others succeed, you run into a bit of sync trouble. This is what transactions are for. You might want to consider a BDB table type, which supports transactions, then you have the option to rollback the other inserts

Re: [PHP] `AM_PROG_LIBTOOL' not found in library

2001-04-19 Thread Pablo Sabatino
Hello!!! I changed the version to bison 1.28...here is the log: checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking whether to enable maintainer-specific portions of Makefiles... no checking host system type... i686-pc-li

RE: [PHP] PHP4.0.4pl1+PdfLib3.03+SCO

2001-04-19 Thread Grimes, Dean
Chris & Paul, Try using the new pdflib-4.0.0 It works great. Here is what you have to do: Goto: http://www.pdflib.com/pdflib/download/index.html and download the source for unix. Unzip and untar. cd to pdflib-4.0.0/bind/php/ext/pdf copy * php-4.0.4pl1/ext/pdf --- You may want to remove

[PHP] Newbie Technical Question

2001-04-19 Thread Nashirak Bosk
I have a php file with a lot of user defined funtions and wraper functions in the this global file. Almost all my pages then use the funtions in this one file (and variables), this is so I can keep my website very modulure. However I know that having php go through the file takes a bit of proces

[PHP] submit form values to new site after validation

2001-04-19 Thread Tom Beidler
I'm trying to modify and e-commerce site which originally sent an email with the credit card info in an email. Now they would like to pass credit card numbers to a payment-processing service. For this particular service, Authorize.net, you would normally direct the form data to the payment-process

RE: [PHP] Which is better coding style...

2001-04-19 Thread ..s.c.o.t.t.. [gts]
OOooo... it drives me nuts when i see beginning brackets on seperate lines ;) i like to start brackets on the same line as the statement and finish them on a line of their own. if (...) { } else { } (it drives me nuts to see "} else {" also) > -Original Message- > From: Sander Pilon

  1   2   >