[PHP] HOSTNAME Environment variable

2006-02-20 Thread Ruben Rubio Rey
Hi, How to set "Hostname" environment variable? (It contains the servers name, not the servers domain) Its a Linux server. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] question about foreach and associate array

2006-02-20 Thread Peter Lauri
Just do: $arg['textarea']['body']="Hello"; foreach($arg['textarea'] as $row) { echo $row.""; echo $arg['textarea']['body'].""; } The $row is an string, and what you are trying to do the $row['body']. And php will translate 'body' to 0 in this, I do not know why :) Try echo $row['bod

Re: [PHP] Re: Working with a config file

2006-02-20 Thread Paul Scott
On Tue, 2006-02-21 at 00:14 +0100, Jens Kleikamp wrote: > Benjamin Adams wrote: > > I'm trying to parse a config file, example of the config is: > > [fred] > > id=8782 > > section=s1 > > years=4 > > download1=mirror1 > > > > [frank] > > id=8372 > > section=s3 > > years=4 > > download1=mirror12 > >

[PHP] Re: Request for views on ASP/PHP/ASP.NET - please!

2006-02-20 Thread Rafael
Well, I would like to know what conclusion you got, so if possible let me know when you have enough data/finished you work. Simon O'Beirne wrote: Hi guys, A bit of an odd request. I'm in my third and final year at university, and part of an assignment requires obtaining developers' perspecti

Re: [PHP] question about foreach and associate array

2006-02-20 Thread Chris
jonathan wrote: I have the following construct: $arg['textarea']['body']="Hello"; foreach($arg['textarea'] as $row) { echo $row['body'].""; echo $arg['textarea']['body'].""; } I would expect both of them to output "Hello" but only the second does

Re: Fw: [PHP] regular pattern to match XXX

2006-02-20 Thread Chris
Satyam wrote: - Original Message - From: "Patrick" <[EMAIL PROTECTED]> im trying to get my regular pattern to allow åäöÅÄÖ but it refuses to, i have something like this: [^a-zA-ZåäöÅÄÖ0-9-_ ] But this dosent seem to work, anyone got any ideas? Just an idea, try putting a backslash

Re: [PHP] Distribution of records

2006-02-20 Thread Chris
Hi Alan, Formation OCall DCall OYards Key The key is an amalgam of the first 3 fields so a typical record might look like this:- Formation - I OCall - RT DCall - BZ OYards - 5 Key - IRTBZ What I want to do is to produce report that looks like this:- Form OCall DCall OYards - Median OYards

Re: [PHP] Different Values for intval(float)

2006-02-20 Thread Chris
Interestingly enough, I tried it on several of my machines, which are different platforms and different (sub)versions of PHP and I got different results: RH7.3 with PHP 4.1.2: 2113879380 IRIX 6.5.11 with PHP 4.2.3: 2147483647 FC1 with PHP 4.3.6: 2113879380 R

Re: [PHP] newbie problem

2006-02-20 Thread julian haffegee
Hi all, I have a page that lets people upload images - they are then resized for use throughout my site. It all works fine, but I need to reduce the jpg size (without reducing image size) Is there a php function that lets you compress the jpg? Thanks Jules -- PHP General Mailing List (

Re: [PHP] Proper OOP Syntax

2006-02-20 Thread Albert Padley
Thank you Chris. Albert On Feb 20, 2006, at 5:00 PM, Chris wrote: Albert Padley wrote: Given the following code: $password = (strlen($this->user_pw) < 32) ? md5($this->user_pw) : $this->user_pw; $sql = sprintf("SELECT COUNT(*) AS test, TeamID FROM % s WHERE BINARY login = '%

Re: [PHP] Proper OOP Syntax

2006-02-20 Thread Chris
Albert Padley wrote: Given the following code: $password = (strlen($this->user_pw) < 32) ? md5($this->user_pw) : $this->user_pw; $sql = sprintf("SELECT COUNT(*) AS test, TeamID FROM %s WHERE BINARY login = '%s' AND pw = '%s' AND active = 'y'", $this- >table_name, $this->user, $

[PHP] Proper OOP Syntax

2006-02-20 Thread Albert Padley
Given the following code: $password = (strlen($this->user_pw) < 32) ? md5($this->user_pw) : $this->user_pw; $sql = sprintf("SELECT COUNT(*) AS test, TeamID FROM %s WHERE BINARY login = '%s' AND pw = '%s' AND active = 'y'", $this- >table_name, $this->user, $password); }

[PHP] Re: Working with a config file

2006-02-20 Thread Jens Kleikamp
Benjamin Adams wrote: I'm trying to parse a config file, example of the config is: [fred] id=8782 section=s1 years=4 download1=mirror1 [frank] id=8372 section=s3 years=4 download1=mirror12 download2=mirror2 . . . I want to parse this so I can only call frank or freds data and move id, section,

Re: [PHP] Working with a config file

2006-02-20 Thread Michael Hulse
On Feb 20, 2006, at 2:21 PM, Benjamin Adams wrote: I want to parse this so I can only call frank or freds data and move id, section, years, etc to varaibles. Can someone give me some help Here is a function I wrote, I bet it will help you (sorry, not the most readable because I pulled from bi

Re: [PHP] newbie problem

2006-02-20 Thread Ray Hauge
On Monday 20 February 2006 15:32, Robert Voogdgeert wrote: > > Robert Voogdgeert wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > Dear php-users, > > > > > > > > > When working with an HTML file with a form with > > > > > > > > > > > > the somename.php file is serve

Re: [PHP] newbie problem

2006-02-20 Thread Robert Voogdgeert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Robert Voogdgeert wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Dear php-users, > > > > > > When working with an HTML file with a form with > > > > > > > > the somename.php file is served (completely) to my browse

Re: [PHP] php+ ajax

2006-02-20 Thread David Dorward
Kim Christensen wrote: > On 2/20/06, blackwater dev <[EMAIL PROTECTED]> wrote: >> The problem is js seems to get confused trying to look this up by id >> and I don't think I can use an array like this with a GET, how can I >> use arrays for all this?? > > You have to escape the brackets with back

[PHP] Working with a config file

2006-02-20 Thread Benjamin Adams
I'm trying to parse a config file, example of the config is: [fred] id=8782 section=s1 years=4 download1=mirror1 [frank] id=8372 section=s3 years=4 download1=mirror12 download2=mirror2 . . . I want to parse this so I can only call frank or freds data and move id, section, years, etc to varaibl

[PHP] Request for views on ASP/PHP/ASP.NET - please!

2006-02-20 Thread Simon O'Beirne
Hi guys, A bit of an odd request. I'm in my third and final year at university, and part of an assignment requires obtaining developers' perspective on web languages. If anyone has done at least one of the languages in the subject title (ASP/ASP.NET/PHP), I would be eternally grateful if you cou

Re: [PHP] php+ ajax

2006-02-20 Thread Kim Christensen
On 2/20/06, blackwater dev <[EMAIL PROTECTED]> wrote: > The problem is js seems to get confused trying to look this up by id > and I don't think I can use an array like this with a GET, how can I > use arrays for all this?? You have to escape the brackets with backslashes, so that the JS really in

[PHP] php+ ajax

2006-02-20 Thread blackwater dev
Hello, I am trying to do a pre-search to let the users know how many rows will be returned before they actually hit submit. I think this is more of a js question but : I have this js function: function preSearch() { //Put the form data into a variable var min_price= document.get

Re: [PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread John Nichel
Jay Blanchard wrote: [snip] In the spirit of re-inventing the wheel... I rolled my own JinnDoc. [/snip] My single largest arguement against these kinds of tools were the additional mark-up required. Code commentary, done properly, can yield the same results without additional mark-up. I'd rathe

RE: [PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread Jay Blanchard
[snip] I see your point and considered it before I rolled my own, but rolling my own using the existing TemplateJinn system allowed me the flexibility of custom tags and all the goodies that already come with the TemplateJinn system making it that much easier to incorporate JinnDocs into any existi

RE: [PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread Robert Cummings
On Mon, 2006-02-20 at 15:38, Jay Blanchard wrote: > [snip] > In the spirit of re-inventing the wheel... I rolled my own JinnDoc. > [/snip] > > My single largest arguement against these kinds of tools were the additional > mark-up required. Code commentary, done properly, can yield the same > resu

[PHP] Re: [SOLVED] [PHP] Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread Michael Hulse
This did the trick: On Feb 20, 2006, at 12:37 PM, John Nichel wrote: The server you're running the script on may have session.auto_start enabled Ah, got it. :) Thanks all! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread Jay Blanchard
[snip] In the spirit of re-inventing the wheel... I rolled my own JinnDoc. [/snip] My single largest arguement against these kinds of tools were the additional mark-up required. Code commentary, done properly, can yield the same results without additional mark-up. I'd rather be able to insert a c

Re: [PHP] Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread John Nichel
Michael Hulse wrote: On Feb 20, 2006, at 12:10 PM, John Nichel wrote: It's all in the manual Hi, thanks for pointing that out. I guess I should have RTFM first, then ask q's second... noob mistake, wont happen again. :D I guess I just do not understand why a session is even being created,

Re: [PHP] Re: Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread Michael Hulse
On Feb 20, 2006, at 12:11 PM, David Dorward wrote: http://www.w3.org/QA/2005/04/php-session details how to fix the problem (without breaking the session tracking for users without cookies supported and enabled). Ah, great link. Thanks! :) I don't know why sessions are being stored in the

Re: [PHP] Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread Michael Hulse
On Feb 20, 2006, at 12:10 PM, John Nichel wrote: It's all in the manual Hi, thanks for pointing that out. I guess I should have RTFM first, then ask q's second... noob mistake, wont happen again. :D I guess I just do not understand why a session is even being created, I never started one.

[PHP] Re: Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread David Dorward
Michael Hulse wrote: > I just finished a website for client - I just uploaded the site to > their server space - when I went to go validate my pages using the W3C > XHTML validator I get several errors due to an un-encoded ampersand in > the link URL... For some reason, a session ID is getting add

Re: [PHP] Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread John Nichel
Michael Hulse wrote: Hi, I just finished a website for client - I just uploaded the site to their server space - when I went to go validate my pages using the W3C XHTML validator I get several errors due to an un-encoded ampersand in the link URL... For some reason, a session ID is getting ad

[PHP] Page validation: Un-wanted PHP session ID added to links????

2006-02-20 Thread Michael Hulse
Hi, I just finished a website for client - I just uploaded the site to their server space - when I went to go validate my pages using the W3C XHTML validator I get several errors due to an un-encoded ampersand in the link URL... For some reason, a session ID is getting added to the end of all

Re: [PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread Robert Cummings
On Mon, 2006-02-20 at 13:51, [EMAIL PROTECTED] wrote: > Ok, so we're starting to get a little more serious about this product we're > working on and may in the near future try to standardize and flesh out our > coding and product documentation (always a nice thing). I'm semi-familiar > with PH

Re: [PHP] newbie problem

2006-02-20 Thread John Nichel
Robert Voogdgeert wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear php-users, When working with an HTML file with a form with the somename.php file is served (completely) to my browser as plain text after the 'submit' button is clicked on my machine (MacOS X). On the exter

RE: [PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread Jay Blanchard
[snip] Ok, so we're starting to get a little more serious about this product we're working on and may in the near future try to standardize and flesh out our coding and product documentation (always a nice thing). I'm semi-familiar with PHPDoc (http://www.phpdoc.org) but my boss just pointed me t

RE: [PHP] newbie problem

2006-02-20 Thread Jay Blanchard
[snip] When working with an HTML file with a form with the somename.php file is served (completely) to my browser as plain text after the 'submit' button is clicked on my machine (MacOS X). On the external webhost though everything is processed correctly... Is this related to some setti

[PHP] newbie problem

2006-02-20 Thread Robert Voogdgeert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear php-users, When working with an HTML file with a form with the somename.php file is served (completely) to my browser as plain text after the 'submit' button is clicked on my machine (MacOS X). On the external webhost though everythin

[PHP] PHP documentation solutions? (PHPDoc, Doxygen, ???)

2006-02-20 Thread tg-php
Ok, so we're starting to get a little more serious about this product we're working on and may in the near future try to standardize and flesh out our coding and product documentation (always a nice thing). I'm semi-familiar with PHPDoc (http://www.phpdoc.org) but my boss just pointed me towar

[PHP] Invalid Credentials

2006-02-20 Thread Delamatrix
Hi, I have a simple php script that binds to an openldap server but I keep getting this error message; Warning: ldap_bind(): Unable to bind to server: Invalid credentials in /srv/www/site.com/check-user2.php on line 15 LDAP bind failed... The password is correct so I'm not quite sure why ge

[PHP] ajax was HN CAPTCHA...

2006-02-20 Thread tedd
Hi gang: The http://xn--ovg.com/no_bot was my first dive into ajax. What I found interesting was that the presentation on the screen wasn't also found in the code. That I'm sure is known to others, but it was a surprise to me. Immediately, I thought of CAPTCHA and other situations where you w

Re: [PHP] need a php multiple/mysql choice quiz

2006-02-20 Thread Leif Gregory
Hello Ross, Monday, February 20, 2006, 8:49:55 AM, you wrote: > I am looking for a php/mysql multiple choice quiz. One that saves > the answers to a database. A basic example I can expand on is all > that is required. http://www.hotscripts.com/PHP/Scripts_and_Programs/Tests_and_Quizzes/index.html

Re: [PHP] Re: need a php multiple/mysql choice quiz

2006-02-20 Thread Austin Denyer
On Mon, 20 Feb 2006 16:24:32 - "Dan Parry" <[EMAIL PROTECTED]> wrote: > > >> what kind of mushrooms? > >> > >rainbow colored ones =) > > Think they're illegal in the UK... I think just about EVERYTHING is illegal in the UK. Well, except for vacation time - that's just illegal in the US. #

Re: [PHP] Re: need a php multiple/mysql choice quiz

2006-02-20 Thread Kim Christensen
On 2/20/06, Dan Parry <[EMAIL PROTECTED]> wrote: > >> what kind of mushrooms? > >> > >rainbow colored ones =) > > Think they're illegal in the UK... Then move out of there quicker than fast, they're too tasty to miss! -- Kim Christensen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.p

RE: [PHP] Re: need a php multiple/mysql choice quiz

2006-02-20 Thread Dan Parry
>> what kind of mushrooms? >> >rainbow colored ones =) Think they're illegal in the UK... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: need a php multiple/mysql choice quiz

2006-02-20 Thread Barry
Jochem Maas wrote: Barry wrote: Ross wrote: I am looking for a php/mysql multiple choice quiz. One that saves the answers to a database. A basic example I can expand on is all that is required. Ross O_o - You want us to give you code examples? - You want us to give you hints? - link

Re: [PHP] Re: need a php multiple/mysql choice quiz

2006-02-20 Thread Jochem Maas
Barry wrote: Ross wrote: I am looking for a php/mysql multiple choice quiz. One that saves the answers to a database. A basic example I can expand on is all that is required. Ross O_o - You want us to give you code examples? - You want us to give you hints? - link to scripts? - mushroom

[PHP] Re: need a php multiple/mysql choice quiz

2006-02-20 Thread Barry
Ross wrote: I am looking for a php/mysql multiple choice quiz. One that saves the answers to a database. A basic example I can expand on is all that is required. Ross O_o - You want us to give you code examples? - You want us to give you hints? - link to scripts? - mushrooms? What do you

[PHP] PHP5.1.2/Apache2/WindowsXP

2006-02-20 Thread Robert Hicks
I am trying to use the DB PEAR extension. Every time it tries to connect, I get a "memory cannot be read error". I have just setup all this to try out PHP5 so help to a newbie would be appreciated. Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] need a php multiple/mysql choice quiz

2006-02-20 Thread Ross
I am looking for a php/mysql multiple choice quiz. One that saves the answers to a database. A basic example I can expand on is all that is required. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Looping from A to Z

2006-02-20 Thread Jason Motes
Richard K Miller wrote: Good afternoon. I'm having trouble getting PHP to loop from A through Z. Here is what I tried, coming from a C background: for ($l = "A"; $l <= "Z"; $l++) echo $l; I use this: for($i='a'; $i != 'aa'; $i++){ print $i; | -- PHP General Mailing List (http://w

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-20 Thread Andrew Brampton
A bot could find it if it parses (and executes) javascript. Andrew - Original Message - From: "Gerry Danen" <[EMAIL PROTECTED]> To: "comex" <[EMAIL PROTECTED]> Cc: Sent: Monday, February 20, 2006 3:58 AM Subject: Re: [PHP] HN CAPTCHA at http://www.phpclasses.org How would a bot find

[PHP] Re: menu Q

2006-02-20 Thread William Stokes
YOU are the MAN! Thanks!!! -W "Rafael" <[EMAIL PROTECTED]> kirjoitti viestissä:[EMAIL PROTECTED] I use Fx 1.5.0.1 and Opera 9-prev2 and everything seems to be Ok. The select it's inside a form, and my guess is that you haven't set any padding/margin for that form, so try adding something like

Re: [PHP] PHP generated JavaScript

2006-02-20 Thread Curt Zirzow
On Mon, Feb 20, 2006 at 06:29:12PM +1030, Tim Burgan wrote: > Is is possible to make an external Javascript with PHP. > > Am I doing this correcT? > > > header("Content-Type: text/javascript"); > > $text = "Hello World"; > > echo "alert('".$text."');"; > > ?> This looks perfectly fine. The