Re: [PHP] sort in while(list($vars) = mysql_fetch_row($result))

2008-02-27 Thread Verdon Vaillancourt
On 27-Feb-08, at 9:23 AM, Daniel Brown wrote: On Wed, Feb 27, 2008 at 7:58 AM, Verdon Vaillancourt <[EMAIL PROTECTED]> wrote: [snip!] Then I pass it through this.. while(list($id, $text, $url, $m_order) = mysql_fetch_row($result)) { $out .= "$text - $m_order \n"

[PHP] sort in while(list($vars) = mysql_fetch_row($result))

2008-02-27 Thread Verdon Vaillancourt
Hi, I'm running into some sorting issues using a while(list($vars) = mysql_fetch_row($result)). I can provide more code if needed, but thought I would try this little bit first to see if I'm missing a fundamental concept and not a detail. In a nutshell, I have a query first.. $result = my

Re: [PHP] Truncate words in multiple paragraphs

2006-02-03 Thread Verdon Vaillancourt
On 3-Feb-06, at 4:19 PM, Richard Lynch wrote: On Fri, February 3, 2006 10:54 am, Verdon Vaillancourt wrote: I am using the following function (that I found in the user comments on php.net manual) for trimming the number of words accepted via a form field // Truncation is by word limit, not

Re: [PHP] Truncate words in multiple paragraphs

2006-02-03 Thread Verdon Vaillancourt
too likely to break up "" in the trim_text function and then you end up with: "start of string ... almost 255 words, blah blah blah -BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Verdon Vaillancourt wrote: Hi :) I am using the following function (that I found in the user comments

Re: [PHP] Truncate words in multiple paragraphs

2006-02-03 Thread Verdon Vaillancourt
On 3-Feb-06, at 12:25 PM, John Meyer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Verdon Vaillancourt wrote: Hi :) I am using the following function (that I found in the user comments on php.net manual) for trimming the number of words accepted via a form field // Truncation is

[PHP] Truncate words in multiple paragraphs

2006-02-03 Thread Verdon Vaillancourt
Hi :) I am using the following function (that I found in the user comments on php.net manual) for trimming the number of words accepted via a form field // Truncation is by word limit, not character limit. So if you limit // to 255, then it will cut off a text item to 255 words, not 255 char

[PHP] Looking for commercial coder

2005-02-22 Thread Verdon Vaillancourt
Hi :) I am looking for a competent coder to help me with a shipping module for an e-commerce project I am working on. Essentially I need a script that can check a Canadian postal code and/or US zip code (from the cart) against a flat-file or db table, find it's zone in a series of ranges of cod

Re: [PHP] $_SERVER['REQUEST_URI'] being trimmed

2005-02-05 Thread Verdon Vaillancourt
ual content. My thoughts in using the switch.php file was to set the cookie, make the server aware of it so it can deliver appropriate content, and return to the URL intact at the end of the process, without any new vars in it. With your reminder about urlencode, this is all playing nicely n

Re: [PHP] $_SERVER['REQUEST_URI'] being trimmed

2005-02-03 Thread Verdon Vaillancourt
Thanks for the input Mikey... I guess I'm just not sure how to, and I had already hit on this method that is almost doing the trick :) salut, verdon On 3-Feb-05, at 2:46 PM, Mikey wrote: Any thoughts? Thanks, verdon Why don't you just use JavaScript to set the cookie and then reload the page tha

[PHP] $_SERVER['REQUEST_URI'] being trimmed

2005-02-03 Thread Verdon Vaillancourt
Hi :) I am trying to build a simple mechanism to allow visitors to set a site preference (stored in a cookie) by clicking on a link. I want the cookie set and the original page reloaded with the new cookie set, when a visitor clicks on the link. My link looks like this... French My file swi

[PHP] breadcrumb app...

2004-07-10 Thread Verdon Vaillancourt
There's also a nice gpl class for this available at http://www.phpclasses.org/browse/package/1192.html or http://www.baskettcase.com/classes/breadcrumb/ It's easy to hack also if you need to add further function On 10-Jul-04, at 9:45 AM, [EMAIL PROTECTED] wrote: Subject: breadcrumb app... Reply-

[PHP] Re: Putting a stop in a foreach - SOLVED

2004-05-09 Thread Verdon Vaillancourt
nd items should be initialized before the loop. > >> >> Please try and report if it helped. >> >> Regards, Torsten On 5/9/04 12:11 PM, Aidan Lister wrote:> > Simple! > > $i = 0; > foreach ($foos as $foo) > { > // do stuff > > $

Re: [PHP] Putting a stop in a foreach

2004-05-09 Thread Verdon Vaillancourt
Hmm, yes I see. Thank you. I guess what I should look at then is getting the key value (internal counter/pointer) in the array going to the foreach. Like this example... $a = array( 1,2,3,17 ); $i =0;/* for illustrative purposes only */ foreach ( $a as $v ) {    echo "\$ a[$i ]=> $v. \n ";   

[PHP] Putting a stop in a foreach

2004-05-09 Thread Verdon Vaillancourt
Hi :) I'm trying to put a stop in a foreach statement following the user suggestion here, php.net/manual/en/control-structures.foreach.php Not really knowing what I am doing, I am running into some synatx problems. I'm sure I'm doing something really stupid, can anybody point it out? This is the

Re: [PHP] Finding value in multi-dimensional array - Solved

2004-04-09 Thread Verdon Vaillancourt
Hi, Thanks much to Richard and Andy for the input :) This one did the job... if($_SESSION['OBJ_user']->modSettings['listings']['active'] == '1') { I'm still not entirely sure I understand the syntax ;) verdon > From: Richard Harb <[EMAIL PROTECTED]> > Date: Fri, 9 Apr 2004 22:49:44 +0200 >

Re: [PHP] Finding value in multi-dimensional array

2004-04-09 Thread Verdon Vaillancourt
Sorry, my example was poor :) Thanks for the print_r tip. When added to the bottom of the page, print_r($_SESSION["OBJ_user"]); Prints... phpws_user Object ( [user_id] => 5 [username] => agent [password] => 77abcd5cb2ef4a366c2749ea9931c79e [email] => [EMAIL PROTECTED] [admin_

[PHP] Finding value in multi-dimensional array

2004-04-09 Thread Verdon Vaillancourt
Hi, being somewhat of a noob, I hope I'm using the right language to phrase this question... In a project I am working with, I have a multi-dimensional array in session when a user logs in. Visually, it looks something like this... OBJ_user username => value isAdmin => value modSettin

Re: [PHP] Simple while loop skipping first row of array

2004-02-15 Thread Verdon Vaillancourt
: > > echo ""; > $result = mysql_query("select * from cats order by title"); > while ($c = mysql_fetch_array($result)) { > echo "$c[title]"; > } > echo ""; > > > ...and it should work just fine. > > Verdon Vaillancour

[PHP] Simple while loop skipping first row of array

2004-02-15 Thread Verdon Vaillancourt
I'm not sure I phrased my subject well, but... The following is just to build a select menu from a table query result set. It sort of works, but doesn't return the first row in the result set, ie if I have the following rows in the table 'cats'; id title == 1 Pears 2 Oranges 3 Appl

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
Thanks Kelly (and Richard), That did the job :) Salut, Verdon On 2/11/04 12:22 PM, "Kelly Hallman" <[EMAIL PROTECTED]> wrote: > On Wed, 11 Feb 2004, Verdon Vaillancourt wrote: >> I thought I might have tried that and just did again. >> >> I receive the er

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
I thought I might have tried that and just did again. I receive the error; Warning : Delimiter must not be alphanumeric or backslash in /server/path/to/functions.php on line I'm not sure if this means I have to escape something in the pattern, but will look further. Cheers, Verdon On 2/1

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
I should have prefaced my subject with NEWBIE :) Thanks, I'll give it a try. Best regards, verdon On 2/11/04 12:12 PM, "Richard Davey" <[EMAIL PROTECTED]> wrote: > Hello Verdon, > > Wednesday, February 11, 2004, 5:09:22 PM, you wrote: > > VV> I am trying to use a perl regular expression to v

[PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
Hi, I am trying to use a perl regular expression to validate a form field where I am allowing someone to edit a sql date-time stamp in the format of '2004-02-05 21:43:34'. I have found a pattern that works (at http://www.regexplib.com/RETester.aspx?regexp_id=93) which is; 20\d{2}(-|\/)((0[1-9])|

Re: [PHP] Menu populated based on previous menu

2003-10-28 Thread Verdon Vaillancourt
There's a nice GPL class that does this quite well. It could save you a lot of work and will definitely provide an example. Check out; http://www.phpclasses.org/search.html?words=linked_select&go_search=1 On 10/28/03 12:26 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > - Original Mes

[PHP] Re: php-general Digest 28 Oct 2003 17:26:53 -0000 Issue 2382

2003-10-28 Thread Verdon Vaillancourt
There's a nice GPL class that does this quite well. It could save you a lot of work and will definitely provide an example. Check out; http://www.phpclasses.org/search.html?words=linked_select&go_search=1 On 10/28/03 12:26 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > - Original Mes

[PHP] GD lib security issues

2003-09-10 Thread Verdon vaillancourt
Hi, I use a fairly standard sort of reseller package (*nix and hsphere based) for hosting sites. Although the versions of php and mySQL are fairly up to date, the version of GD lib is frozen at 1.6.2. When I question my provider about this and when GD v2.x would be available, they replied that the

[PHP] Re: Including classes inside functions vs outside - scope/global[solved]

2003-09-02 Thread Verdon vaillancourt
of $connobj = blah, use $GLOBALS['connobj'] = blah 2) global > $connobj; $connobj = blah > > Regards, Greg -- phpDocumentor http://www.phpdoc.org > > Verdon Vaillancourt wrote: Hi :) > >> Somewhat newbie question... >> >> I'm trying to inclu

[PHP] Including classes inside functions vs outside - scope/globalquestion?

2003-08-28 Thread Verdon vaillancourt
Hi :) Somewhat newbie question... I'm trying to include some open source classes into a project I am working on. The classes build a set of relational select menus from the contents of two tables. I have not trouble using the classes in a simple test page, but am running into problems when I try

Re: [PHP] I wish I knew more about multi-dimensional arrays

2003-08-23 Thread Verdon vaillancourt
} > > now you have a multi-dimensional array that contains each row in rows... > > examples: > row 1 col 1 - $rows[0][0] > row 3 col 2 - $rows[3][2] > > hth > > -- > bigdog > > > On Fri, 2003-08-22 at 10:37, Verdon vaillancourt wrote: >>

[PHP] I wish I knew more about multi-dimensional arrays

2003-08-22 Thread Verdon vaillancourt
Hi, please don't chuckle (too loudly) at my attempts to learn ;) I'm trying to create what I think would be a multi-dimensional array from a mysql result set, to use in some example code I got off this list last week. The example renedring code I want to work with is... "); for ($i = 0; $i < siz

Re: [PHP] Nestled 'while's or 'for's or 'foreach's -- I'm lost

2003-08-21 Thread Verdon vaillancourt
On Sun, 17 Aug 2003 15:47:04 -0400, I wrote: >> I'm trying to take a paged result set and divide it into two chunks for >> displaying on the page. Basically making something that looks like a typical >> thumbnail gallery... ...I've include a rather lengthy bit of pseudo code that >> represents bas

[PHP] Nestled 'while's or 'for's or 'foreach's -- I'm lost

2003-08-17 Thread Verdon vaillancourt
Hi, somewhat newbie warning :) I'm trying to take a paged result set and divide it into two chunks for displaying on the page. Basically making something that looks like a typical thumbnail gallery. I'm limiting my result set to 6 records and want to display it as 2 rows of 3 cells with a record i

Re: [PHP] Reformatting phone number string from user input

2003-08-14 Thread Verdon vaillancourt
atever. This is much simpler. I like simple :) Now I can focus on inserting a default area code, if the user does not ;) Salut, Verdon On 8/10/03 2:04 PM, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > Verdon vaillancourt wrote: > >> Hi :) >> >> I've b

Re: [PHP] Reformatting phone number string from user input

2003-08-14 Thread Verdon vaillancourt
ly doesn't make much difference. Thanks again :) On 8/10/03 2:25 PM, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > After you replace all of the non numeric characters, if the length is 7, > you can add the default area code. > Verdon vaillancourt wrote: > >&

[PHP] Reformatting phone number string from user input

2003-08-10 Thread Verdon vaillancourt
Hi :) I've been working on reformatting a phone number string from user input via a form field. Ultimately, my goal is to format all phone numbers in the same way regardless of whether a user inputs '(123) 456-7890', '123-456-7890', '123.456.7890', etc. before I insert them into a db. I know I've

Re: [PHP] Purging old files from directories

2003-08-01 Thread Verdon vaillancourt
Thank you :) On 8/1/03 10:06 AM, "Marek Kilimajer" <[EMAIL PROTECTED]> wrote: > Begin in the manual: > Directory functions > Filesystem functions - filemtime() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Purging old files from directories

2003-08-01 Thread Verdon vaillancourt
Hi :) I need to write a script that will scan/read a given directory's contents and delete files older than a certain date. Ideally, this will be a script that runs via cron once a week and deletes all files it finds in the directory older than 2 weeks from the current date. I do currently have sc

Re: [PHP] Re: MAIL( ) - Send mail using another SMTP

2003-06-21 Thread Verdon Vaillancourt
Something like this... Add the following into a .htaccess file for your domain(s) php_value SMTP smtp.yourhost.com On 6/21/03 7:51 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > how do you do this please explain

[PHP] Re: MAIL( ) - Send mail using another SMTP

2003-06-21 Thread Verdon Vaillancourt
I think you can do this with an .htaccess file instead of the php.ini file :) On 6/21/03 6:29 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > From: Chinmoy Barua <[EMAIL PROTECTED]> > Date: Fri, 20 Jun 2003 23:46:06 -0700 (PDT) > To: [EMAIL PROTECTED] > Subject: MAIL( ) - Send mail using an

[PHP] Checking for existence of file

2003-03-25 Thread Verdon Vaillancourt
HI :) I've got a function (crude but works) that checks for a value in the url and then I call an image based on that value. if (isset($_GET['menu'])) { $img_pick = substr($_GET['menu'],0,1); } else { $img_pick = "1"; } echo ""; What I'd like to do is check the directory 'images' first to s

Re: [PHP] Wildcard fromURL

2003-03-14 Thread Verdon Vaillancourt
Hi Chris, Thanks for the pointer :) I found some other interesting reference and ideas on using this in the manual. Now I just need to provide some error checking in case $_GET['menu'] isn't defined in the URL (that should be pretty straight fwd) and in case it is defined, but a corresponding imag

[PHP] Wildcard fromURL

2003-03-13 Thread Verdon Vaillancourt
Hi :) I want to place a particular image on a page based on the URL of the page. I have a variety of standard patterns to match in the URL. For instance; I would want all the following pages to load an image named something like foo_2.jpg mod.php?mod=userpage&menu=2&page_id=xxx mod.php?mod=userpa

[PHP] Re: Multiple page form

2002-11-26 Thread Verdon Vaillancourt
You might also want to look at this solution. It seems functional and elegant, worked simply for me... http://codewalkers.com/tutorials.php?show=28&page=1 > On 11/26/2002 01:42 PM, Shane McBride wrote: >> It's been a while since I have done any PHP work. I am creating an online >> employment app

Re: [PHP] Parsing an array from a posted form

2002-11-20 Thread Verdon Vaillancourt
A sincere thanks to John for the prompt and succinct answer. I've seen many answers from John on this list and am much appreciative of his generosity. Best regards, verdon :) On 11/20/02 3:07 PM, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: >> I have a form that is... ... >> Which will ret

[PHP] Parsing an array from a posted form

2002-11-20 Thread Verdon Vaillancourt
Hi All :) I have a form that is being passed to a mail function when submitted. It is working OK, except that I am having trouble with values from arrays such as checkbox lists. For example, I have a list such as: .eps .jpg .tif .gif .png .psd .bmp other I am using something like: for (

Re: [PHP] Storing/passing variables throughmultiple-partfunction/casestatement

2002-10-14 Thread Verdon Vaillancourt
On 10/14/02 11:07 PM, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > So you use the INSERT INTO ... SELECT ... to do the select from table 1 > and the insert into table 2. Then use a DELETE to erase the info from > table 1. > > Show your script so far, we can't help you much more without seeing

Re: [PHP] Storing/passing variables through multiple-partfunction/casestatement

2002-10-14 Thread Verdon Vaillancourt
O table2 SELECT * FROM table1 WHERE ... > DELETE FROM table1 WHERE ... > > Where are you stuck? > > ---John Holmes... > >> -----Original Message- >> From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]] >> Sent: Monday, October 14, 2002 4:31 PM >> To: P

[PHP] Storing/passing variables through multiple-part function/casestatement

2002-10-14 Thread Verdon Vaillancourt
Hi, I¹m trying to cobble together a case where where data is retrieved from one row of a mySQL table, the row is deleted, the retrieved data is inserted into a new row in different table. Most of my code seems to be working (I think the data is being retrieved, the old row is being deleted, the n

[PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post

2002-10-11 Thread Verdon Vaillancourt
Hi Apologies if this question has been answered before and I can't find it. I have searched and although finding similar issues, I haven't been able to fix. I have a file that creates a search for and then is supposed to post to itself to retriev results. When I add the first function (the searc

[PHP] Encrypting passwords in a flat file before import

2002-10-09 Thread Verdon Vaillancourt
Hi, I hope this question isn't too basic... I have a flat file (CSV) that I want to import into a mySQL db via phpMyAdmin. The file has about 1200 rows and is in a format like: "value","value","password","value","value","etc" The passwords are in clear text. I need them to be encrypted in md5.

Re: [PHP] Trying to add table prefix variable to query (solved)

2002-09-10 Thread Verdon Vaillancourt
Doh,... Thanks to all who replied so promptly with similar answers. :) vern On 9/10/02 9:13 AM, "Jacob Miller" <[EMAIL PROTECTED]> wrote: > Make sure you don't have a space before the 2nd half of the table name > > Wrong: > > .. "FROM " . $table_prefix . " teams" > > this will produce "FROM

[PHP] Trying to add table prefix variable to query

2002-09-10 Thread Verdon Vaillancourt
This query worked until I tried to add support for a table prefix in the config file. Now it can¹t seem to find the table. Any pointers to what I am doing wrong? Thanks, v Original query: This is my query: This is my config file: This is my table name: ccl_teams This is the error: Warning

[PHP] Script for drawing

2002-09-06 Thread Verdon Vaillancourt
Hi List, Is anyone aware of a script that would allow an image file to be read (like a map) and then allow a user to add a dot (or any other shape) and/or text to the image and then save the resulting image. TIA, verdon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Verdon Vaillancourt
Thanks Kevin, Do I need to include 'fclose ($fp);' in there somewhere in this case? On 7/2/02 3:41 PM, "Kevin Stone" <[EMAIL PROTECTED]> wrote: > Or just fopen() would work fine. > -Kevin > > - Original Message - >> Hi :) >> >> Given I have some content embedded on my page by calling

[PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Verdon Vaillancourt
Hi :) Given I have some content embedded on my page by calling a remote JS and occasionally the URL for the remote script is down causing my page to be slow or fail, can I use the following example as a means to test and timeout the remote server and skip the embedded JS, if the remote server isn

Re: [PHP] MacOSX / php.ini newbie question

2002-06-04 Thread Verdon Vaillancourt
m a fellow PHP'er on Mac OS X (Server) 10.1.4. : ) > > You need to download the full distribution from php.net/downloads ... In > there you will find a "php.ini-dist" file and "php.ini-recommended" file. > > Pick one that you like, edit as needed with BBEd

Re: [PHP] MacOSX / php.ini newbie question

2002-06-04 Thread Verdon Vaillancourt
save it as php.ini in > /usr/lib/ > > ---John Holmes... > > - Original Message - > From: "Verdon Vaillancourt" <[EMAIL PROTECTED]> > To: "Peter" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, June 04, 2002 9:04 AM

Re: [PHP] MacOSX / php.ini newbie question

2002-06-04 Thread Verdon Vaillancourt
t;[EMAIL PROTECTED]> wrote: > have you tried doing a general search for that file? ie search all of ur hdd > ... > > -----Original Message- > From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, 4 June 2002 11:15 AM > To: [EMAIL PROTECTED] > Su

[PHP] MacOSX / php.ini newbie question

2002-06-03 Thread Verdon Vaillancourt
Hi Apologies in advance if this question is simple. I haven't been able to find an answer... Is there no php.ini file in a php 4.1.2 install on MacOSX 10.1.4 (client not server) ? My php info/test page says that the path to the configuration file (php.ini) file is '/usr/lib', but it is not there