[PHP] PHP wiki recommendations

2005-09-07 Thread Murray @ PlanetThoughtful
Hi All, I want to add a wiki to my blog site to help create a knowledgebase of the characters, localities, stories I write to make it easier for new visitors to delve into the areas that interest them. I've been experimenting with a couple of different wiki packages, but am always interested in o

RE: [PHP] Help with Class

2005-09-07 Thread Ian Barnes
Hi, Thanks for the help, but none of those worked. Anyone else got any suggestions? Or possibly another way of achieving this ? Cheers Ian _ From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 05:47 PM To: Ian Barnes Cc: PHP General Subject: Re: [PHP]

RE: [PHP] Help with Class

2005-09-07 Thread Ian Barnes
Hi, Thanks for the help, but none of those worked. Anyone else got any suggestions? Or possibly another way of achieving this ? Cheers Ian _ From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 05:47 PM To: Ian Barnes Cc: PHP General Subject: Re: [PHP]

Re: [PHP] Cookie-question?

2005-09-07 Thread Gustav Wiberg
Original Message - From: Jose Miguel To: Gustav Wiberg Cc: PHP General Sent: Thursday, September 08, 2005 3:26 AM Subject: Re: [PHP] Cookie-question? Ok, please correct me if i'm wrong... First of all, i'd rather use $_COOKIE instead of $HTTP_COOKIE_VARS. And in the

[PHP] Re: Checking a date for validity

2005-09-07 Thread JamesBenson
I would use something like:- $date = '09/09/2005'; list($month, $day, $year) = explode("/", $date); if(checkdate($month, $day, $year)) { /* valid date */ } else { /* invalid date */ } Todd Cary wrote: I need to check the input of a

Re: [PHP] Cookie-question?

2005-09-07 Thread Jose Miguel
Ok, please correct me if i'm wrong... First of all, i'd rather use $_COOKIE instead of $HTTP_COOKIE_VARS. And in the line... if ($voteNow == 'Y' AND $userVote == 'Y' AND $cookieJoke != 'voted') { Why don't you use the operator NOT IDENTICAL (!==), cause != will also return true if the variable

Re: [PHP] Learning PHP - question about hidden form fields

2005-09-07 Thread Iggep
Wanted to thank the handful of you who wrote me with some hints. I really appreciate the guidance. :) The test form is working like a champ. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Learning PHP - question about hidden form fields

2005-09-07 Thread bruce
iggep... what are you trying to do with the following: >>echo ""; >>echo ""; if i had to guess, i'm pretty sure you're trying to assign the val of 'preform_submitted' to 'form_submitted'... but i'm not sure why... $preform_submitted will not have the val you think it does.. in fact, from your sa

Re: [PHP] Checking a date for validity

2005-09-07 Thread Ben
Todd Cary wrote: My need has to do with claimants for class action lawsuits, so I guess having drop downs for months, days and years is one answer. Drop down menus can certainly make your life easier, especially if you're dealing with an international audience and wondering what order to put

RE: [PHP] Checking a date for validity

2005-09-07 Thread Chris W. Parker
Todd Cary on Wednesday, September 07, 2005 3:39 PM said: >/* Is date good */ >function is_date_good($date) { > if (strtotime($date) == -1) { >$retval = 0; > } else { >if (strpos($date, "/") > 0) { > $parts = explode("/", $da

Re: [PHP] Learning PHP - question about hidden form fields

2005-09-07 Thread James Kaufman
On Wed, Sep 07, 2005 at 06:47:28PM -0400, Iggep wrote: > Hey all! I sat down and started learning PHP today and ran into a bit of a > spot. Hoped someone here could lead me in the right direction. I created a > simple test form called form.php. I thought I had this strait in my mind > when I

Re: [PHP] Checking a date for validity

2005-09-07 Thread Todd Cary
Jordan Miller wrote: writing a parse script is okay, but it will be very difficult to always ensure they are inputting it correctly. I recommend putting a popup calendar next to the input field. If the field is automatically populated in this way you will have a much easier time parsing it

Re: [PHP] Checking a date for validity

2005-09-07 Thread Jordan Miller
writing a parse script is okay, but it will be very difficult to always ensure they are inputting it correctly. I recommend putting a popup calendar next to the input field. If the field is automatically populated in this way you will have a much easier time parsing it correctly. I can't re

[PHP] Learning PHP - question about hidden form fields

2005-09-07 Thread Iggep
Hey all! I sat down and started learning PHP today and ran into a bit of a spot. Hoped someone here could lead me in the right direction. I created a simple test form called form.php. I thought I had this strait in my mind when I created it, but obviously it didn't work. All I want to do is

[PHP] Checking a date for validity

2005-09-07 Thread Todd Cary
I need to check the input of a user to make sure the date is valid and correctly formatted. Are there any examples available? Here is one solution I created: /* Is date good */ function is_date_good($date) { if (strtotime($date) == -1) { $retval = 0; } else { if (strpos

Re: [PHP] Breaking up search terms into an array intelligently

2005-09-07 Thread Brent Baisley
It sounds like you are trying to build a full text search string, perhaps for searching a MySQL database? Below is the function I came up with a while ago. It's worked fine, although it currently does not check for multiple spaces, but that should be easy to change. It uses a space as a del

Re: [PHP] Stripping control M character (^M)

2005-09-07 Thread Philip Hallstrom
Hello All, I'm having some issues with carriage returns. Specifically the control M character (^M). I have attempted to clean and validate the file I'm creating. Here's the code. while ($row = mysql_fetch_array($result)){ // assign and clean vars $artist = trim($row[artist]); $tdDate =

[PHP] Re: user registration/login - admin functions...

2005-09-07 Thread Aaron Greenspan
Bruce, If your project isn't commercial in nature, you can use Lampshade for free... http://www.thinkcomputer.com/software/lampshade/index.html The Lampshade Starter Kit should already have a schema outlined for user and security management that you can integrate into your own application.

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Sabine
Thanks, Gustav for your answer. I already solved my problem (see below) with help of other members of the list. Gustav Wiberg schrieb: - Original Message - From: "Sabine" <[EMAIL PROTECTED]> To: "PHP general" Sent: Wednesday, September 07, 2005 7:14 PM Subject: [PHP] Assign values i

[PHP] Stripping control M character (^M)

2005-09-07 Thread Paul Nowosielski
Hello All, I'm having some issues with carriage returns. Specifically the control M character (^M). I have attempted to clean and validate the file I'm creating. Here's the code. while ($row = mysql_fetch_array($result)){ // assign and clean vars $artist = trim($row[artist]); $tdDa

[PHP] install-pear.phar errors

2005-09-07 Thread Greg Donald
-- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Jason Davidson
In case it hasnt been said already, as long as your array has numeric and consecutive keys, you could use 'for' instead of 'foreach'. Jason On 9/7/05, Gustav Wiberg <[EMAIL PROTECTED]> wrote: > > > - Original Message - > From: "Sabine" <[EMAIL PROTECTED]> > To: "PHP general" > Sent:

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Gustav Wiberg
- Original Message - From: "Sabine" <[EMAIL PROTECTED]> To: "PHP general" Sent: Wednesday, September 07, 2005 7:14 PM Subject: [PHP] Assign values in foreach-loop Hello to all, is it possible to assign values to the array for which I do the foreach-loop? foreach ($_SESSION['arr1

[PHP] user registration/login - admin functions...

2005-09-07 Thread bruce
hi... i'm creating a couple of sites that are going to need a user registration/login functin as well as an admin function. rather than reinvent the wheel, it thought i'd turn to you guys, to see if you've run across any app that you thought was good regarding the functions. i'm more than willing

Re: [PHP] Breaking up search terms into an array intelligently

2005-09-07 Thread Gustav Wiberg
- Original Message - From: "Paul Groves" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Wednesday, September 07, 2005 5:45 PM Subject: Re: [PHP] Breaking up search terms into an array intelligently Gustav Wiberg wrote: - Original Message -

Re: [PHP] Integer - boundary?

2005-09-07 Thread Gustav Wiberg
Thanx for the scripts! :-) Appreciated! /G http://www.varupiraten.se/¨ - Original Message - From: "Brian P. O'Donnell" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 07, 2005 5:53 PM Subject: Re: [PHP] Integer - boundary? ""M. Sokolewicz"" <[EMAIL PROTECTED]> wrote in message

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Edward Vermillion
Jordan Miller wrote: Hello, You simply need the $key variable, then you can set a new value for $arr[$key] for each array element: $value) { $arr[$key] = $value * 2; } // $arr is now array(2, 4, 6, 8) ?> http://www.php.net/foreach If you have PHP 5, you can perhaps more efficiently do t

[PHP] Assign values in foreach-loop: Problem solved

2005-09-07 Thread Sabine
Thanks a lot for your fast answers, I'll do it like -TG and Jordan in his last post suggested! Sabine Original-Nachricht Betreff:[PHP] Assign values in foreach-loop Datum: Wed, 07 Sep 2005 19:14:40 +0200 Von:Sabine <[EMAIL PROTECTED]> Antwort an: [EMAIL PROTEC

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Jordan Miller
sorry, i didn't fully answer the questions... if i understand your multidimensional array correctly, your code should be something like: foreach ($_SESSION['arr1'] as $key => $arr1) { foreach ($_SESSION['arr2'] as $arr2) { if ($arr1['id'] == $arr2['id']) { $_SESSION['arr1

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread tg-php
Yeah, you can assign values, but you have to keep track of keys, so you'll want to use the => operator for foreach (pardon my reformatted, I feel naked without my braces): foreach ($_SESSION['arr1'] as $key1 => $arr1) { foreach ($_SESSION['arr2'] as $key2 => $arr2) { if ($arr1['id']

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Jordan Miller
Hello, You simply need the $key variable, then you can set a new value for $arr[$key] for each array element: $value) { $arr[$key] = $value * 2; } // $arr is now array(2, 4, 6, 8) ?> http://www.php.net/foreach If you have PHP 5, you can perhaps more efficiently do this: As of PHP 5, yo

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Edward Vermillion
Sabine wrote: Hello to all, is it possible to assign values to the array for which I do the foreach-loop? foreach ($_SESSION['arr1'] as $arr1) { foreach ($_SESSION['arr2'] as $arr2) { if ($arr1['id'] == $arr2['id']) { $arr1['selected'] = true; } } } I think $

[PHP] Assign values in foreach-loop

2005-09-07 Thread Sabine
Hello to all, is it possible to assign values to the array for which I do the foreach-loop? foreach ($_SESSION['arr1'] as $arr1) { foreach ($_SESSION['arr2'] as $arr2) { if ($arr1['id'] == $arr2['id']) { $arr1['selected'] = true; } } } I think $arr1 is only

[PHP] OCI8 1.1 announce

2005-09-07 Thread Antony Dovgal
Hi all, Yesterday OCI8 extension have been updated in the PHP CVS (HEAD only). This updated driver resolves a large amount of bug reports and adds some improvements both functionality and performance, and much better documentation (see here: http://php.net/oci8). A lot of time has been invest

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
""M. Sokolewicz"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > or, easier, simply make this script: > echo PHP_INT_MAX; > ?> > > and you're done :P The maximum integer value is stored in PHP_INT_MAX as > of 4.4.0 and PHP 5.0.5 > > before that, you had to use a way as the one Bri

Re: [PHP] Breaking up search terms into an array intelligently

2005-09-07 Thread Paul Groves
Gustav Wiberg wrote: - Original Message - From: "Paul Groves" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 07, 2005 4:54 PM Subject: [PHP] Breaking up search terms into an array intelligently I want to be able to break up a number of search terms typed into an input box into a

Re: [PHP] Integer - boundary?

2005-09-07 Thread M. Sokolewicz
Brian P. O'Donnell wrote: ""Gustav Wiberg"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] - Original Message - From: "Shaw, Chris - Accenture" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]>; "PHP General" Sent: Wednesday, September 07, 2005 5:03 PM Subject: R

Re: [PHP] Help with Class

2005-09-07 Thread Jason Davidson
I would have guessed unset($sqk); to work, but also try $sdk = null; Jason On 9/7/05, Ian Barnes <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am writing a site where I need to access multiple classes of the same > name > located under certain directories. The reason for each directory is >

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
""Gustav Wiberg"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > - Original Message - > From: "Shaw, Chris - Accenture" <[EMAIL PROTECTED]> > To: "Gustav Wiberg" <[EMAIL PROTECTED]>; "PHP General" > > Sent: Wednesday, September 07, 2005 5:03 PM > Subject: RE: [PHP] Intege

[PHP] Help with Class

2005-09-07 Thread Ian Barnes
Hi, I am writing a site where I need to access multiple classes of the same name located under certain directories. The reason for each directory is because the class under that directory talks only to the files in that directory and cant do multiple (its not my software) I have it so that

Re: [PHP] Breaking up search terms into an array intelligently

2005-09-07 Thread Gustav Wiberg
- Original Message - From: "Paul Groves" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 07, 2005 4:54 PM Subject: [PHP] Breaking up search terms into an array intelligently I want to be able to break up a number of search terms typed into an input box into array, simple enough one

Re: [PHP] Confused about how to best execute php scripts in /cgi-bin/

2005-09-07 Thread KEVIN ZEMBOWER
Disappointed that there was no response to this message, I nevertheless seemed to have solved the problem by adding "AddHandler php-script .php" to the stanza for my /cgi-bin/ directory. For the archives, in case anyone is searching for this answer, too. -Kevin >>> KEVIN ZEMBOWER <[EMAIL PROT

Re: [PHP] Integer - boundary?

2005-09-07 Thread Gustav Wiberg
- Original Message - From: "Shaw, Chris - Accenture" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]>; "PHP General" Sent: Wednesday, September 07, 2005 5:03 PM Subject: RE: [PHP] Integer - boundary? -Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTE

RE: [PHP] Integer - boundary?

2005-09-07 Thread Shaw, Chris - Accenture
> -Original Message- > From: Gustav Wiberg [mailto:[EMAIL PROTECTED] > > Hi there! > > What is the boundary for an integer? > > seems to be a easy question, but I can't find it... > > /G > http://www.varupiraten.se/ > According to the manual, "The size of an integer is platform-de

RE: [PHP] regular expression for integer range

2005-09-07 Thread Murray @ PlanetThoughtful
> Hi all, > > > I want to write regular expression for checking the string format entered > by user. > > the allowed formats are > > examples: > 10 > 10, > 10,12-10 > 12-10 > > that is the valid strings are: > 1. only integer > 2. an integer, range of integers example 3 > > and no other chara

[PHP] Breaking up search terms into an array intelligently

2005-09-07 Thread Paul Groves
I want to be able to break up a number of search terms typed into an input box into array, simple enough one would think, just use explode, e.g $array = explode(" ", $string); But what if I want to be able to cope with search terms seperated by > 1 space (a common typing error)? This should wor

[PHP] Integer - boundary?

2005-09-07 Thread Gustav Wiberg
Hi there! What is the boundary for an integer? seems to be a easy question, but I can't find it... /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session object destruction failed

2005-09-07 Thread Gustav Wiberg
Hi there! How does your code look like? /G http://www.varupiraten.se/ - Original Message - From: "Dan Rossi" <[EMAIL PROTECTED]> To: "PHP LIST" Sent: Wednesday, September 07, 2005 12:55 PM Subject: [PHP] Session object destruction failed Hi there, I am using a pear session package

[PHP] Cookie-question?

2005-09-07 Thread Gustav Wiberg
Hi there! Look at following code below, and please give me a clue why this cookie-thing doesn't work? $IDJoke is set before and is an ID from a row in a db It seems to work a while, but is there a limit for the expire-parameter? /G http://www.varupiraten.se/ //Get cookie from users computer

Re: [PHP] iconv() in PHP returns 'Unknown error 0'

2005-09-07 Thread Toomas Aas
Toomas Aas wrote: - - When I load this script via the browser, PHP outputs nothing. I have error logging set to file only, and in the log file there is this error: [07-Sep-2005 12:10:07]

[PHP] Re: Parsing MS-WORD docs

2005-09-07 Thread zzapper
On Wed, 7 Sep 2005 09:18:03 +0100 (BST), wrote: > >On Wed, September 7, 2005 7:39 am, Shafiq Rehman wrote: >> Hello, >> >> I want to parse the .doc files with PHP. Anybody have some idea regarding >> this problem. >> >> Your help regarding this matter is really appreciated >> >> Regards >> -- >>

[PHP] Session object destruction failed

2005-09-07 Thread Dan Rossi
Hi there, I am using a pear session package to handle my sessions. However I am trying to destroy a url based non cookie session and then start a cookie based session however i am trying to set the session cookie with an expiry date, as ive been having complications with sessions expiring to wa

[PHP] GD2 on Linux

2005-09-07 Thread Robert Graham
Good day I am trying to get GD2 working on my Linux Box CentOS 4.0 with php4.2.2 the installation went well, but now, I can't find the gd2.so library that I need to put in /usr/lib/php4 directory. Can anyone give me some pointers on how to resolve this challange. Regards Robert -- PHP Genera

Re: [PHP] header, location: mailto abd browsers

2005-09-07 Thread Jasper Bryant-Greene
Bernard Perrot wrote: Mikey wrote: Your script doesn't appear to be trying to do a re-direct, but rather open a client side e-mail - if you want to do this, then you will need to use JavaScript on the client side. Yes it redirect, because PHP add a 302 response header in this case. And the

Re: [PHP] header, location: mailto abd browsers

2005-09-07 Thread Bernard Perrot
Mikey wrote: Your script doesn't appear to be trying to do a re-direct, but rather open a client side e-mail - if you want to do this, then you will need to use JavaScript on the client side. Yes it redirect, because PHP add a 302 response header in this case. And the client-side email is op

Re: [PHP] header, location: mailto abd browsers

2005-09-07 Thread Mikey
Bernard Perrot wrote: hello, I have a little problem with this kind of script : mailto:$addr";); } mailto("[EMAIL PROTECTED]"); ?> When called from an html page, it open correctly un MUA from mailing, but with some browser (mozilla for example), the calling page is still displayed, and wit

Re: [PHP] debugging dl()

2005-09-07 Thread Mikey
Bob Pilly wrote: Hi All Im having problems using dl() to load an extension that someone has given me. I get the following output from this simple script: //script //output PHP Warning: dl(): \u?\u: Unable to initialize module Module compiled with module API=20020429, debug=0, threa

Re: [PHP] debugging dl()

2005-09-07 Thread Jasper Bryant-Greene
Bob Pilly wrote: [snip] PHP Warning: dl(): \u?\u: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=0 PHPcompiled with module API=20041030, debug=0, thread-safety=0 These options need to match The module was compiled for an earlier version

[PHP] header, location: mailto abd browsers

2005-09-07 Thread Bernard Perrot
hello, I have a little problem with this kind of script : mailto:$addr";); } mailto("[EMAIL PROTECTED]"); ?> When called from an html page, it open correctly un MUA from mailing, but with some browser (mozilla for example), the calling page is still displayed, and with some others (firefox f

[PHP] debugging dl()

2005-09-07 Thread Bob Pilly
Hi All Im having problems using dl() to load an extension that someone has given me. I get the following output from this simple script: //script //output PHP Warning: dl(): \u?\u: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=0 PHPc

[PHP] iconv() in PHP returns 'Unknown error 0'

2005-09-07 Thread Toomas Aas
Hello! I am managing a FreeBSD 4.11 server which is currently running PHP 4.3.11. The server was originally installed in 2003 with an older version of PHP and libiconv 1.8. All software has been installed from FreeBSD ports. Over the time PHP has been upgraded several times, but libiconv has

Re: [PHP] Parsing MS-WORD docs

2005-09-07 Thread Richard Collyer
On Wed, September 7, 2005 7:39 am, Shafiq Rehman wrote: > Hello, > > I want to parse the .doc files with PHP. Anybody have some idea regarding > this problem. > > Your help regarding this matter is really appreciated > > Regards > -- > > PHP is too logical for my brain (http://www.phpgurru.com) >

Re: [PHP] regular expression for integer range

2005-09-07 Thread Robin Vickery
On 9/6/05, babu <[EMAIL PROTECTED]> wrote: > Hi all, > > > I want to write regular expression for checking the string format entered by > user. > > the allowed formats are > > examples: > 10 > 10, > 10,12-10 > 12-10 > > that is the valid strings are: > 1. only integer > 2. an integer, range o

Re: [PHP] Sessions , expiry times and different time zones

2005-09-07 Thread Mark Rees
Dan Rossi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > client cookie expires hence no more session ... > > On 07/09/2005, at 1:57 AM, Jordan Miller wrote: > > > Hi Dan, > > > > Couldn't you store an expiration time directly in the $_SESSION > > variable, rather than relying on co

[PHP] [Mail]mb_encode_mimeheader

2005-09-07 Thread Sylvain Gourvil
Hi ! I need some help for mail's encoding structure. I use this code for encoding french character like 'é' or 'è': mb_language('uni'); mb_internal_encoding(mb_detect_encoding($this->subject)); $res = mail('[EMAIL PROTECTED]', mb_encode_mimeheader($this->subject