[PHP] Re: upload and resize image script

2005-03-04 Thread Cristian Lavaque
P80 wrote: hey all I'm looking for a simple script that would upload an image and resize it to thumbnail using a form to upload the picture. anyone has a good script for that? thanx in advance Pat Hi Pat, I wrote this function to resize pictures to the max width/height, preserving proportions:

[PHP] Re: intercepting URLs in a "control-system"

2003-10-16 Thread Cristian Lavaque
http://www.sitepoint.com/article/485 That could have the answer you're looking for. Alan Lord wrote: > Please forgive any obvious ignorances on my part, I am just learning > PHP... > > Having read quite a bit on-line, I am interested in trying to "trap" > URLs sent to my site so I can process

[PHP] Re: Get fields values from a string.

2003-10-10 Thread Cristian Lavaque
err... sorry, the second line should be $array = explode(':', $string); Cristian Cristian Lavaque wrote: > yup > > you could do something like this > > $string = 'field_value1:field_value2:field_value3'; > $array = explode(':', $str); > f

[PHP] Re: Get fields values from a string.

2003-10-10 Thread Cristian Lavaque
yup you could do something like this $string = 'field_value1:field_value2:field_value3'; $array = explode(':', $str); foreach($array as $substring){ list($field, $value) = explode('_', $substr); $$field = $value; } hope this helps Cristian Mehdi Achour wrote: > Hi, > > Check this : php.net/e

Re: Re[2]: [PHP] dynamic -> static

2003-10-09 Thread Cristian Lavaque
Veniamin Goldin wrote: > Hello Mike, > > Thank you for your help, > > As I wrote already this issue is mainly because of search engines > incompatibility with dynamic content sites (to be more exact - with > urls containing get parameters, in my case ex. > index.shtml?lang=en&menu_id=23) > > Which

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread Cristian Lavaque
Messju Mohr wrote: > On Sun, Oct 05, 2003 at 03:59:21AM +0800, Jason Wong wrote: >> On Sunday 05 October 2003 04:47, Cristian Lavaque wrote: >>> My webhost announced that it's changing PHP from Apache module to >>> CGI. I know nothing about this, so I'd like t

[PHP] changing from Apache mod to CGI

2003-10-04 Thread Cristian Lavaque
My webhost announced that it's changing PHP from Apache module to CGI. I know nothing about this, so I'd like to know what I should change in my scripts so they still run, or they'll work the same? Thank you for your time. Cristian -- PHP General Mailing List (http://www.php.net/) To unsubscrib

[PHP] Re: "Too many connections" fix?

2003-10-01 Thread Cristian Lavaque
Nicole wrote: > Hello, > > I run Apache with PHP and MySQL on a RedHat 7.2 box with 1GB Ram @ > 2GHZ (p4). > > I last increased my max connections to 500. That seemed to fix things > for a while. Now I am getting the problems (database freezing up > because too many connections) again. The site I r

[PHP] Re: (another) regex difficulty

2003-10-01 Thread Cristian Lavaque
Cristian Lavaque wrote: > Jonas_weber @ Gmx . Ch wrote: >> regular expressions >> the example below should turn any character exept "\*" (*= any char) >> into an "x": >> >> $term = preg_replace('/[^(\\\)+(.){1}]/', 'x'

[PHP] Re: (another) regex difficulty

2003-10-01 Thread Cristian Lavaque
Jonas_weber @ Gmx . Ch wrote: > regular expressions > the example below should turn any character exept "\*" (*= any char) > into an "x": > > $term = preg_replace('/[^(\\\)+(.){1}]/', 'x', $term); > > but i guess because of the [brackets] the "." (period) is treated as > character "." instead as me

Re: [PHP] Initial Value for Input Box

2003-09-29 Thread Cristian Lavaque
Matt Palermo wrote: > I have a form that a user can fill out. In the text input field I > allow them to insert HTML tags with their input data. They can then > submit the form for processing. The problem is that later on when > they go to edit their inputs (I initialize the text input with their

Re: [PHP] Cleaning up my messy code

2003-09-29 Thread Cristian Lavaque
olinux wrote: > Try out smarty (its quite simple). You will get some > ideas on how to structure. I learned that its *ok* to > have some *display logic* in your templates (i.e. > repeating rows). (yes, some will adamantly disagree) > > Another thing i learned when using smarty is I like > using arr

Re: [PHP] Change cell colour with selection from a drop down menu

2003-09-29 Thread Cristian Lavaque
Cristian Lavaque wrote: > > You'd use CSS for that. Create a class for each color you want to > give as options. In each cell tag add a var that'll be the class > for that cell, like ">" and you'd assign > the color to that variable using the drop

Re: [PHP] How many Mondays in a month?

2003-09-29 Thread Cristian Lavaque
Burhan Khalid wrote: > Greg Wiley wrote: >> Funny you should ask this because I've been meaning to share some >> code that I wrote a few months ago that does exactly this for any >> day of the week. >> >> Please feel free to use this and make changes. I'd appreciate any >> changes/bug fixes being s

Re: [PHP] Change cell colour with selection from a drop down menu

2003-09-29 Thread Cristian Lavaque
[EMAIL PROTECTED] wrote: > Hi all, >I would like to create a dynamic kinda "Timetable" whereby I > can add, del, and modify the data contained in each cell. Besides > that, each cell in the table should have its unique colour in which > this unique colour can be modified anytime to a differ

Re: [PHP] register_globals won't turn off!

2003-09-27 Thread Cristian Lavaque
I don't know much about this, but could it have been cached? Cristian Damon Kohler wrote: > Well, it does turn off. At least phpinfo() says that it's off. > However, PHP is acting as though it's still turned on. The source > code for the page I'm using to test this odd result is: > > > > > >

Re: [PHP] Please visit my php program

2003-09-27 Thread Cristian Lavaque
One of the words had the last letter out of the picture, so it gave me an error when I typed the incomplete word. After going back and guessing the complete word (there was a tiny fragment of the last letter visible), it passed. You should make sure that the whole word will always be in sight. Cri

Re: [PHP] php.general on your desktop

2003-09-27 Thread Cristian Lavaque
Very nice! Thank you Jon! =) Cristian Jon Kriek wrote: > Serence KlipFolio > http://www.serence.com/site.php?action=ser_products,prod_klipfoli o > > php.general Klip > http://www.klipfarm.com/farm.php?page=info&klip=1767 > > Pulling from the experimental web interface > http://news.php.net/group

Re: [PHP] Please visit my php program

2003-09-27 Thread Cristian Lavaque
Looks good. You should use nonsense words too, including numbers. You could also change the patter, not just move it. Also, changing the font used, not just for the whole word, but mixing fonts in the string could be good. Good job :) Cristian Ryan A wrote: > Hey everyone, > Please visit my cap

Re: [PHP] Array question

2003-09-27 Thread Cristian Lavaque
http://www.php.net/manual/en/language.types.array.php If you mean having an array inside an array, of course . There you have an array inside another one, 'data' will be here $var['0']['0']. If you meant using an array item as the key in another array, then you do it as with a normal var . Rememb

[PHP] Re: Weird replacing

2003-09-26 Thread Cristian Lavaque
I figured it out already. if the array has http://example.com/bbs/index.php?board=1 http://example.com/bbs/index.php?board=1;action=display;thread=12 3 then, the str_replace of that one with the other one that has the symbols changed, will be http://example.com/bbs/index.php/board-1 but it'll A