Re: [PHP] user-defined superglobals

2004-07-03 Thread John W. Holmes
Michael Collins wrote: I am relatively new at PHP and wondering why there is no mechanism to create user-defined superglobals? For example in ASP.Net I can setup a global.asa to define database connections or any named value I want to be available anywhere in an application. It would be great to

Re: [PHP] user-defined superglobals

2004-07-03 Thread Michael Gale
Hello, I am not a programmer so I do not know if you can create a "superglobal variable". I am sure there is a problem with this ... any ways I user: "require("db_access.php");" at the top of all my pages that require db access for a application that way the db access gets set on a per

[PHP] user-defined superglobals

2004-07-03 Thread Michael Collins
I am relatively new at PHP and wondering why there is no mechanism to create user-defined superglobals? For example in ASP.Net I can setup a global.asa to define database connections or any named value I want to be available anywhere in an application. It would be great to have something like t

[PHP] Re: PHP doesnt work!

2004-07-03 Thread Jason Barnett
Gmo Baez wrote: Hello, I have a Freebsd server 5.2.1 with Apache 2.0.48 and PHP 4.3.4. After the installation everything looks normal, but after i created some PHP web files to test it, I found that PHP is not working. When i open de PHP document with the browser i only receive a blank page. But i

Re: [PHP] Mail Processing - Bounce

2004-07-03 Thread Jason Wong
On Wednesday 30 June 2004 01:17, Jason Williard wrote: > I'm building a tool to process incoming mail. So far, I have a script > that receives mail that is piped to it. I am able to process the mail > without a problem. However, the script causes a bounce message > containing the output of the s

Re: [PHP] Protecting database passwords

2004-07-03 Thread Jason Wong
On Friday 02 July 2004 04:43, Peter Brodersen wrote: > You could move the virtual host to its own file, only readable by root > (and include this virtual host-file in httpd.conf). > > Use SetEnv in this virtual host to set values like DBUSER, DBPASS and > so on: > http://httpd.apache.org/docs/mod/

Re: [PHP] Re: Obtain NT Logon

2004-07-03 Thread John W. Holmes
Manuel Lemos wrote: I have a web form with a field for username, this is a corporate site so will be the users NT logon. Would it be possible using PHP to obtain this information directly from the client pc? Assuming that you Web server is configured to require Windows NT domain authentication for

[PHP] Re: Obtain NT Logon

2004-07-03 Thread Manuel Lemos
Hello, On 07/03/2004 08:27 PM, Martin Wilmore wrote: I have a web form with a field for username, this is a corporate site so will be the users NT logon. Would it be possible using PHP to obtain this information directly from the client pc? Assuming that you Web server is configured to require Wind

[PHP] Obtain NT Logon

2004-07-03 Thread Martin Wilmore
Hi all, I have a web form with a field for username, this is a corporate site so will be the users NT logon. Would it be possible using PHP to obtain this information directly from the client pc? Thank you in advance. Martin ==

Re: [PHP] Sending Mail Using PHP & MySQL

2004-07-03 Thread Harlequin
thanks Jason. works a treat now...! -- - Michael Mason Arras People www.arraspeople.co.uk - "Jason Everett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You have a " before $NewUserMail; on the first line, so everything

Re: [PHP] Sending Mail Using PHP & MySQL

2004-07-03 Thread Jason Everett
You have a " before $NewUserMail; on the first line, so everything until the next " is part of that variable. Since there's not a ; after the second ", you are getting the error. -- jason everett -- [EMAIL PROTECTED] -- http://twocannons.com On Sat, 3 Jul 2004 23:03:51 +0100, Harlequin <[EMAIL P

[PHP] Sending Mail Using PHP & MySQL

2004-07-03 Thread Harlequin
Hi again. New Hour, New Problem. I'm using the following code to user user input from a form on a previous page to send mail confirming registration: $To = "$NewUserMail; $Subject = "Welcome To Arras People's Registered Members Area"; $Message = "$NewUserID, \n\nWelcome to the arras People

Re: [PHP] Problem with strcasecmp() function

2004-07-03 Thread Rosen
The code: echo strcasecmp("Òåñò ", "òåñò"); // This are "Test" and "test" in cyrillic echo ""; echo strcasecmp("Test", "test");// This no problem - it works Results: -32 0 "Scot L. Harris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 2004-07-03 at 17:08, Rose

Re: [PHP] Problem with strcasecmp() function

2004-07-03 Thread Scot L. Harris
On Sat, 2004-07-03 at 17:08, Rosen wrote: > Both versions are Version 4.3.7 of PHP. > Then more information is needed to figure out the problem. Sample code plus any error messages or results would help. -- Scot L. Harris [EMAIL PROTECTED] "Plaese porrf raed." -- Prof. Mich

Re: [PHP] Problem with strcasecmp() function

2004-07-03 Thread Rosen
Both versions are Version 4.3.7 of PHP. "Scot L. Harris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 2004-07-03 at 16:57, Rosen wrote: > > Hi, > > I have the following problem with "strcasecmp()" function. > > It should be compare strings case insensitive. When I use i

Re: [PHP] Problem with strcasecmp() function

2004-07-03 Thread Scot L. Harris
On Sat, 2004-07-03 at 16:57, Rosen wrote: > Hi, > I have the following problem with "strcasecmp()" function. > It should be compare strings case insensitive. When I use it on my local > computer, - it works correctly. > But when I upload file on some internet server - the function doesn't work . >

[PHP] Problem with strcasecmp() function

2004-07-03 Thread Rosen
Hi, I have the following problem with "strcasecmp()" function. It should be compare strings case insensitive. When I use it on my local computer, - it works correctly. But when I upload file on some internet server - the function doesn't work . I use the function with cyrillic charset. Can someon

[PHP] Re: MySQL Results Not Being Commited To Database

2004-07-03 Thread Harlequin
Sorry about the "Reply To Sender" I was kind of busy and made that mistake. I guessed from past experience of developing MS Access databases that I'd assigned the primary key to the UserID which is fine but the duplicate entries were a mystery. Thanks for your help Torsten, John. I've cracked it

Re: [PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread Torsten Roehr
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> $query = mysql_query($sql); > >> $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid > >>Query - " . mysql_error()); > > You're running the query twice. Take out that first line. Michael, that's where y

Re: [PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread John W. Holmes
$query = mysql_query($sql); $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid Query - " . mysql_error()); You're running the query twice. Take out that first line. And I second the recommendation to please reply to the list and not individuals unless they request it. -- --

[PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread Torsten Roehr
> Torsten > > I managed to work through it and this is the code: > > $NewUserID=$_POST['TXT_UserID']; > $NewUserPassword=$_POST['TXT_UserPassword']; > $NewUserComments=$_POST['TXT_Comments']; > $NewUserFurtherComments=$_POST['TXT_F

Re: [PHP] MySQL Results Not Being Commited To Database

2004-07-03 Thread John W. Holmes
Harlequin wrote: sql == "INSERT INTO RegisteredMembers (TXT_UserID,TXT_UserPassword,TXT_Comments,TXT_FurtherComments) VALUES('".$NewUserID."','".$NewUserPassword."','".$NewUserComments."','".$NewUserFurtherComments."')"; This should be $sql = " ... " and then you need to run the query w

[PHP] Re: MySQL Results Not Being Commited To Database

2004-07-03 Thread Torsten Roehr
"Harlequin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've managed with a lot of help to get the PHP pages to echo the results of > what a user put into a "User Registration" page. However, I'm still having > trouble getting the code right to actually commit the data on the > "R

Re: [PHP] connection parameters to db's

2004-07-03 Thread John W. Holmes
Dennis Gearon wrote: When I connect to a database on the same machine as the apache server us running under, that's server name "localhost", right? Yes. You can also use the IP address or computer name. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: T

[PHP] MySQL Results Not Being Commited To Database

2004-07-03 Thread Harlequin
I've managed with a lot of help to get the PHP pages to echo the results of what a user put into a "User Registration" page. However, I'm still having trouble getting the code right to actually commit the data on the "Registered" page that the "Register" page points to. Can anyone help...? Code a

Re: [PHP] frames compatibility

2004-07-03 Thread raditha dissanayake
Jason Barnett wrote: Hey all, I'm working on a project and considering splitting up the pages into frames. I'm mostly wondering are the frames implementations across browsers relatively similar? might want to try this in an html list. -- Raditha Dissanayake. ---

[PHP] connection parameters to db's

2004-07-03 Thread Dennis Gearon
Please CC me. When I connect to a database on the same machine as the apache server us running under, that's server name "localhost", right? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Handling MySQL errors

2004-07-03 Thread John W. Holmes
Shaun wrote: Is there a way to handle MySQL errors gracefully such as a duplicate entry into a UNIQUE field, the method I've been using seems a little laborious... //see if user exists $query = "SELECT * FROM users WHERE Username = '".$_POST[username]."'"; $result = @mysql_query

[PHP] PHP doesnt work!

2004-07-03 Thread Gmo Baez
Hello, I have a Freebsd server 5.2.1 with Apache 2.0.48 and PHP 4.3.4. After the installation everything looks normal, but after i created some PHP web files to test it, I found that PHP is not working. When i open de PHP document with the browser i only receive a blank page. But if i check the s

[PHP] Handling MySQL errors

2004-07-03 Thread Shaun
Hi, Is there a way to handle MySQL errors gracefully such as a duplicate entry into a UNIQUE field, the method I've been using seems a little laborious... //see if user exists $query = "SELECT * FROM users WHERE Username = '".$_POST[username]."'"; $result = @mysql_query($query

Re: [PHP] PHP Bug ?

2004-07-03 Thread John W. Holmes
Siddharth Hegde wrote: While we are on this topic, I have noticed that for only some keys, the following does not work $arr[KEY_NAME] but when I change this to $arr['KEY_NAME'] it works. That's because KEY_NAME is a constant and 'KEY_NAME' is a string. So unless you really have a constant called K

Re: [PHP] PHP Bug ?

2004-07-03 Thread Curt Zirzow
* Thus wrote Dennis Freise: > On Fri, 2 Jul 2004 11:08:38 +0200 > "Pierre" <[EMAIL PROTECTED]> wrote: > > BTW: $array[$second_array['key']] works fine for me... php 5.0.0rc3 This behaviour has worked since around version 3 Curt -- First, let me assure you that this is not one of those shady pyr

Re: [PHP] PHP Bug ?

2004-07-03 Thread Curt Zirzow
* Thus wrote Siddharth Hegde: > While we are on this topic, I have noticed that for only some keys, > the following does not work > $arr[KEY_NAME] but when I change this to $arr['KEY_NAME'] it works. Because that is the *right* way to access the keyname. > I seriosuly doubt that KEY_NAME is a res

Re: [PHP] help ???

2004-07-03 Thread Wudi
If you have a bad habit of writing program codes, it may don't work on the strict config. You'd better change the bad habit. But if you don't want to do that, you can modify php.ini to fit you. On Fri, 2 Jul 2004 23:46:38 +0700 "Dannis Yang" <[EMAIL PROTECTED]> wrote: > Dear: > I wonder why my w

Re: [PHP] PHP Bug ?

2004-07-03 Thread Wudi
It works on Apache/2.0.49 (Win32) PHP/4.3.7. It wrote the following to test it: 5 ); $country_list = array( 5 => 'Australia' ); $temp = $country_list[$country_symbol['AU']]; echo '$country_list[$country_symbol[\'AU\']] = $country_list['.$country_symbol['AU'].'] = ' . $temp . ''; $country_symbol

Re: [PHP] php.ini mail settings

2004-07-03 Thread Wudi
It's impossible. If you olny want to set the mail sender, you can write mail head "From: [EMAIL PROTECTED]" to get the same result. But using SMTP Class is better. On Fri, 02 Jul 2004 23:44:48 +0100 Olly <[EMAIL PROTECTED]> wrote: > [mail function] > ; For Win32 only. > SMTP = smtp.mail.yahoo.co.

Re: [PHP] Password encyption

2004-07-03 Thread Siddharth Hegde
You could use Turck to convert the file to byte code. Not exactly state of the art security as Turck does not have any encryption itself, but definately a better option than plain text. - Sid On Fri, 2 Jul 2004 22:32:24 -0400 (EDT), Michal Migurski <[EMAIL PROTECTED]> wrote: > > I realize the ke

Re: [PHP] PHP Bug ?

2004-07-03 Thread Siddharth Hegde
While we are on this topic, I have noticed that for only some keys, the following does not work $arr[KEY_NAME] but when I change this to $arr['KEY_NAME'] it works. I seriosuly doubt that KEY_NAME is a restricted keyword as dreamweawer highlights these in different colors and this happens very rarel

[PHP] frames compatibility

2004-07-03 Thread Jason Barnett
Hey all, I'm working on a project and considering splitting up the pages into frames. I'm mostly wondering are the frames implementations across browsers relatively similar? I'm thinking that I'd use 3 frames split like this: 1. Filelist of documents to edit 2. A document editor 3. A help in

Re: [PHP] PHP Bug ?

2004-07-03 Thread Dennis Freise
On Sat, 3 Jul 2004 11:56:52 +0200 Dennis Freise <[EMAIL PROTECTED]> wrote: Errr... these need to be assoc as well: > $country_symbol = array( 'AU' => 'some_value' ); > $country_list = array( 'some_value', 'some_other_value' ); $country_list = array( 'some_value' => 'some_other_value' ); > For y

Re: [PHP] PHP Bug ?

2004-07-03 Thread Dennis Freise
On Fri, 2 Jul 2004 11:08:38 +0200 "Pierre" <[EMAIL PROTECTED]> wrote: > Just try this : $temp = $country_list[$country_symbol]['AU'] ; > Seems better :) Yes, but wrong. The original: > $temp = $country_list[$country_symbol['AU']] ; 2 levels of arrays. 2 _different_ arrays. $country_symbol = arr

[PHP] Re: web page output "as we go"

2004-07-03 Thread Jason Barnett
Is there any way I can tell the web browser to start trickling the data onto the page? TIA & HAND :-D As Torsten so kindly pointed out to me before, your friend is the flush() function: http://www.php.net/flush Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

[PHP] web page output "as we go"

2004-07-03 Thread David T-G
Hi, all -- It's been a while. I've been busy and have missed the list. It's good to have a [legitimate] excuse to read again :-) I have a script which churns away and spits out the name of each file as it processes. The docs say that any print or echo statements get written immediately and thu

Re: [PHP] session id changing all the time on some pc's

2004-07-03 Thread Torsten Roehr
"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Zilvinas Saltys" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Fri, 2 Jul 2004 22:45:23 + > > Curt Zirzow <[EMAIL PROTECTED]> wrote: > > > > > * Thus wrote Torsten Roehr: > > > > "Zilvinas Salt

Re: [PHP] session id changing all the time on some pc's

2004-07-03 Thread Torsten Roehr
"Matthew Sims" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > No, this is exactly what I wanted to know. But it would contradict > > everything I experienced with sessions until now - and it does. I just > > tested your code (with session_start() also at the top of page2). It does

Re: [PHP] session id changing all the time on some pc's

2004-07-03 Thread Torsten Roehr
"Zilvinas Saltys" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 2 Jul 2004 22:45:23 + > Curt Zirzow <[EMAIL PROTECTED]> wrote: > > > * Thus wrote Torsten Roehr: > > > "Zilvinas Saltys" <[EMAIL PROTECTED]> wrote in message > > > news:[EMAIL PROTECTED] > > > > > > > > The

[PHP] Re: Strange Session Problem

2004-07-03 Thread Jason Barnett
I don't think your problem is with the sessions at all... rather, I think you need to change the include command: [snip] include("$CFG->usersdir"); // ***This line causes session problems*** exit; } [/snip] try changing this to: [snip] include($CFG->usersdir); exit; } [/snip] Ever tried p

[PHP] Re: Help needed

2004-07-03 Thread Jason Barnett
Completely new? Well, there are a lot of articles on the web that will get you started... just try googling for "MySQL PHP tutorial". If you're willing to put in the time you can do it yourself... but there are a lot of PHPers out there that can do it for you right now. -- PHP General Mailing