Re: [PHP] Drop down lists

2004-01-18 Thread Peter Vertes
Yes it's possible.  I believe there's a way to do it with PEAR also but I've never done it that way before.  I always do: ---     --- Please Choose a Username ---         // retrieve a list of usernames from the DB     $results = mysql_query("SELECT userID, username FROM users")  

Re: [PHP] Thumbnails in database

2004-01-17 Thread Peter Vertes
On Sat, 2004-01-17 at 16:44, Kevin Waterson wrote: > Why create thumnails? You can resize the images on > the fly when needed. This would be too expensive. I need to store the thumbnails in the database. So, I need to resize the image at the same time as I store it. I can do this and save

Re: [PHP] dynamicly generating a transparent truecolor image

2004-01-16 Thread Peter Vertes
If you want to create a transparent image don't forget it must be a GIF. At least that's what my graphics guys have been telling me all these years :) -Pete On Jan 16, 2004, at 04:41, Michel van der Breggen wrote: hi, i have a problem, i would like to dynamicly generete a transparent truecol

Re: [PHP] URL rewriting...anybody done this?

2004-01-15 Thread Peter Vertes
I had the same problem with PHP after I've upgraded to 4.3.3 from 4.3.1.  I was tearing my hair out but couldn't figure out what was wrong.  I ended up editing my php.ini file and turning REGISTER GLOBALS = On.  It works fine now and since this is on my development box I don't really care about

Re: [PHP] File Upload Name Mangling Question

2004-01-12 Thread Peter Vertes
On Mon, 2004-01-12 at 19:33, Richard Davey wrote: The filename isn't always the best way to tell. I mean I could rename an mp3 to jpg and you'd think it was a jpg and happily insert it into your database. Instead it's probably better to test the integrity of the image itself.     I didn't e

[PHP] File Upload Name Mangling Question

2004-01-12 Thread Peter Vertes
I'm trying to upload a JPEG image into a database using PHP and I was successful with the upload.  However today I wanted to add a check to make sure the user can only upload JPEG files and not any other files so I use preg_match() to check for the strings ".jpg" or ".jpeg" in the filename and

Re: [PHP] Exception number: c0000005 (access violation

2004-01-10 Thread Peter Vertes
Usually under Windows when you get a Memory Access Violation its a good indication that your power supply or RAM is on its way out.  Is this happening to all apps or only PHP ?     Unfortunately I don't know how to debug using a Dr. Watson dump but I do know of a free memory testing utility cal

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
It makes perfect sense now.  Thanks for clearing it up for me Chris :) -Peter On Fri, 2004-01-09 at 15:29, Chris Shiflett wrote: --- Peter Vertes <[EMAIL PROTECTED]> wrote: > Just to play devil's advocate; why would you validate data on the > server if you have a _javascr

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
On Fri, 2004-01-09 at 14:22, Chris Shiflett wrote: But, no matter what, always validate data on the server. Otherwise, it's like being a teacher and having your students grade their own work; it only works when everyone is honest (and I can guarantee you that won't be the case on a public Web

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
On Fri, 2004-01-09 at 13:07, Matt Grimm wrote: Is there a distinct advantage to doing form validation / error checking on the server side using PHP? That's how I've always done it because I know PHP better than _javascript_, but wouldn't it make sense to validate as much of your form as possi

Re: [PHP] md5() and string-length?

2004-01-09 Thread Peter Vertes
Sorry my bad; I read your post but I didn't understand it fully.  I agree with the others; there is no theoretical limit (only physical like available memory, disk space, etc..) to the size of a string which you can pass to the md5() function. -Pete On Fri, 2004-01-09 at 12:29, Michael Müller

Re: [PHP] md5() and string-length?

2004-01-09 Thread Peter Vertes
It's always a 32 character string. http://us4.php.net/manual/en/function.md5.php -Peter On Fri, 2004-01-09 at 11:30, Michael Müller wrote: Hi, is anybody here who knows the max_length of a string which is encoded by md5()? thx, Michael Berlin, Germany -- perl -e 'print pack("H*", "707

RE: [PHP] Display syslog file?

2004-01-09 Thread Peter Vertes
On Fri, 2004-01-09 at 10:05, Carlton L. Whitmore wrote: I'm using the root user to access the file so rights aren't an issue.     Actually it is an issue because PHP is not running with root privileges (at least I hope you haven't changed it and made it run with root privileges; that would

[PHP] Image Resizing with GD

2004-01-07 Thread Peter Vertes
Hello List,     I've tried googling but couldn't come up with anything useful so I'm turning to the list.  Could anyone send me a link to a tutorial on how to resize images with GD ?  Thanks in advance... -Pete -- perl -e 'print pack("H*", "70766572746573406E79632E72722E636F6D0A")'