Re: [PHP] Form validation

2002-04-25 Thread Tarjei Huse
Hi, I just thought I'd say thank's too all who responded to my question. Very good answers! I ended up using strip_tags (after someone pointed it out too me) kombinded with a couple of eregs. Tarjei John Holmes wrote: > > > I need a function or class to validate a form with a cuple of text >

Re: [PHP] GD: º becomes $

2002-04-25 Thread heinisch
At 25.04.2002 18:03, you wrote: > When I create an image, º becomes $. Actually a small $. (pratically >half-sized). Maybe it's a "s" with a tail. I really have never seen this >character before :-) > > An example: > >$im = @ImageCreate (450, 500) > or exit ("Cannot Initialize new GD imag

Re: [PHP] mail() not sending -- Little bit OT

2002-04-25 Thread Justin French
Are you using headers in your mail script??? I'm no expert on sendmail at all, but your host may require the From: [EMAIL PROTECTED] header before it will send It's worth a shot :) Otherwise, does the binary and Apache version share the same php.ini file Justin French --

Re: [PHP] mail() not sending -- Little bit OT

2002-04-25 Thread Miguel Cruz
On Fri, 26 Apr 2002, David Redmond wrote: > When attempting to send an email through a PHP script via Apache, no emails > are sent. However if I use the standalone binary and run the same script > but on the console then it works fine. > > Because of that I have a feeling that there is something

[PHP] mail() not sending -- Little bit OT

2002-04-25 Thread David Redmond
Hi All, When attempting to send an email through a PHP script via Apache, no emails are sent. However if I use the standalone binary and run the same script but on the console then it works fine. Because of that I have a feeling that there is something in Sendmail which is preventing the "nobod

RE: [PHP] Redirect

2002-04-25 Thread John Holmes
You can use header() for that...just don't display anything before you redirect them. Otherwise you need a client side solution like a META REFRESH ---John Holmes... > -Original Message- > From: Jennifer Downey [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 5:10 PM > To: [

RE: [PHP] Redirect

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
With header you can do by using header("Location: http://www.site.com/some/page.php?some=var";); here's a good article about it: http://www.phpbeginner.com/columns/shobhan/browser other than that, you can always include(). But this is a little bit of a mess. Sincerely, Maxim Maletsky Founde

[PHP] HTTP GET with Digest Auth

2002-04-25 Thread Eric
I am trying to do an HTTP GET to pull down webpages, parse and store data into a MySQL DB. However the pages are using digest auth as outlines in RFC2617. I am unable to generate the correct MD5 hash from the following code for using MD5-sess: $realm = "[EMAIL PROTECTED]"; $nonce

[PHP] Redirect

2002-04-25 Thread Jennifer Downey
Hi to all, I am wondering if there are other ways to redirect users other than using header()? I have a script that if the user doesn't have enough money to buy an item then it directs to one page and if they do then it directs them back to the referring page. Is this possible? Thanks Jennife

[PHP] Australian contracts

2002-04-25 Thread Justin French
Greetings all, Does anyone know of any Australian websites which have facilities to post and look for PHP/MySQL/web application contracts??? (Or perhaps global sites with a high Australian user base) Justin French Creative Director http://Indent.com.au

RE: [PHP] Form validation

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, John Holmes wrote: > I'd recommend putting your validation and formatting together, too. I > hate it when some people enter names into my database in all caps, and > some all lowercase. So in my validation routine, I make sure that the > name is only letters, (except for a pos

Re: [PHP] 4.2 new GLOBALS question

2002-04-25 Thread Jeff Lewis
Excuse me, you're right. I was using this include as a "preprocess" step as I was using ; to seperate arguments in the query string like this index.php?s=something;t=thing The preprocess step was breaking them apart and then I was doing this: $start = isset($HTTP_GET_VARS['s']) ? $HTTP_GET_VARS

RE: [PHP] 4.2 new GLOBALS question

2002-04-25 Thread John Holmes
> I am working on an odler script which loads up in index.php and a URL is > passed usually like index.php?s=something > > Now, around line 10 of index.php I do an include that pulls the value of s > via HTTP_POST_VARS and then I dump it into $start. What do you mean you "dump it into $start"??

[PHP] RE: Load Balancing and PHP Sessions

2002-04-25 Thread Philip Hallstrom
Or save it to a common database... and it could have something to do with session.cooke_domain. A cooke set explicity to www1.test.com won't be viewable on www2.test.com, but if you set the domain to ".test.com" it will... On Thu, 25 Apr 2002, Dan Harrington wrote: > > Couldn't you store the se

RE: [PHP] Form validation

2002-04-25 Thread John Holmes
> I'd recommend you write down a list of EVERYTHING you'd like to achieve, > and > then we can help you build some code to use, or recommend a class. I'd recommend putting your validation and formatting together, too. I hate it when some people enter names into my database in all caps, and some a

Re: [PHP] session_cache_expire()

2002-04-25 Thread Matt Rohrer
On Thu, Apr 25, 2002 at 03:03:43PM -0300, Pierre Arsenault wrote: > > session_cache_expire() > > How does this function work? > > I keep getting and error saying the function is undefined... , I'm using > version 4.1.2, which session support built in. According to the > documentation this fun

[PHP] 4.2 new GLOBALS question

2002-04-25 Thread Jeff Lewis
I am working on an odler script which loads up in index.php and a URL is passed usually like index.php?s=something Now, around line 10 of index.php I do an include that pulls the value of s via HTTP_POST_VARS and then I dump it into $start. It used to work just fine and still does except on 4.

RE: [PHP] PHP Security Leak (plaintext)

2002-04-25 Thread John Holmes
> $my_val_a = addslashes($HTTP_POST_VARS["val_a"]); > $my_val_b = addslashes($HTTP_POST_VARS["val_b"]); > $query = "INSERT INTO foo (a,b) VALUES ($my_val_a,$my_val_b)"; > > Or if you have magic_quotes_gpc turned on (the default) all vars passed > in from forms/cookies are quoted and SQL injection

Re: [PHP] Form validation

2002-04-25 Thread Justin French
Everyone on this list would write this stuff everyday. The catch is that my needs change for almost every application, so I haven't written a class as yet. However, generally, what you want to achieve can be done easily. I'd recommend you write down a list of EVERYTHING you'd like to achieve, a

RE: [PHP] authorization headers

2002-04-25 Thread John Holmes
Couldn't you use something like this: header("Location: http://user:[EMAIL PROTECTED]/path/to/file.php";); ---John Holmes... > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 11:11 AM > To: [EMAIL PROTECTED] > Subject: [PHP] autho

RE: [PHP] PHP Security Leak (plaintext)

2002-04-25 Thread Richard Archer
At 4:00 PM -0500 25/4/02, Joshua b. Jore wrote: >"INSERT INTO foo (a,b) VALUES (?,?)" $my_val_a = addslashes($HTTP_POST_VARS["val_a"]); $my_val_b = addslashes($HTTP_POST_VARS["val_b"]); $query = "INSERT INTO foo (a,b) VALUES ($my_val_a,$my_val_b)"; Or if you have magic_quotes_gpc turned on (the

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread John Holmes
I don't think performance should be as much of a concern as security. When you get warnings about undefined variables, it should make you think about where this variable's value is coming from. If register_globals is off, then this isn't as much of an issue. If I use $id, at least I know it's not

[PHP] Re: ZIP/STORE LOCATOR

2002-04-25 Thread Manuel Lemos
Hello, Andras Kende wrote: > Hello All, > > I looking for a php ZIP/STORE LOCATOR for website.. > > Anyone knows where to look?? I think you want this class: http://www.phpclasses.org/browse.html/package/522.html Regards, Manuel LEmos -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] ISP in Australia

2002-04-25 Thread Justin French
What's your budget. There are many here, but always at a premium in comparison to US servers. Justin French Creative Director http://Indent.com.au on 26/04/02 8:26 AM, Jim Koutoumis ([EMAIL PROTECTED]) wrote: > Hi all, > > Just looking to see if any

[PHP] ZIP/STORE LOCATOR

2002-04-25 Thread Andras Kende
Hello All, I looking for a php ZIP/STORE LOCATOR for website.. Anyone knows where to look?? Thanks, Andras Kende -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ISP in Australia

2002-04-25 Thread Jim Koutoumis
Hi all, Just looking to see if anyone knows of any ISP in Australia, that offers PHP and MySQL for their customer usage. Any information would be greatly appreciated. Thanks, Jim. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP Security Leak (plaintext)

2002-04-25 Thread John Holmes
> I think you misunderstood me. I already have a AuthenticateUser(TEXT,TEXT) > function that works great. What I don't understand is how to get PHP to > use place holders for data binding. This is more generic database issue. I > could have also written: > > "INSERT INTO foo (a,b) VALUES (?,?)" >

Re: [PHP] Array function to delete

2002-04-25 Thread Lars Torben Wilson
On Thu, 2002-04-25 at 14:01, Kevin Stone wrote: > About all I would suggest is that you eliminate the unecessary function > calls substr and explode to optimize your code. I doubt prebuilt PHP > functions will help you here. This is perfectly valid method for deleting > elements in an array and

Re: [PHP] Ordering output

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 05:38 PM, Steve Buehler wrote: > Thank you for wanting to try and tackle this in PHP/MySQL. I will > include the code that I have and also the sql for the tables. ... > Here is my Select statment > Select * from $temp2 where sea_id = '$sea_id' order by pts DE

RE: [PHP] Load Balancing and PHP Sessions

2002-04-25 Thread Dan Harrington
Couldn't you store the session information on disk using sessions.save on an NFS volume that is shared between machines? Dan > -Original Message- > From: Baumann Reto [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 3:39 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Load Balan

Re: [PHP] php in a layer trouble

2002-04-25 Thread Rob Packer
Yep, you guys are right! Thanks for the help Robert "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I don't believe there is such a problem, because > > > > will get replaced with foo by the PHP parser. >> Thus by the > time the content get

Re: [PHP] Ordering output

2002-04-25 Thread Steve Buehler
Thank you for wanting to try and tackle this in PHP/MySQL. I will include the code that I have and also the sql for the tables. CREATE TABLE b863765470 ( team_id int(10) default NULL, name varchar(30) default NULL, sea_id int(10) default NULL, w int(10) default '0', l int(10) default '0

[PHP] Load Balancing and PHP Sessions

2002-04-25 Thread Baumann Reto
Is it possible to have sessions (via cookie) on a load balanced environment? Therefore having www1.test.com and www2.test.com and share the same sessions? The systems can access the same file-system, but it seems that the session is not passed. Could this have something to do with ses

RE: [PHP] Form validation

2002-04-25 Thread John Holmes
> I need a function or class to validate a form with a cuple of text areas > that are alloed to contain a few html tags ( etc) but not all, > and I need a script to validate the input from the fields and stop the > html elements that are not allowed. > > Does anyone have a function or class handy

Re: [PHP] authorization headers

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002 [EMAIL PROTECTED] wrote: > does anybody know how to pass the correct username and password as a > header to a directory with an .htaccess file. > > i tried > > header("Authorization: Basic username:password"); > > like that and also where the username:password was base 64 en

Re: [PHP] Ordering output

2002-04-25 Thread Steve Buehler
First off, thank you Miguel and Nathan for responding. The ordering changes. Here is what I have for my query: $searchStmt="Select * from $temp2 where sea_id = '$sea_id' order by pts DESC"; if($aa){$searchStmt .= ",$aa DESC";} if($bb){$searchSt

Re: [PHP] Array function to delete

2002-04-25 Thread Kevin Stone
About all I would suggest is that you eliminate the unecessary function calls substr and explode to optimize your code. I doubt prebuilt PHP functions will help you here. This is perfectly valid method for deleting elements in an array and it's about as fast as you're ever going to get. :) -

Re: [PHP] Array wildcard?

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Leif K-Brooks wrote: > on 4/25/02 1:58 PM, Miguel Cruz at [EMAIL PROTECTED] wrote: >> On Thu, 25 Apr 2002, Leif K-Brooks wrote: >>> Is there some array wildcard I can use? In other words, I have an >>> array. Is there any wildcard function/character that will let me test >>>

Re: [PHP] Re: array - change elements position

2002-04-25 Thread Evandro Sestrem
This is what I was looking for! Thank you very much. "Miguel Cruz" <[EMAIL PROTECTED]> escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 25 Apr 2002, Evandro Sestrem wrote: > > My example wasn't good. > > > > I have a array of objects and want change its positions. > >

Re: [PHP] redirect to new page and pass variables too? (fwd)

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Pushkar Pradhan wrote: > I'm trying to do urlencode/urldecode: > my $layer[] contains: aban_railroads, airport_runways2001, blk_grps > this is what IE shows in my address window when I do the redirection: > >http:///updateHTML.php?layer=a%3A3%3A%7Bi%3A0%3Bs%3A14%3A%22aban

Re: [PHP] Re: array - change elements position

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Evandro Sestrem wrote: > My example wasn't good. > > I have a array of objects and want change its positions. > > $array = (obj2, obj1, obj3) --> $array = (obj1, obj2, obj3). > > Like TStringList.Exchange in Delphi. > > Sort() don't work in this case, because I want sort

Re: [PHP] Ordering output

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Steve Buehler wrote: > I am using PHP to access a mysql database. I was told that what I need to > do needs to be done in PHP and not mysql. I can get mysql to order things > like this: > Select * from $temp2 where sea_id = '$sea_id' order by pts DESC > The problem is that

[PHP] Re: DOM XML

2002-04-25 Thread J Smith
I'm assuming it's that stray dollar sign you have in front of domxml_root. J Sebastian A. wrote: > Hello, > > I have been recently doing experiments with the DOM XML function and I am > (not surprisingly) having some problems with it. When I try to run the > code below, I get an error saying

[PHP] GD: º becomes $

2002-04-25 Thread Julio Nobrega Trabalhando
When I create an image, º becomes $. Actually a small $. (pratically half-sized). Maybe it's a "s" with a tail. I really have never seen this character before :-) An example: $im = @ImageCreate (450, 500) or exit ("Cannot Initialize new GD image stream"); $background_color = ImageColorAl

[PHP] Ordering output

2002-04-25 Thread Steve Buehler
I am using PHP to access a mysql database. I was told that what I need to do needs to be done in PHP and not mysql. I can get mysql to order things like this: Select * from $temp2 where sea_id = '$sea_id' order by pts DESC The problem is that if there is a tie (as in ranking 4 and 5 below), I

RE: [PHP] PHP Security Leak (plaintext)

2002-04-25 Thread Cal Evans
It's not PHP's place to do this. That being said, check out ADODB. It's a data abstraction layer for several different databases that will give you this functionality. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Joshua b

RE: [PHP] PHP Security Leak (plaintext)

2002-04-25 Thread Joshua b. Jore
Foo. Somehow I encrypted the last message. --[PinePGP]--[begin]-- I think you misunderstood me. I already have a AuthenticateUser(TEXT,TEXT) function that works great. What I don't understand is how to get PHP to use place holders for data binding.

Re: [PHP] Array function to delete

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 04:27 PM, Liam Gibbs wrote: > Thanks for all your help, everyone, but both > suggestions (unset and array_slice) pretty much didn't > improve on my current way. I was jsut trying to find a > faster way, but unset doesn't seem to be working > properly (but I'll ne

Re: [PHP] Re: array - change elements position

2002-04-25 Thread Pushkar Pradhan
Have you thought about swapping the elements, it's quite simple, I don't know about more complicated methods using pointers here's the code: $layer is the array - $currPos = array_search($HTTP_POST_VARS["selLayer"], $layer); $temp = $layer[$currPos]; $layer[$currPos] = $layer[$cu

Re: [PHP] redirect to new page and pass variables too? (fwd)

2002-04-25 Thread Pushkar Pradhan
Regarding my previous post: I found out that $QUERY_STRING contains the query: layer=a%3A3%3A%7Bi%3A0%3Bs%3A14%3A%22aban_railroads%22%3Bi%3A1%3Bs%3A19%3A%22airport_runways2001%22%3Bi%3A2%3Bs%3A8%3A%22blk_grps%22%3B%7D Now I am doing: $layer = unserialize($QUERY_STRING); or even unserialize(urldeco

[PHP] Re: array - change elements position

2002-04-25 Thread Evandro Sestrem
My example wasn't good. I have a array of objects and want change its positions. $array = (obj2, obj1, obj3) --> $array = (obj1, obj2, obj3). Like TStringList.Exchange in Delphi. Sort() don't work in this case, because I want sort based in a attribute of the object. Evandro "Evandro Sestre

Re: [PHP] Array function to delete

2002-04-25 Thread Liam Gibbs
Thanks for all your help, everyone, but both suggestions (unset and array_slice) pretty much didn't improve on my current way. I was jsut trying to find a faster way, but unset doesn't seem to be working properly (but I'll need to fiddle more) and the array_slice way is just too intensive. for($c

RE: [PHP] PHP Security Leak

2002-04-25 Thread Joshua b. Jore
-BEGIN PGP MESSAGE- Comment: For info see http://www.gnupg.org owGlWL9vHMcVlmy4IcDCQIC0L2qONJZLibGS4GDrN63QpkRFRyURDEGY2527Hd3s znpmlucNYDduXLhwlyqA/4BUaVwZSJogQJIirowAKVykc7oAQrp8b3bvdu9ES5bM I4i7mX1v3rz3fd97x083Xz770qsffPPOHz6JPv/p2b9+48+88Rf15QH5TBUzqk1F uXJVkUrrvDEp5TKmAxLaSpHWlIkTSYK

RE: [PHP] PHP Security Leak

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
Create yourself an SQL function that does that :-) Sincerely, Maxim Maletsky Founder, Chief Developer www.PHPBeginner.com // where PHP Begins > -Original Message- > From: Joshua b. Jore [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 10:26 PM > Cc: [EMAIL PROTECTED] >

RE: [PHP] PHP Security Leak

2002-04-25 Thread Joshua b. Jore
This brings up another issue, how the heck do you get data binding? For the life of me I don't see where the _query functions support SQL like: "SELECT AuthenticateUser(?,?)" where then the first param might be a usernamd and the second would be a password. The idea is that without this sort of t

Re: [PHP] Array function to delete

2002-04-25 Thread Richard Baskett
OK I wrote this function to delete a specific value in an array, it shouldn¹t be hard to modify it to do what you need it to do. $num is the value I want to delete, $cartVals is the array. If you have any questions feel free to contact me. Cheers! function cartRem($num) { global $cartVals;

Re: [PHP] redirect to new page and pass variables too? (fwd)

2002-04-25 Thread Pushkar Pradhan
I'm trying to do urlencode/urldecode: my $layer[] contains: aban_railroads, airport_runways2001, blk_grps this is what IE shows in my address window when I do the redirection: http:///updateHTML.php?layer=a%3A3%3A%7Bi%3A0%3Bs%3A14%3A%22aban_railroads%22%3Bi%3A1%3Bs%3A19%3A%22airport_runways200

Re: [PHP] Array function to delete

2002-04-25 Thread Nathan
Apparently in 4.1.X this is true... I'd been running 4.0.6 for a long time (until 4.1.2 was released), and must have coded it in the earlier version. I stand corrected! :-) A simple test to see if your version supports this: $value) { echo $key." = ".$value.""; } ?> If you're running a

RE: [PHP] getting a string from an external asp file

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
You can POST forms transparently between servers by using sockets. Basically, your PHP file will simply send the POSTed data to a page and will read it after that. Then you parse the ASP output and vuala! Start here: www.php.net/fsockopen Good Luck! Maxim Maletsky Founder, Chief Developer w

Re: [PHP] Array function to delete

2002-04-25 Thread Lars Torben Wilson
On Thu, 2002-04-25 at 12:32, Pushkar Pradhan wrote: > That's neat but I just read the docs. it says unset() won't work inside a > function, even if you pass by reference! No, that is not at all what it says. > Anyways as far as you don't use functions to do the delete it will work > fine. > > On

[PHP] array - change elements position

2002-04-25 Thread Evandro Sestrem
Hello, Has a automatic way to change the position from 2 elements of a array without use a aux variable? Like that: A = (1,3,2) --> A = (1, 2, 3) Thanks, Evandro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] getting a string from an external asp file

2002-04-25 Thread Purple Tiger
This has probably been answered somewhere else, but I'm bashing my head against a wall trying to find the answer. I'm trying to call an external ASP file from a different server (for e-commerce authorisation) and send POST data to it. The ASP will return only a string (ie prints it!!) and I need

Re: [PHP] Array function to delete

2002-04-25 Thread Lars Torben Wilson
On Thu, 2002-04-25 at 12:34, Nathan wrote: > No. :-) > > What I've had to do is add a dummy value, unset($array[4]) and then array_pop the >dummy value off > the array to get it out of there completely. The reason: unset will only remove >$array[4]'s value, > not the key. > > There are plenty

Re: [PHP] Array function to delete

2002-04-25 Thread Pushkar Pradhan
$layer is my array - $currPos = array_search($HTTP_POST_VARS["selLayer"], $layer); $arrB = array_slice($layer, $currPos); $val = array_shift($arrB); $arrA = array_slice($layer, 0, $currPos); $layer = array_merge($arrA, $arrB); // I do this to

Re: [PHP] Array function to delete

2002-04-25 Thread Nathan
No. :-) What I've had to do is add a dummy value, unset($array[4]) and then array_pop the dummy value off the array to get it out of there completely. The reason: unset will only remove $array[4]'s value, not the key. There are plenty of other ways I'm sure, but simply unsetting has really mes

Re: [PHP] Array function to delete

2002-04-25 Thread Lars Torben Wilson
On Thu, 2002-04-25 at 12:22, Liam Gibbs wrote: > I've been checking the PHP documentation, but can't > find a function that will delete a member of an array, > like such: > > $a = array(1, 2, 3, 4, 5); > > Use the function, say array_delete($a, 3); and that > will delete the third member in the

Re: [PHP] Array function to delete

2002-04-25 Thread Pushkar Pradhan
That's neat but I just read the docs. it says unset() won't work inside a function, even if you pass by reference! Anyways as far as you don't use functions to do the delete it will work fine. > > On Thursday, April 25, 2002, at 03:22 PM, Liam Gibbs wrote: > > > I've been checking the PHP documen

Re: [PHP] Array function to delete

2002-04-25 Thread Pushkar Pradhan
As far as I know there isn't such a function, what I do to achieve this: 1. find the position of the element you want to remove 2. slice the array into 2 arrays one contains all elements before this and one contains all elements below this, 3. use shift to remove appropriate element 4. merge both

Re: [PHP] Array function to delete

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 03:22 PM, Liam Gibbs wrote: > I've been checking the PHP documentation, but can't > find a function that will delete a member of an array, > like such: > > $a = array(1, 2, 3, 4, 5); > > Use the function, say array_delete($a, 3); and that > will delete the third

[PHP] Array function to delete

2002-04-25 Thread Liam Gibbs
I've been checking the PHP documentation, but can't find a function that will delete a member of an array, like such: $a = array(1, 2, 3, 4, 5); Use the function, say array_delete($a, 3); and that will delete the third member in the array (which would be 4 above), so that the array would contain

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan
Fair enough, I suppose at that point it is simply a matter of preference, though I must maintain my debug commentary... I really like knowing that the reason my $variable isn't displaying anything is because I speeled it $varaible. :-) Cheers, # Nathan - Original Message - From: "Max

RE: [PHP] Form validation

2002-04-25 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Take a look at www.hotscripts.com They probably have PHP form validiation and I know they have javascript form validation. Jason -Original Message- From: Tarjei Huse [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 1:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Form validation

[PHP] Re: Form validation

2002-04-25 Thread Manuel Lemos
Hello, Tarjei Huse wrote: > Hi, > > I need a function or class to validate a form with a cuple of text areas > that are alloed to contain a few html tags ( etc) but not all, > and I need a script to validate the input from the fields and stop the > html elements that are not allowed. > > Does a

Re: [PHP] Form validation

2002-04-25 Thread Philip Olson
Here are a couple resources to help your cause: http://uk.php.net/strip_tags And to get ideas on how to validate forms intelligently: http://www.zend.com/zend/spotlight/form-pro-php4.php Regards, Philip Olson On Thu, 25 Apr 2002, Tarjei Huse wrote: > Hi, > > I need a function or c

RE: [PHP] Won't save session ids?

2002-04-25 Thread Johnson, Kirk
The coding style needs to match the register_globals setting in php.ini. register_globals on: $accountsession = $session; $accountemail = $email; session_register("accountsession"); session_register("accountemail"); register_globals off: Do just like you have it below, except remove the calls

[PHP] Form validation

2002-04-25 Thread Tarjei Huse
Hi, I need a function or class to validate a form with a cuple of text areas that are alloed to contain a few html tags ( etc) but not all, and I need a script to validate the input from the fields and stop the html elements that are not allowed. Does anyone have a function or class handy that I

RE: [PHP] session_start() times and resets?

2002-04-25 Thread Johnson, Kirk
See session.gc_maxlifetime in php.ini. The session timer is based on the session file access (or modified?) timestamp. It gets reset every time the session data is accessed, which is every time a page using that session is requested. Kirk > -Original Message- > From: Smileyq [mailto:[EMA

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
> I would agree that performance-wise, there may be little difference in how fast a > script runs. And > for pre-defining variables, sure you can get away without doing that and php will > happily help you > out. However, I find it easier to debug my code knowing whether or not I > remembered to a

Re: [PHP] using html select as array

2002-04-25 Thread Kevin Stone
You can't know the input type through PHP. You could use Javascript to determine the input type and pass that along with the array. However it may be easier just to store the text field as a separate variable, and knowing this, parse it into your languages array after both inputs have been passe

Re: [PHP] Array wildcard?

2002-04-25 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Leif K-Brooks) wrote: > One more question. Is there any way to use this with part of a string? > Example: > function checkfruitlove($string){ > $fruitarray = array("apples","oranges"); > if($string == "I love ".in_array($fruitarray)."!"){ > $r

Re: [PHP] array_search

2002-04-25 Thread Kevin Stone
Which brings us back to my original argument that the function isn't being used properly. I was just wrong about how it was being used improperly. array_search() returns NULL when there is no match. $result = array_search($findme[$i], $fruit); if (!is_null($result)) { print "Key ($result) wa

Re: [PHP] Re: Newbie Book & Database Question

2002-04-25 Thread Manuel Lemos
Hello, Maxim Maletsky ) wrote: > Professional PHP Programming is a good one. Kind of outdated but gives > you an idea about the language. The new edition Professional PHP 4 Programming is even better and updated: http://www.phpclasses.org/products.html/id/1861006918.html Regards, Manuel Lemos

RE: [PHP] using html select as array

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
Dame thing, no? Your . You can see all those selected as an array. Now, add the text type and call it something different (ie; custom_lang). In the page, Sincerely, Maxim Maletsky Founder, Chief Developer www.PHPBeginner.com // where PHP Begins > -Original Message- > From: Ro

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan
I would agree that performance-wise, there may be little difference in how fast a script runs. And for pre-defining variables, sure you can get away without doing that and php will happily help you out. However, I find it easier to debug my code knowing whether or not I remembered to assign a v

RE: [PHP] PHP Security Leak

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
> -Original Message- > From: Liam Gibbs [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 8:20 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP Security Leak > > I'm wondering if anyone has any ideas on how to make a > login site more secure. Since I'm not really sure if > I've e

RE: [PHP] Re: Newbie Book & Database Question

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
> > Hello, > > Chris Montgomery wrote: > > Howdy, > > > > I have been developing with ColdFusion for nearly five years and want to > > learn PHP. For someone who has never done anything with PHP before, what > > *one* book would you recommend as a good primer to get started learning PHP? Profes

[PHP] using html select as array

2002-04-25 Thread Rodrigo Peres
Hi list, In my system I have multiples choices of language that user selects using drop down menus. So I've named this dropdows language[] and grab it as php array, and with looo i insert it into mysql as registers. But now i need to put a text field that the user can type any language that i

[PHP] PHP Security Leak

2002-04-25 Thread Liam Gibbs
I'm wondering if anyone has any ideas on how to make a login site more secure. Since I'm not really sure if I've explained myself well enough and don't really know how else to say it, I'll just give examples and then you guys can follow suit and mention some oversights: I have a regular logon: us

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
You know, I once said the same: better fix the notices and keep the code "clean". But as I've done several performance tests I came to a conclusion that there's no much difference debugging the code yourself or let PHP doing it. Often predefining manually a variable resulted to me being even more

[PHP] Re: Newbie Book & Database Question

2002-04-25 Thread Manuel Lemos
Hello, Chris Montgomery wrote: > Howdy, > > I have been developing with ColdFusion for nearly five years and want to > learn PHP. For someone who has never done anything with PHP before, what > *one* book would you recommend as a good primer to get started learning PHP? > > Also, do most PHPers

Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler
Good points. I guess i will just have to hope that the /etc/issue file is correct. Thanks Steve At 01:02 PM 4/25/2002, you wrote: >On Thu, 25 Apr 2002, Steve Buehler wrote: > > Does anybody know if there is a way for php to get the operating system > > type from a linux box? I know how to get

Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler
I am running php version 4.06 Steve At 01:05 PM 4/25/2002, Nathan wrote: >What version of PHP? > >- Original Message - >From: Steve Buehler >To: Nathan >Sent: Thursday, April 25, 2002 12:00 PM >Subject: Re: [PHP] operating system type >

[PHP] array_search

2002-04-25 Thread andy
thats why you do not have a key which is not found. Try to replace $findme withthis: $findme = array('banana', 'cranberry', 'not in there'); Will return: Key () was found for value not in there So there is a bug.. but well hidden :-( Von: "Kevin Stone" <[EMAIL PROTECTED]> An: "PHP-general" <[E

Re: [PHP] Array wildcard?

2002-04-25 Thread Leif K-Brooks
on 4/25/02 1:58 PM, Miguel Cruz at [EMAIL PROTECTED] wrote: On Thu, 25 Apr 2002, Leif K-Brooks wrote: > Is there some array wildcard I can use? In other words, I have an array. > Is there any wildcard function/character that will let me test to see if a > string matches anything in that array?

[PHP] DOM XML

2002-04-25 Thread Sebastian A.
Hello, I have been recently doing experiments with the DOM XML function and I am (not surprisingly) having some problems with it. When I try to run the code below, I get an error saying I am trying to use and endefined function. To me it seems that the DOM XML extension is working fine, because I

[PHP] session_cache_expire()

2002-04-25 Thread Pierre Arsenault
session_cache_expire() How does this function work? I keep getting and error saying the function is undefined... , I'm using version 4.1.2, which session support built in. According to the documentation this function exist, however looking at the source (session.c, php_session.h) It doesn't

[PHP] authorization headers

2002-04-25 Thread webmaster
does anybody know how to pass the correct username and password as a header to a directory with an .htaccess file. i tried header("Authorization: Basic username:password"); like that and also where the username:password was base 64 encoded and it isn't working. thanks. -- PHP General Mailin

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
Well this seems to work for me just fine. "; } else { print "Sorry, could not find $findme[$i]."; } } ?> This code outputs: Key (1) was found for value banana Key (2) was found for value cranberry Key (0) was found for value apple -Kevin - Original Message - From: "andy" <[EMAIL

Re: [PHP] operating system type

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Steve Buehler wrote: > Does anybody know if there is a way for php to get the operating system > type from a linux box? I know how to get the kernel version, but not the > operating version/type. > example. RedHat Linux 6.1 or 6.2 or 7.1, etc That's probably pretty tr

Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler
Thanks, but those just say "Linux". I was looking for what version. Like "RedHat 7.0". Thanks Steve At 12:51 PM 4/25/2002, you wrote: >Look at a phpinfo() page...seems like there should be something that says >this. > >Looked for you...$HTTP_ENV_VARS["OSTYPE"] or $_ENV["OSTYPE"] should work f

  1   2   >