Re: [PHP] Question about OO design

2007-04-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-09 15:29:01 -0700: > (I'm dealing with PHP4.) > > class User > { > var id; > var name; > var email; > var balance; > var accrual; > var is_manager; > > function User($user_id) > { > $this->id = $user_id; >

[PHP] PHP 4.4.7RC1 Release

2007-04-10 Thread derick
The first release candidate of PHP 4.4.7 is now available for download here: http://downloads.php.net/derick/php-4.4.7RC1.tar.bz2 (2ff585134f85fa992af7d953e4645810) http://downloads.php.net/derick/php-4.4.7RC1.tar.gz (72c25db4e65ae8a985914472403a5f83) The focus or this release is twofold, number

Re: [PHP] mysql if empty

2007-04-10 Thread tg-php
Top-posting is sublime. Embrace it. Why scroll through 10 pages of emails you've already read when you can get to the meat of it all in the first few lines of an email? :) Plus trying to quickly separate all the previous replies from the latest one when some emailers indent, indent with lead

[PHP] Re: PHP textbook suggestions?

2007-04-10 Thread LuKreme
On 6-Apr-2007, at 08:13, Chris Lott wrote: echo substr("abcdef", 1); So they naturally want to know-- why the double quotes? And there's no good logical reason for double quotes in the example-- and there are languages where the function could take a variable to be interpolated that DOES need do

Re: [PHP] Evaluating strings...

2007-04-10 Thread Lori Lay
Anthony J. Maske wrote: Hey, Thanks for the quick response on Retrieving parameters... This is another that has me stumped... if (trim($Line) = '') { $InBody = true; } elseif (trim($Line) = '') { $InBody = false; } $Line is a line from a html file, I'm tr

RE: [PHP] Evaluating strings...

2007-04-10 Thread Anthony J. Maske
Got it... Thanks mucho! Anthony J. Maske [EMAIL PROTECTED] http://home.comcast.net/~ajmaske -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 9:03 PM To: Anthony J. Maske Cc: PHP General Subject: Re: [PHP] Evaluating strings... Anthony J. Mask

Re: [PHP] Evaluating strings...

2007-04-10 Thread Chris
Anthony J. Maske wrote: Hey, Thanks for the quick response on Retrieving parameters... This is another that has me stumped... if (trim($Line) = '') { That should be == basically that is trying to set trim($line) to be equal to '' which won't work (and you get an error message). ==

[PHP] Evaluating strings...

2007-04-10 Thread Anthony J. Maske
Hey, Thanks for the quick response on Retrieving parameters... This is another that has me stumped... if (trim($Line) = '') { $InBody = true; } elseif (trim($Line) = '') { $InBody = false; } $Line is a line from a html file, I'm trying to parse through it t

Re: [PHP] Retrieving parameters passed from .html...?

2007-04-10 Thread Lori Lay
Anthony J. Maske wrote: See... the second I sent this I took a sip of red-bull and my brain cleared up... $topicID = $_GET['showtopic']; Right? Yes. And if you have a form that uses the POST method, it would be $_POST['element']. Some of the other variables you will eventually need:

RE: [PHP] Retrieving parameters passed from .html...?

2007-04-10 Thread Robert Cummings
On Tue, 2007-04-10 at 20:38 -0700, Anthony J. Maske wrote: > See... the second I sent this I took a sip of red-bull and my brain cleared > up... > > $topicID = $_GET['showtopic']; Almost... Cheers, Rob. -- .. | InterJinn Applicatio

RE: [PHP] Retrieving parameters passed from .html...?

2007-04-10 Thread Anthony J. Maske
See... the second I sent this I took a sip of red-bull and my brain cleared up... $topicID = $_GET['showtopic']; Right? Anthony J. Maske [EMAIL PROTECTED] http://home.comcast.net/~ajmaske -Original Message- From: Anthony J. Maske [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10

[PHP] Retrieving parameters passed from .html...?

2007-04-10 Thread Anthony J. Maske
Hey all, My first post here..., new to php and so far doing great picking it up... but, tonight I'm having a brain fart... How do you pick up (read) the parameters passed into a php script from an html file? Given... http://somewhere/dosomething.php?showtopic=9 How do you read or get the

Re: [PHP] Trying to Find Functions or Constants To...

2007-04-10 Thread Jim Lucas
Stephen wrote: determine the current values for post max size upload max filesize I looked through the docs and struck out. Can someone help. Thanks Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Security Best Practice: typecast?

2007-04-10 Thread Richard Lynch
On Mon, April 2, 2007 1:32 pm, Chris Shiflett wrote: > Richard Lynch wrote: >> Should one be ultra-conservative and just do: >> $foo_sql = mysql_real_escape_string($connection); > > I don't consider this (escaping) to be particularly conservative; it's > appropriate for any data you want to use in

Re: [PHP] dynamic web interface and size

2007-04-10 Thread Richard Lynch
1000 pixels? Woof. Guess my 800x600 box is not in your market... This isn't a PHP question at all, really, by the way... Try on some kind of "web" forum. On Wed, April 4, 2007 12:28 am, Alain Roger wrote: > Hi, > > My question is not so much about PHP language but more about concept > and PH

[PHP] Trying to Find Functions or Constants To...

2007-04-10 Thread Stephen
determine the current values for post max size upload max filesize I looked through the docs and struck out. Can someone help. Thanks Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] finding a particular record within a MySQL result set

2007-04-10 Thread Richard Lynch
On Wed, April 4, 2007 12:07 pm, James Tu wrote: > I've cross posted this to the MySQL list... > > Here's my original post. > >> Is there some quick way to do the following in MySQL? (I know I >> can use PHP to search through the result set, but I wanted to see >> if there's a quick way using some

Re: [PHP] Suggestions for Web based FileServer/Mailaccess

2007-04-10 Thread Richard Lynch
Personally, I would use http://php.net/imap_open and friends to add the mailbox, and let the OS and installed IMAP software choose the correct mbox/Maildir option based on the server configuration, rather than try to out-guess them... On Wed, April 4, 2007 1:20 pm, Michelle Konzack wrote: > **

Re: [PHP] advice on sql injection/XSS prevention

2007-04-10 Thread Richard Lynch
If you know you are using MySQL, you could pass all database input through mysql_real_escape_string. Or you could use prepared statements and not have to worry about escaping the data, as MySQL *knows* it's data. You'll probably not be able to defeat XSS in any meaningful way, however... Perhap

Re: [PHP] PHP textbook suggestions?

2007-04-10 Thread Robert Cummings
On Tue, 2007-04-10 at 21:19 -0500, Richard Lynch wrote: > On Thu, April 5, 2007 3:52 pm, Chris Lott wrote: > > Looking for suggestions for a PHP textbook for an "Intro to Web > > Programming" class that will be using PHP5 and MySQL. This is a > > first-semester course, so no programming experience

Re: [PHP] Debugging Extensions (APD, etc.)

2007-04-10 Thread Richard Lynch
On Thu, April 5, 2007 11:04 am, Daniel Brown wrote: > Does anyone have any experience using engine-level debuggers > and/or > extensions in PHP? I installed the PECL module APD just a moment ago, > and > haven't even used it yet, because I wanted to see if anyone here has a > better suggestion

Re: [PHP] PDF: error

2007-04-10 Thread Richard Lynch
That's not an error. That's a PDF in its raw form. This can happen if you didn't put the right headers. It can also happen in IE because IE sucks and "memorizes" the content-type for the URL, so even if you fix it, if you don't close the whole browser down and start over, it thinks it should be

Re: [PHP] Idea/Suggestion for PHP App

2007-04-10 Thread Richard Lynch
On Thu, April 5, 2007 2:59 pm, [EMAIL PROTECTED] wrote: >> On Thu, 2007-04-05 at 21:36 +0200, [EMAIL PROTECTED] wrote: >>> first step is: take a paper and pen and start drawing your app >>> structure >>> in blocks. >>> once you "finished your app" on the paper start drawing db >>> structure. >>> >>

Re: [PHP] Idea/Suggestion for PHP App

2007-04-10 Thread Richard Lynch
On Thu, April 5, 2007 2:35 pm, Eric Butera wrote: > On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Hey... I am new to the list so please forgive me if I say anything >> that might have already been discussed. So here we go... >> >> OK I am attempting to start a new application using PH

Re: [PHP] PHP textbook suggestions?

2007-04-10 Thread Richard Lynch
On Thu, April 5, 2007 7:29 pm, itoctopus wrote: > I beg to differ with everyone who said there's no difference between > the > single quote and double quote. > Although the double quote is much more flexible, the single quote is > better, > as there will be no evaluation of the string for potential

Re: [PHP] Curious Problem with $_POST - Solved

2007-04-10 Thread Stephen
My upload_max_filesize in php.ini was 2M Doh It is documented that if the upload is larger $_POST and $_FILES are empty. Hidden a bit, but it is there! Thanks all Stephen Stephen wrote: I have a form for uploading files. It is intended to upload photos. I have it listed at the end. When I

Re: [PHP] PHP textbook suggestions?

2007-04-10 Thread Richard Lynch
On Thu, April 5, 2007 3:52 pm, Chris Lott wrote: > Looking for suggestions for a PHP textbook for an "Intro to Web > Programming" class that will be using PHP5 and MySQL. This is a > first-semester course, so no programming experience required. > > It would be nice to have a text that adhered to (w

Re: [PHP] Submitting as POST. Why?

2007-04-10 Thread Richard Lynch
On Fri, April 6, 2007 7:44 pm, Mike Shanley wrote: > With POST, everything stays hidden, mostly untamperable, and I must take exception to this statement... Step 1. Use your browser's "Save As..." menu to save the HTML FORM page to your hard drive. Step 2. Change any damn thing you want in the I

Re: [PHP] Submitting as POST. Why?

2007-04-10 Thread Richard Lynch
On Fri, April 6, 2007 7:35 pm, barophobia wrote: > I only know of one reason to submit a form as POST and that is because > you can submit more data in one shot. > > What other reasons are there? #1 If it "changes" anything [*] on the server it MUST be POST and not GET. If you don't grak this, put

Re: [PHP] mysql if empty

2007-04-10 Thread Robert Cummings
On Tue, 2007-04-10 at 20:48 -0500, Richard Lynch wrote: > No. > > Despite the fact that I replied to your message as it was the "last" > one, and that caused threaded mail readers to place my post directly > under yours as a "reply", my comment was not specifically directed at > your post. > > I

Re: [PHP] mysql if empty

2007-04-10 Thread Richard Lynch
No. Despite the fact that I replied to your message as it was the "last" one, and that caused threaded mail readers to place my post directly under yours as a "reply", my comment was not specifically directed at your post. I had deleted the "way wrong" posts by the time I realized I wanted to say

Re: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 7:45 pm, Edward Vermillion wrote: > > On Apr 10, 2007, at 6:59 PM, Richard Lynch wrote: > >> On Mon, April 9, 2007 9:45 am, Davi wrote: > Yes... but isn't it true that unless the default settings have > changed that the sessions are stored in the servers temp directory > (in

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 8:01 am, tedd wrote: > An OCR is an Optical Character Reader -- it's design is to recognize > characters (A-Z 0-9), not images. > > That's the reason why I previously used the term "OCR-like" > application -- meaning that it would be designed/programmed to "see" > the differe

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
A) 2 million MD5s is chump-change. B) Telling a "cat" from a "dog" is probably a homework exercise for AI Vision grad students. On Mon, April 9, 2007 3:35 pm, tedd wrote: > At 1:04 PM -0400 4/9/07, Robert Cummings wrote: >>On Mon, 2007-04-09 at 12:51 -0400, tedd wrote: >> >We were talking >> > a

RE: [PHP] Need a working SOAP example using SOAP -- PHP is blocking the calls

2007-04-10 Thread Richard Lynch
So gabriel, whatever machine that is, is broken, and it's running Windows. Can you surf to locutus SOAP and make it work from any other box that is not Windows? How about another box that IS Windows. If gabriel is the only broken box in the world, you know that problem is on gabriel. On M

Re: [PHP] PHP has encountered an Access Violation at 01F13157?!?!?!?

2007-04-10 Thread Richard Lynch
If it worked before you installed Zend product, and broke after, you need to take that up with Zend, really... On Sat, April 7, 2007 12:55 am, Afan Pasalic wrote: > hi, > I just installed php 5.2.1-win32-installer on win box (XP). use IIS. > created index.html file and localhost/index.html is ok

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 7:47 am, tedd wrote: > Your use of metaphor is quite colorful, but if you if change a single > pixel in an image, then you change the MD5 signature -- that is what > I was talking about -- and that is not wrong. Unless I look at enough images to figure out that you are just

Re: [PHP] mysql if empty

2007-04-10 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Turn on MAGIC QUOTES and REGISTER GLOBALS Once you've done that, install Postgres. Run your MySQL command again, Postgres has much better error reporting and will assist in debugging the situation. You might consider replacing your javascript functions with PHP ones

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Sun, April 8, 2007 11:46 am, Jochem Maas wrote: > in theory it's all crackable - but somewhere along the line the > problem becomes > too hard to make it worth the effort to try (unless your securing Fort > Knox or something) In REALITY, 99.9% of the Bad Guys will be kept out by *ANY* CAPTCHA/d

Re: [PHP] mysql if empty

2007-04-10 Thread Jim Lucas
Richard Lynch wrote: I am amazed by the sheer number of just plain WRONG answers to this one... Were they all from April 1 or something?... so, are you saying that my answer was wrong, or just making a statement. If my answer was wrong, it was because it was too simple, which is what I was tr

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Sun, April 8, 2007 11:26 am, tedd wrote: > The way I figure it, in an image I have 72 dot per square inch -- so, > in one square inch that's 5,184 places for me to store a 24 bit key. > To me, that's a lot of places to hid my Easter egg -- is that not > enough? No. If the egg is visible to a h

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Sun, April 8, 2007 11:12 am, tedd wrote: > chose from. Unless, there is something here that I don't understand > (which very well could be), I can't see how anyone, without massive > computer resources, could break that. > > Am I wrong? You are wrong. The Tijnema! solution of memorizing every

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Sun, April 8, 2007 7:48 am, Robert Cummings wrote: > On Sun, 2007-04-08 at 05:41 -0700, benifactor wrote: >> indeed. i was just throwing out the idea of ever changing values. > > Except IP addresses aren't ever changing ;) Unless the visitor is on AOL. -- Some people have a "gift" link here.

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
On Sat, April 7, 2007 7:02 pm, Jim Lucas wrote: > This would make things almost impossible for a computer to see, but > the chances of a human screwing > it up would be almost impossible. Sigh. Look. If a HUMAN can "see" the differen, then a program can be written to "detect" the difference. Th

Re: [PHP] Session Authentication

2007-04-10 Thread Edward Vermillion
On Apr 10, 2007, at 6:59 PM, Richard Lynch wrote: On Mon, April 9, 2007 9:45 am, Davi wrote: Sessions are stored in the temporary's server folder... So... If I known my session ID and where it's stored, I can do something... If your web-visitor can access and edit the session files stored in

RE: [PHP] DOM and XSLTProcessor

2007-04-10 Thread Buesching, Logan J
Thanks everyone, I was able to get it to work by using CDATA and disable-output-escaping. I guess I was not doing one or the other when I was testing. Thanks for all the help it replace a really... _really_ nasty regex, decode, output. -Logan -Original Message- From: Richard Lynch [

Re: [PHP] Re: MySQL exceptions

2007-04-10 Thread Davi
Em Terça 10 Abril 2007 19:26, Richard Lynch escreveu: > > I don't think MySQL or even mysqli have any kind of exception throwing > yet, if ever. Googling a bit more, I think that MySQL already have some exceptions [1], the question, now, is: how to catch them with PHP? =] I think that just using

Re: [PHP] MD5 & bot Question

2007-04-10 Thread Richard Lynch
You only have 9 arrows. How tricky can it be to detect which of the 9 images you are displaying? Even if the URL is the same every time, it's a no-brainer to use OCR to detect which array is there. How many variations on this theme are we going to go through? On Sat, April 7, 2007 10:59 am, ted

Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-10 Thread Richard Lynch
On Sat, April 7, 2007 11:49 am, Martin Alterisio wrote: > The solution I presented is to access, and act upon, a database as if > they > were PHP arrays, meaning that a table is presented as an array of > records. I don't quite get why you think this is any more fool-proof than using a database in

Re: [PHP] mysql if empty

2007-04-10 Thread tg-php
Turn on MAGIC QUOTES and REGISTER GLOBALS Once you've done that, install Postgres. Run your MySQL command again, Postgres has much better error reporting and will assist in debugging the situation. You might consider replacing your javascript functions with PHP ones since JS can sometimes int

Re: [PHP] foreach question

2007-04-10 Thread Richard Lynch
On Sun, April 8, 2007 6:29 pm, [EMAIL PROTECTED] wrote: > I have .. > > foreach( $_POST as $key ) { > echo "$key"; > } You are actually echoing out the VALUE, not the KEY... > and that gives me > > item1 > item2 > item3 > item4 > item5 Unless your VALUE has "item1\nitem2\nitem3\nitem4\nitem5

Re: [PHP] which CMS are you using and why?

2007-04-10 Thread Richard Lynch
On Sun, April 8, 2007 1:53 pm, Lester Caine wrote: > Fernando Cosso wrote: >> Well that's the question. >> I have to start a new project and I have to decide the CMS. >> I have thought mambo will do, but looking at the documentation, it >> disappointed me a little. >> I need a documentation with ex

Re: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 9:45 am, Davi wrote: > Sessions are stored in the temporary's server folder... So... If I > known my > session ID and where it's stored, I can do something... If your web-visitor can access and edit the session files stored in the server temp folder, you have *MUCH* bigger pr

RE: [PHP] DOM and XSLTProcessor

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 3:50 am, Buesching, Logan J wrote: > This could offer a possible workaround. > > Let me first state that I cannot simply do: > > echo htmlspecialchars_decode($proc->transformToXML($doc)); > > If I were to do that, then it would assume that all of these encodings > need to be d

Re: [PHP] mysql if empty

2007-04-10 Thread Lori Lay
Richard Lynch wrote: I am amazed by the sheer number of just plain WRONG answers to this one... Were they all from April 1 or something?... Yes it's unfortunate. I think part of the problem was that several people, including myself, weren't entirely clear on what he was after. When I re

Re: [PHP] coding MySQL error traps [WAS: mysql if empty]

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 1:08 pm, Paul Novitski wrote: > mysql_query() returns true. This constitutes a hack because it > depends entirely on the way the parser processes code rather than on > explicit elements of the language. The order of execution and boolean short-circuit is a Documented Featur

Re: [PHP] mysql if empty

2007-04-10 Thread Richard Lynch
I am amazed by the sheer number of just plain WRONG answers to this one... Were they all from April 1 or something?... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Gen

Re: [PHP] mysql if empty

2007-04-10 Thread Richard Lynch
$result == "" means: Your SQL query is so f'ed up, I couldn't even run it. It does NOT mean: Your query returned zero rows, a perfectly normal and common condition. You want http://php.net/mysql_num_rows And, actually, $result is FALSE, not really "", when the query is wrong. On Mon, April 9, 2

Re: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 10:55 am, Tijnema ! wrote: > Cookies are old, so in the time they were introduced, today it is > possible to create and modify cookies with some good tools. These > tools are illegal, but every cracker is 99% illegal right? But that > means i can't give you these tools to pro

RE: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 11:49 am, Peter Lauri wrote: > If cookies were that unsecured so you could create your own cookies > that > easily, then would cookies exist? Yes. Cookies do exist. And it is possible to use them so badly that you have giant security holes in your web application. This is

Re: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 11:28 am, Martin Marques wrote: > Tijnema ! escribió: >> On 4/9/07, Martin Marques wrote: >>> >>> So what? The user authenticated himself, so what is he gonna crack? >> Yes, but i guess you're not only storing if the user has >> authenticated, also storing a username? >> >> A

Re: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 8:36 am, Martin Marques wrote: > ... or even better, save the > authentication in a cookie on the client (seperated from the session > array). Well, no... That *WOULD* make it possible for the user to create an "authenticated" cookie if they wanted. -- Some people have a "

Re: [PHP] Session Authentication

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 7:39 am, Ólafur Waage wrote: > Lets say i have a login system. This system authenticates the user via > mysql, when the user is authenticated, i set a session variable to let > the > system know the user is authenticated. ie. $_SESSION["authenticated"] > = > true; > > Lets als

Re: [PHP] redirect http to https

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 8:38 am, Martin Marques wrote: > Ben Liu escribió: >> What's the prescribed method for redirecting a user forcibly to from >> the >> non-SSL secured version of a page to the SSL-secured version? Is >> this >> handled at the web server level or at the script level. I found this

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
Thanks to ALL ... Brad - Tijnema - TG - Richard and JMG! With a little fooling around - I actually got exactly what I wanted!!! Boy that was fun! And thanks for the incredibly quick responses! -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 5:39 pm, Paul Novitski wrote: > values. If both keys and values are unique, I'd consider (if only > briefly) maintaining two arrays, one a flipped version of the other, > so I could look up key/value pairs using either node. I do this all the time for small/medium arrays.

Re: [PHP] Bind IP with fsockopen

2007-04-10 Thread chris
Im having trouble converting this snippet to use the bind_socket function. my original code is.. I think im getting stuck on the fputs bit.. I have this which does not work.. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array remove function?

2007-04-10 Thread Paul Novitski
At 4/10/2007 03:09 PM, M.Sokolewicz wrote: Such a function is inherently a Bad Idea (tm). array-values are not unique. Array keys are. So unless you want to emulate the way array_flip works (bad idea (tm)), I'd say: leave it be. Whoever owns that trademark has totally got to be the wealthiest

Re: [PHP] Where to insert a phrase in the right place

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 2:51 pm, Mário Gamito wrote: > I'm making this site that was static and now has some dynamic > features, > so it's a little bit patched :) > > If you care to visit > http://www.telbit.pt/2/login.php > > you'll notice that the word "Welcome" is already present, and only > shoul

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread JM Guillermin
http://www.php.net/readdir cheers jmg - Original Message - From: "revDAVE" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 10, 2007 10:11 PM Subject: [PHP] Novice PHP Question - Listing Folder Contents I apologize in advance, however I know almost nothing about PHP - ( but I am tr

Re: [PHP] IF loop

2007-04-10 Thread Richard Davey
Ron Piggott wrote: $good_Friday = easter_date($current_year)-24*3600*2; $Easter_Sunday = easter_date($current_year)*60*60*24; easter_date() returns a Unix timestamp. In the above code, you are taking this timestamp, then multiplying it by 60, then again by 60, then again by 24. If the Unix t

Re: [PHP] Location of .so files on Linux box

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 8:24 am, Miles Thompson wrote: > This probably belongs in php-install, but here goes. > > Where should extension files be located? Yes. :-) They should go wherever it makes sense on your setup. > In php.ini the default entry > for > extension_dir is: > extension_dir=

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Paul Novitski
At 4/10/2007 01:36 PM, Otto Wyss wrote: I've an array of file names $files = getFiles ($d); but would like to use this array in a JavaScript array. How can I copy this $files into a JavaScript variable? As I'm sure you know, you can't literally copy the values from PHP into the javascrip

Re: [PHP] Decoding from unknown charsets (inc. ks_c_5601-1987)

2007-04-10 Thread Richard Lynch
Short term, you could simply base64 encode them so that at least they go in as something you can do something with later... On Tue, April 10, 2007 8:27 am, Edward Kay wrote: > I have an app that stores email messages in a database. The app and DB > are > UTF-8 but obviously the emails can be in a

Re: [PHP] Re: MySQL exceptions

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 6:34 pm, Davi wrote: > Em Segunda 09 Abril 2007 21:21, itoctopus escreveu: >> Use the @ in front of the statement and then check the result if >> it's >> valid. >> >> -- >> itoctopus - http://www.itoctopus.com > > > I already use it, but I believe that try-catch would be _more

Re: [PHP] Oputting Forms Within a Class

2007-04-10 Thread CK
Hi, Your suggestion borders the MVC design pattern, which I've used within flash, groovy. Also, the following document illustrated an interesting solution, what are your thoughts? 7. Print form elements' defaults with helper functions.

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 11:38 am, Satyam wrote: > In PHP dates are stored as seconds from an arbitrary zero set at Jan > 1st, > 1970, so does MySql with date/time values though it shows them > formatted but nitpick: I don't think MySQL uses Unix timestamp internally, as it's quite capable of storin

[PHP] IF loop

2007-04-10 Thread Ron Piggott
Would someone help me tweak the IF statement below? I am trying to assign a value to $seasonal_greeting on Good Friday, Saturday and Easter Sunday. We had added an extra day's worth of seconds to $Easter_Sunday wondering if this is why it didn't work on Easter Sunday. Where I am at today -

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 3:22 pm, Tijnema ! wrote: > On 4/10/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: >> OMG. Now that is the best idea. How simple. Guess I learned >> something new >> today too! :) >> >> > -Original Message- >> > From: Lori Lay [mailto:[EMAIL PROTECTED] >> > >> > Use ar

Re: [PHP] Array remove function?

2007-04-10 Thread M.Sokolewicz
Lori Lay wrote: Tijnema ! wrote: On 4/10/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) > -Original Message- > From: Lori Lay [mailto:[EMAIL PROTECTED] > > Use array_search() and unset()? Interest

[PHP] OT Apologies.. Re: [PHP] Firefox and Crafting Tables

2007-04-10 Thread tg-php
Just glad this wasn't my grociey list or something worse. hah.. sent to the wrong address, my apologies. But for anyone looking for some good tradeskill craft recipe lists for World of Warcraft or for ways to help their Firefox be a little nicer on memory usage, there ya go. *shame* -TG = =

Re: [PHP] Curious Problem with $_POST

2007-04-10 Thread Richard Lynch
print_r($_FILES) may be more useful that $_POST On Mon, April 9, 2007 7:53 pm, Stephen wrote: > I have a form for uploading files. It is intended to upload photos. I > have it listed at the end. > > When I upload a jpg everything is fine. The $_POST variable is > populated > as expected. > > If I

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 11:49 am, Satyam wrote: > You are totally right, I am sorry. I would hate to miss my plane or > train > due to such mistake. Can somebody with way more karma than me put in an RFC to just NUKE daylight savings? Pretty please? Thanks! Whatever alleged benefits there are,

[PHP] Re: Curious Problem with $_POST

2007-04-10 Thread Steve
Is it possible that your zip file is bigger than your max filesize allots? Most likely isn't the problem, but worth doublechecking. "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a form for uploading files. It is intended to upload photos. I have >it listed at the

[PHP] Firefox and Crafting Tables

2007-04-10 Thread gryffyn
http://wow.crafterstome.com/recipes/enchanting.html http://wow.crafterstome.com/special/burning-crusade-faction-recipes.html Firefox: Firefox changes to help memory allocation (all these take place in "about:config".. enter that on your address bar): right-click and create a boolean entry ca

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread tg-php
In addition to the suggestions made, check out opendir() too. It may be a little simpler for what you're doing. Not sure. Remember, the beauty of PHP is that there's almost always a fuction or two already made that do what you want. Even some semi-obscure stuff. So always scan through the f

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
http://php.net/array_flip followed up an unset, followed by another array_flip, I guess... Why in the world you'd architect the array with a value when you need to unset by value in the first place is beyond me, though... On Tue, April 10, 2007 2:52 pm, Tijnema ! wrote: > On 4/10/07, Richard Lync

RE: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Peter Lauri
Check www.php.net/json You can use the encode function there. Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free > -Original Message- > From: Otto Wyss [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Otto Wyss
Jochem Maas wrote: // if you have this available: http://php.net/manual/en/function.json-encode.php echo json_encode($files); I thought there might be a solution with Json but couldn't locate it. I prefer it versus the iteration, thanks. Sometimes solutions are so simple if one knows them. O

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Jochem Maas
Otto Wyss wrote: > I don't know if I should ask this question here or in the JavaScript > group. I'll try it here since people usually are more helpful. > > I've an array of file names > > $files = getFiles ($d); > > but would like to use this array in a JavaScript array. How can I copy > this

RE: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Buesching, Logan J
Something along the lines of the following: var myArray=new Array(); $val) { ?> myArray[]=""; Although it lo

RE: [PHP] PHP Directory List Script Files over 2 GB

2007-04-10 Thread Buesching, Logan J
I didn't take too much time to look at this, but I believe that where you see: --- sprintf("_f('%s',%d, . --- Try and change that to: --- sprintf("_f('%s',%u, . --- >From what information you provided, it seems that this is what would work. -Logan -Original Message- From: Rob

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread Tijnema !
On 4/10/07, revDAVE <[EMAIL PROTECTED]> wrote: On 4/10/2007 1:13 PM, "Tijnema !" <[EMAIL PROTECTED]> wrote: > http://www.php.net/manual/en/function.scandir.php > >> >> 2 - List/ display the contents on the same Web-page > > http://www.php.net/manual/en/function.file-get-contents.php WOW COOL -

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
On 4/10/2007 1:13 PM, "Tijnema !" <[EMAIL PROTECTED]> wrote: > http://www.php.net/manual/en/function.scandir.php > >> >> 2 - List/ display the contents on the same Web-page > > http://www.php.net/manual/en/function.file-get-contents.php WOW COOL - That was quick - thanks Tijnema & Brad! >Fro

[PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Otto Wyss
I don't know if I should ask this question here or in the JavaScript group. I'll try it here since people usually are more helpful. I've an array of file names $files = getFiles ($d); but would like to use this array in a JavaScript array. How can I copy this $files into a JavaScript variab

Re: [PHP] Array remove function?

2007-04-10 Thread Lori Lay
Tijnema ! wrote: On 4/10/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) > -Original Message- > From: Lori Lay [mailto:[EMAIL PROTECTED] > > Use array_search() and unset()? Interesting, I didn't tho

Re: [PHP] Array remove function?

2007-04-10 Thread Tijnema !
On 4/10/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) > -Original Message- > From: Lori Lay [mailto:[EMAIL PROTECTED] > > Use array_search() and unset()? Interesting, I didn't thought of that :) Bu

Re: [PHP] Array remove function?

2007-04-10 Thread tg-php
Unset works, but if he's trying to do a search and remove in one function, unset is a step removed from that criteria (missing the 'search' part). Looking at the array functions, I see some potential. # array_remove(array(1=>2,2=>3),2,true); // array (2=>3) // Keep all but where values = 2 $new_

RE: [PHP] Array remove function?

2007-04-10 Thread Daevid Vincent
OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) > -Original Message- > From: Lori Lay [mailto:[EMAIL PROTECTED] > > Use array_search() and unset()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread Tijnema !
On 4/10/07, revDAVE <[EMAIL PROTECTED]> wrote: I apologize in advance, however I know almost nothing about PHP - ( but I am trying to learn now)... I am wondering if it is possible to create a PHP page that can: 1 - Get the contents of everything in its own folder at the same level ( just list

  1   2   >