[PHP] Question about dates

2004-12-24 Thread Brent Clements
How does one over come the issue of unix time not going beyond a certain date? ie, when I do echo strtotime(2099-10-08); it outputs -1 This has to do with the limitations of unix time, so how does one get around it? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Question about dates

2004-12-24 Thread Greg Donald
On Fri, 24 Dec 2004 08:46:28 -0600, Brent Clements [EMAIL PROTECTED] wrote: How does one over come the issue of unix time not going beyond a certain date? Overcome the issue in what way? A 32bit integer is what it is. ie, when I do echo strtotime(2099-10-08); it outputs -1 So don't use

[PHP] Question

2004-12-17 Thread Tom Luigjes
Hi, I'm trying to make a little script to edit arrays. For example, i have an array file named config.php, and it holds this: ?php $config = array( 'email' = 'E-mail', 'meta_author' = 'Author', ? I wish to edit this file, through another file, named edit.php, or admin.php, i

Re: [PHP] Question

2004-12-17 Thread Ligaya Turmelle
I assume by edit you mean change the value to something completely new. If you are having the user input the new value you 1) must make sure it is valid input and 2)move it into the array value (maybe set the array as a session variable so it crosses over to the next page instead of being re

RE: [PHP] Question in posting form-data

2004-12-17 Thread Richard Lynch
Yao, Minghua wrote: Yes. I did modify the original since I need to send data to a program which takes only form-data. content-disposition: came from RFC 2388. I don't think the program can take application/x-www-form-urlencoded content. Further help needed. Try it the old way -- I suspect

RE: [PHP] Question in posting form-data

2004-12-17 Thread Yao, Minghua
] Sent: Fri 12/17/2004 11:27 AM To: Yao, Minghua Cc: Erwin Kerk; [EMAIL PROTECTED] Subject: RE: [PHP] Question in posting form-data Yao, Minghua wrote: Yes. I did modify the original since I need to send data to a program which takes only form-data. content-disposition: came from RFC 2388. I

Re: [PHP] Question in posting form-data

2004-12-16 Thread Erwin Kerk
Yao, Minghua wrote: Hi, all, I am testing how to post form-data to a host using the following code (test.php): ?php function PostToHost($host, $path, $name, $value) { // Test of posting form-data $fp = fsockopen($host,80); fputs($fp, POST

RE: [PHP] Question in posting form-data

2004-12-16 Thread Richard Lynch
. -Minghua -Original Message- From: Erwin Kerk [mailto:[EMAIL PROTECTED] Sent: Thu 12/16/2004 6:30 AM To: Yao, Minghua Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Question in posting form-data Yao, Minghua wrote: Hi, all, I am testing how to post form-data to a host using the following

[PHP] Question

2004-12-16 Thread Dennis Yang
Hi, I'm using PHP 4.3.2 and using ODBC to connect to my Access database. I want to get the value from this query statement: select count(id) as quantity from danhmucdia. How can I get this value? How can I equalize this value into variable ? Thank you for reading my email. Dennis

Re: [PHP] Question

2004-12-16 Thread Richard Lynch
Dennis Yang wrote: I'm using PHP 4.3.2 and using ODBC to connect to my Access database. I want to get the value from this query statement: select count(id) as quantity from danhmucdia. How can I get this value? How can I equalize this value into variable ? It's a query, just like any other

RE: [PHP] Question in posting form-data

2004-12-16 Thread Yao, Minghua
: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thu 12/16/2004 11:46 AM To: Yao, Minghua Cc: Erwin Kerk; [EMAIL PROTECTED] Subject: RE: [PHP] Question in posting form-data You also need to URLEncode the $value, either before you pass it in, or inside the function itself. Where did you get this PostToHost

RE: [PHP] Question in posting form-data

2004-12-16 Thread Yao, Minghua
Thanks. I changed fputs($fp, $value\n); to fputs($fp, $name=$value\n); But I still got the same message. -Minghua -Original Message- From: Erwin Kerk [mailto:[EMAIL PROTECTED] Sent: Thu 12/16/2004 6:30 AM To: Yao, Minghua Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Question in posting

RE: [PHP] PHP Question

2004-12-15 Thread Jay Blanchard
[snip] I am new to this languaue and need some info. I am not a programmer but I need some info for a project I am working on. I have data in MS Access and I want to create graphs and charts using this data to display on a website. I read on your website PHP is able to do this. What do I need to

[PHP] Question in posting form-data

2004-12-15 Thread Yao, Minghua
Hi, all, I am testing how to post form-data to a host using the following code (test.php): ?php function PostToHost($host, $path, $name, $value) { // Test of posting form-data $fp = fsockopen($host,80); fputs($fp, POST $path HTTP/1.1\n);

Re: [PHP] PHP Question

2004-12-15 Thread Jason Wong
On Wednesday 15 December 2004 21:29, Jay Blanchard wrote: Do you reccommed MS Access or SQL for the database? It really doesn't matter unless you need a superior product. MS Access wasn't designed for concurrent access so if you are only serving *very* light loads it may suffice. If your

[PHP] PHP Question

2004-12-14 Thread CFDelBene
I am new to this languaue and need some info. I am not a programmer but I need some info for a project I am working on. I have data in MS Access and I want to create graphs and charts using this data to display on a website. I read on your website PHP is able to do this. What do I need to know

Re: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Jason Wong
On Monday 13 December 2004 18:29, Stuart Felenstein wrote: I think you are missing the point Jason was trying to make, which is the difference between '$Ind' and $Ind. If you look again, you will see that those are handled differently. If you read the post Jason suggested I print out

Re: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Jason Wong
On Monday 13 December 2004 19:00, Stuart Felenstein wrote: heaven's sake ? bit over dramatic. The code above is my created html. I've created a number of them, both from a table and just listing out some options. To repeat they all work . Yet all seem to have little in common when the values

RE: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 12 December 2004 14:27, Stuart Felenstein wrote: --- Jason Wong [EMAIL PROTECTED] wrote: If in doubt, print it out (TM) echo '$Indbr', $Indbr, $Ind; $Ind

RE: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: If in doubt, print it out (TM) echo '$Indbr', $Indbr, $Ind; $Ind '1','2','3','4' '1','2','3','4' Funny, they are both the same. Both? There are three things printed out there, so both cannot be right. 2 of the 3 can be the

Re: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Stuart Felenstein
--- David Robley [EMAIL PROTECTED] wrote: On Mon, 13 Dec 2004 00:56, Stuart Felenstein wrote: --- Jason Wong [EMAIL PROTECTED] wrote: If in doubt, print it out (TM) echo '$Indbr', $Indbr, $Ind; $Ind '1','2','3','4' '1','2','3','4' Funny, they are both the

Re: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: Here is just another variation of my multiple select list. option value=?php echo $rsinds-Fields('CareerIDs')??php if ($rsinds-Fields('CareerIDs')== 5) {echo SELECTED;} ??php echo $rsinds-Fields('CareerCategories')?/option Here I was

Re: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Jason Wong
On Monday 13 December 2004 22:59, Ford, Mike wrote: The issue was the difference between double and single quotes. Yes -- but you said they are both the same, when there were *three* things being displayed, and (a) you can't have both of three (b) only two of the three were the same, and

RE: [PHP] Question: Repopulating form parameters

2004-12-13 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 13 December 2004 14:00, Stuart Felenstein wrote: --- Ford, Mike [EMAIL PROTECTED] wrote: If in doubt, print it out (TM) echo '$Indbr', $Indbr, $Ind;

Re: [PHP] Question: Repopulating form parameters

2004-12-13 Thread David Robley
On Tue, 14 Dec 2004 02:33, Jason Wong wrote: On Monday 13 December 2004 22:59, Ford, Mike wrote: The issue was the difference between double and single quotes. Yes -- but you said they are both the same, when there were *three* things being displayed, and (a) you can't have both of three

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread Jason Wong
On Sunday 12 December 2004 18:15, Stuart Felenstein wrote: Still stuck on this one. I know I'm doing something wrong and wouldn't mind some correction: Did you mockup some test HTML in a wysisyg editor as suggested? Code now: if (count($Ind) 0 AND is_array($Ind)) { $Ind =

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: Close but no cigar. Since $Ind is already imploded my thinking is it need not be incremented in the echo statement ? You tell me, print_r() and var_dump() it before you use it and decide whether it is correct. One final thing: '$Ind' is

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: I'm pretty sure I need to loop through the $_Get of the array. Not sure , and haven't found anything that shows this. Yes, you need to reference $_GET to see whether an option was selected and change the echo above accordingly. Still

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: On Sunday 12 December 2004 18:15, Stuart Felenstein wrote: Still stuck on this one. I know I'm doing something wrong and wouldn't mind some correction: Did you mockup some test HTML in a wysisyg editor as suggested? Yep like this : select

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread Jason Wong
On Sunday 12 December 2004 20:18, Stuart Felenstein wrote: If I choose 1, 2 , 3 then print_r($Ind); returns '1','2','3' This looks okay. You *should* know what it should look like so I'll take your word for it. I could not find a difference with '$Ind', or $Ind, except I would think

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread David Robley
On Mon, 13 Dec 2004 00:56, Stuart Felenstein wrote: --- Jason Wong [EMAIL PROTECTED] wrote: If in doubt, print it out (TM) echo '$Indbr', $Indbr, $Ind; $Ind '1','2','3','4' '1','2','3','4' Funny, they are both the same. I think you are missing the point Jason was trying to

Re: [PHP] Question: Repopulating form parameters

2004-12-12 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: If in doubt, print it out (TM) echo '$Indbr', $Indbr, $Ind; $Ind '1','2','3','4' '1','2','3','4' Funny, they are both the same. Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Question: Repopulating form parameters

2004-12-11 Thread Stuart Felenstein
I'm hoping that this question will be more succinct. I am trying to repopulate a search form with a user's chosen paramters. I am running into a problem with multiple select lists First , this is the element when the form is first presented to the user: select name=Ind[] size=8

Re: [PHP] Question: Repopulating form parameters

2004-12-11 Thread Stuart Felenstein
--- [EMAIL PROTECTED] wrote: you (just) need to mark the previously chosen items as selected in the repopulated list. the highlighting part is a basic html/form issue. i.e., if you have questions on this you should look at how, on a simple (html-only) form, an item on a list is marked

Re: [PHP] Question: Repopulating form parameters

2004-12-11 Thread Jason Wong
On Saturday 11 December 2004 20:46, Stuart Felenstein wrote: --- [EMAIL PROTECTED] wrote: you (just) need to mark the previously chosen items as selected in the repopulated list. the highlighting part is a basic html/form issue. i.e., if you have questions on this you should look at

[PHP] Question: urldecode

2004-12-09 Thread Stuart Felenstein
In my search page, the url returned comes back with the ..err I forget what it's called, but query string looks like this: %5B%5D=3. I think the %5B and 5D should be []. What I think is needed is rawurldecode. I've looked through my code and think it belongs somewhere in this block:

RE: [PHP] Question: urldecode

2004-12-09 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 09 December 2004 11:52 In my search page, the url returned comes back with the ..err I

RE: [PHP] Question: urldecode

2004-12-09 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: Are you seeing the URL-encoded version *only* in your browser's Address/Location bar? If so, that's perfectly normal and nothing to worry about -- it should be automatically decoded by the Web server before being passed to PHP. If you're seeing

RE: [PHP] Question: urldecode

2004-12-09 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 09 December 2004 13:38 --- Ford, Mike [EMAIL PROTECTED] wrote: Are you seeing the

Re: [PHP] Question: urldecode

2004-12-09 Thread Richard Lynch
Stuart Felenstein wrote: In my search page, the url returned comes back with the ..err I forget what it's called, but query string looks like this: %5B%5D=3. I think the %5B and 5D should be []. What I think is needed is rawurldecode. I've looked through my code and think it belongs

[PHP] Question: Search from , text fields

2004-11-30 Thread Stuart Felenstein
I'm building a search form where users can search for people by zip code. Trying to get an opinion here. Well maybe more then just one. Should I have seperate textfields, say (arbitrary) 3 , where they can put in 1 zip code per field. Or do I do it with one text field , using delimited

Re: [PHP] Question: Search from , text fields

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 09:22:11 -0800 (PST), Stuart Felenstein [EMAIL PROTECTED] wrote: I'm building a search form where users can search for people by zip code. Trying to get an opinion here. Well maybe more then just one. Should I have seperate textfields, say (arbitrary) 3 , where they can

[PHP] Question regarding constructors and child classes

2004-11-17 Thread Brent Clements
If I have the following: ?php class foo { function foo () { echo constructed!; } } class childFoo extends foo { function childFoo() { echo constructed also!; }

Re: [PHP] Question regarding constructors and child classes

2004-11-17 Thread Jordi Canals
Hi, Comment inline On Wed, 17 Nov 2004 20:19:01 -0600, Brent Clements [EMAIL PROTECTED] wrote: ?php class foo { function foo () { echo constructed!; } } class childFoo extends foo { function childFoo() { // here you

[PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
I hope this is a reasonable question: This is the query string my search page is kicking out to the results page. It works fine but curious about these codes or characters. And I know this maybe unrelated to PHP, so I'll apologize in advance: Why is each value preceeded by the %5B%5D ? I think

Re: [PHP] Question on query string

2004-11-16 Thread David Bevan
On November 16, 2004 09:06, Stuart Felenstein wrote: Why is each value preceeded by the %5B%5D ? I think the % is for wildcards, but for the life of me can't figure out what 5B and 5D stand for. Ind%5B%5D=2Ind%5B%5D=3Ind%5B%5D=4Ind%5B%5D=5.. Stuart, The % is an escape character to

Re: [PHP] Question on query string

2004-11-16 Thread Richard Davey
Hello Stuart, Tuesday, November 16, 2004, 2:06:03 PM, you wrote: SF Why is each value preceeded by the %5B%5D ? I think the % is for SF wildcards, but for the life of me can't figure out what 5B and 5D SF stand for. SF Ind%5B%5D=2Ind%5B%5D=3Ind%5B%5D=4Ind%5B%5D=5.. They're hex values.

Re: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
--- Richard Davey [EMAIL PROTECTED] wrote: Use urldecode() to get them back to normal again. Changed the form action line to this: action=searchresults.php?Ind=?php echo urldecode(((isset($_POST[Ind[]]))?$_POST[Ind[]]:)) Still getting this: ?Ind%5B%5D=1Ind%5B%5D=2Ind%5B%5D=3 I'm under

RE: [PHP] Question on query string

2004-11-16 Thread Chris W. Parker
Stuart Felenstein mailto:[EMAIL PROTECTED] on Tuesday, November 16, 2004 8:28 AM said: --- Richard Davey [EMAIL PROTECTED] wrote: Use urldecode() to get them back to normal again. [snip] Or should I do a $_GET['Ind'] = urlencode('Ind') on searchresults.php ? ?php // this is what

Re: [PHP] Question on query string

2004-11-16 Thread Jason Wong
On Wednesday 17 November 2004 00:28, Stuart Felenstein wrote: --- Richard Davey [EMAIL PROTECTED] wrote: Use urldecode() to get them back to normal again. Changed the form action line to this: action=searchresults.php?Ind=?php echo urldecode(((isset($_POST[Ind[]]))?$_POST[Ind[]]:)) When

RE: [PHP] Question on query string

2004-11-16 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 16 November 2004 16:28, Stuart Felenstein wrote: --- Richard Davey [EMAIL PROTECTED] wrote: Use urldecode() to get them back to normal again. Changed the form action

RE: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: The main problem with the above snippet that I can see is that there's very unlikely to be such a thing as $_POST[Ind[]] -- form fields with name=Ind[] will turn up as an array in $_POST[Ind] ($_POST[Ind][0], $_POST[Ind][1], etc.). But the whole

Re: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: When you're building a query string then (in general) there is no need for urldecode(). On the contrary you want to use urlencode(), this is done on the *value* of the individual parameters. And about this: $_POST[Ind[]], it's obvious you

RE: [PHP] Question on query string

2004-11-16 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein To: [EMAIL PROTECTED] Sent: 16/11/04 21:35 Subject: Re: [PHP] Question on query string For searchresults.php (right below

RE: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
--- Chris W. Parker [EMAIL PROTECTED] wrote: Did you purposefully ignore my previous email??? Someone else I think mentioned this in another email in this thread also. Why are you assigning anything to $HTTP_GET_VARS at all? It's meant to retrieve data. // (again) this is how you use

RE: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: //Textfields / Dropdown $HTTP_GET_VARS['JTitle']; $HTTP_GET_VARS['City']; $HTTP_GET_VARS['Days']; And thrice ditto. They looked good, gone now :) Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Question on query string

2004-11-16 Thread Chris W. Parker
Stuart Felenstein mailto:[EMAIL PROTECTED] on Tuesday, November 16, 2004 1:35 PM said: I'm not seeing what is incorrect. I did try $HTTP_GET_VARS['Ind'] = urldecode('Ind'); (in searchresults.php) but of course it wasn't imploded yet. I don't want to confuse this question or myself (or

RE: [PHP] Question on query string

2004-11-16 Thread Jason Oakley
To: Ford, Mike; '[EMAIL PROTECTED] ' Subject: RE: [PHP] Question on query string --- Ford, Mike [EMAIL PROTECTED] wrote: //Textfields / Dropdown $HTTP_GET_VARS['JTitle']; $HTTP_GET_VARS['City']; $HTTP_GET_VARS['Days']; And thrice ditto. They looked good, gone now :) Stuart -- PHP

RE: [PHP] Question on query string

2004-11-16 Thread Robert Cummings
On Tue, 2004-11-16 at 20:24, Robby Russell wrote: On Wed, 2004-11-17 at 11:28 +1100, Jason Oakley wrote: I think maybe $jtitle=$HTTP_GET_VARS['JTitle']; Might I remind you that $_HTTP_*_VARS is deprecated.. $_GET $_POST (it's also much quicker to type) And not as backward

RE: [PHP] Question on query string

2004-11-16 Thread Robby Russell
On Wed, 2004-11-17 at 11:28 +1100, Jason Oakley wrote: I think maybe $jtitle=$HTTP_GET_VARS['JTitle']; Might I remind you that $_HTTP_*_VARS is deprecated.. $_GET $_POST (it's also much quicker to type) -Robby -- /*** * Robby Russell |

Re: [PHP] Question for the PHP consultants out there.

2004-11-12 Thread Daniel Lahey
What web based software project management tool do you use to keep track of projects, project tasks, customer requests, and bug reports? You might try Ace Project: http://www.aceproject.com/ An error is the more dangerous in proportion to the degree of truth which it contains. - Henri Frederic

Re: [PHP] Question on functions

2004-11-11 Thread Sebastian Mendel
Jason wrote: Looks like you understand already. Did you have some broken code you wanted help with? yeah.. I should have posted it first. Here it is: /* User Defined Variables */ $defined = array( 0 = localhost, 1 = user, 2 =

Re: [PHP] Question on functions

2004-11-11 Thread Jason
Sorry, yeah it is a typo Sebastian Mendel wrote: Jason wrote: Looks like you understand already. Did you have some broken code you wanted help with? yeah.. I should have posted it first. Here it is: /* User Defined Variables */ $defined = array( 0 = localhost, 1

Re: [PHP] Question on functions

2004-11-11 Thread Sebastian Mendel
Jason wrote: Looks like you understand already. Did you have some broken code you wanted help with? yeah.. I should have posted it first. Here it is: /* User Defined Variables */ $defined = array( 0 = localhost, 1 = user, 2 =

Re: [PHP] Question on functions

2004-11-11 Thread Jason
Sebastian Mendel wrote: Jason wrote: Looks like you understand already. Did you have some broken code you wanted help with? yeah.. I should have posted it first. Here it is: /* User Defined Variables */ $defined = array( 0 = localhost, 1 = user,

Re: [PHP] Question on functions

2004-11-11 Thread elixon
I'm not certified expert ;-) but what I meant is Do not use function that writes to the hardcoded global variables: example: function db() { ... $GLOBALS['db']=x_open_something($GLOBALS['...'], ...); ... } This function is really... hm... not flexible enough ;-) It can make

Re: [PHP] Question on functions

2004-11-11 Thread Jason
That is exactly the type of example I was in need of. Thanks a ton. Elixon wrote: I'm not certified expert ;-) but what I meant is Do not use function that writes to the hardcoded global variables: example: function db() { ... $GLOBALS['db']=x_open_something($GLOBALS['...'], ...); ...

[PHP] Question for the PHP consultants out there.

2004-11-11 Thread Brent Clements
What web based software project management tool do you use to keep track of projects, project tasks, customer requests, and bug reports? I need something that would allow a customer to keep track of his/her project basically and to use the application to submit bug requests, feature requests,

Re: [PHP] Question for the PHP consultants out there.

2004-11-11 Thread Jason Wong
On Friday 12 November 2004 06:36, Brent Clements wrote: I'm looking at replacing a home-grown solution I wrote in PHP a while back. I've done the google thing, but everything I've tried doesn't really sit well with me. So...now I'm turning to my peers for suggestions. List what you tried.

[PHP] Question on functions

2004-11-10 Thread Jason
My question is in regard to passing global variables to a function. Here is my code, any idea why it is not working? I suppose my understanding of a global variable being able to be used within a function is off? global $array = array( 0 = hostname, 1 = username, 2 = password ); function

Re: [PHP] Question on functions

2004-11-10 Thread John Holmes
Jason wrote: My question is in regard to passing global variables to a function. Here is my code, any idea why it is not working? I suppose my understanding of a global variable being able to be used within a function is off? global $array = array( 0 = hostname, 1 = username, 2 = password );

Re: [PHP] Question on functions

2004-11-10 Thread Jason Gerfen
John Holmes wrote: Jason wrote: My question is in regard to passing global variables to a function. Here is my code, any idea why it is not working? I suppose my understanding of a global variable being able to be used within a function is off? global $array = array( 0 = hostname, 1 =

Re: [PHP] Question on functions

2004-11-10 Thread elixon
Or you can use superglobal variable $GLOBALS that is array containing all GLOBAL variables. This variable is superglobal thus does not need to be declared global using 'global $GLOBALS;' statement. Works anywhere. function database() { ... $GLOBALS['array'][0], $GLOBALS['array'][1] ...

Re: [PHP] Question on functions

2004-11-10 Thread Jason
Could you give me a good example of the tip you recommend or point me to a good tutorial on it? Elixon wrote: Or you can use superglobal variable $GLOBALS that is array containing all GLOBAL variables. This variable is superglobal thus does not need to be declared global using 'global

Re: [PHP] Question on functions

2004-11-10 Thread Sebastian Mendel
Jason wrote: Could you give me a good example of the tip you recommend or point me to a good tutorial on it? $GLOBALS holds all variables defined in main(), main() meaning outside any function or class //main() $my_var = 'test'; function myFunction() { echo $GLOBALS['my_var']; // is the

Re: [PHP] Question on functions

2004-11-10 Thread Jason
Yeah the global stuff I understand and can use fine. What I would like more information about is the use of arguments to functions i.e. function( $user, $pass, $db ) { $db = @mysql_connect( $user, $pass, $db ); } I understand parts but googling for the proper use of functions in php hasn't

Re: [PHP] Question on functions

2004-11-10 Thread Greg Donald
On Wed, 10 Nov 2004 10:10:37 -0700, Jason [EMAIL PROTECTED] wrote: Yeah the global stuff I understand and can use fine. What I would like more information about is the use of arguments to functions i.e. function( $user, $pass, $db ) { $db = @mysql_connect( $user, $pass, $db ); } I

Re: [PHP] Question on functions

2004-11-10 Thread Jason
Greg Donald wrote: On Wed, 10 Nov 2004 10:10:37 -0700, Jason [EMAIL PROTECTED] wrote: Yeah the global stuff I understand and can use fine. What I would like more information about is the use of arguments to functions i.e. function( $user, $pass, $db ) { $db = @mysql_connect( $user, $pass, $db );

[PHP] Question: Exiting a script

2004-11-08 Thread Stuart Felenstein
Say I have a script that processes input data. How do I get the script to work, where after processing the user is taken to another page ? The script outputs nothing to the screen and will end either in failure or success. Seems header won't work for me. Stuart -- PHP General Mailing List

Re: [PHP] Question: Exiting a script

2004-11-08 Thread Richard Davey
Hello Stuart, Monday, November 8, 2004, 10:31:51 AM, you wrote: SF Say I have a script that processes input data. How do I get the SF script to work, where after processing the user is taken to SF another page ? The script outputs nothing to the screen and will SF end either in failure or

Re: [PHP] Question: Exiting a script

2004-11-08 Thread Stuart Felenstein
--- Richard Davey [EMAIL PROTECTED] wrote: some text or white-space, aborting'; } else { Richard Davey I think white space is my problem. What causes white space ? Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question: Exiting a script

2004-11-08 Thread Stuart Felenstein
Never mind , I found it! !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/ TR/xhtml1/DTD/xhtml1-transitional.dtd One of these days I'll master the header function ;) Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re[2]: [PHP] Question: Exiting a script

2004-11-08 Thread Richard Davey
Hello Stuart, Monday, November 8, 2004, 10:46:00 AM, you wrote: SF I think white space is my problem. What causes white SF space ? Spaces and similar characters, carriage-returns, line-feeds, etc output to the browser. Perhaps before the opening PHP tag, or after the closing PHP tag. Any would

[PHP] Question: array_walk

2004-11-07 Thread Stuart Felenstein
This array_walk() looks like a good function Would this be a legitimate call: array_walk($myarray, 'mysql_real_escape_string'); ? Thank you, Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Question: Passing error messages

2004-11-06 Thread Stuart Felenstein
I've started getting into the habit of passing error messages through session variables, particularly on redirects. From some peoples reaction on this list I gather it's not the best practice. What is an alternative way ? I believe it's through a URL. not sure how to go about that method Stuart

[PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
I have a field that is an actual Mysql Text column, aka like a blob. I'm wondering if doing a standard validation that checks for characters outside of the alphanumeric range is enough. I'm imagining some users will cut and paste from a Word or PDF doc into the field. I've done it myself and no

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Jay Blanchard
[snip] Any thoughts ? [/snip] I thought I'd have lunch today, but I didn't. Is it a 'text' data type, or 'BLOB', (you said, actual Mysql Text column, aka like a blob) because the distinction is needed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Vail, Warren
if MySQL will police things input to a text column to make sure they are valid ascii text characters. Warren Vail -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 12:32 PM To: [EMAIL PROTECTED] Subject: [PHP] Question: Validation

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
It's a mysql text field. Stuart --- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Any thoughts ? [/snip] I thought I'd have lunch today, but I didn't. Is it a 'text' data type, or 'BLOB', (you said, actual Mysql Text column, aka like a blob) because the distinction is needed. --

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
--- Vail, Warren [EMAIL PROTECTED] wrote: I also don't know if MySQL will police things input to a text column to make sure they are valid ascii text characters. No Mysql won't do it. PHP validation would have to be involved. Stuart -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Jay Blanchard
[snip] It's a mysql text field. [/snip] You can use htmlentities() on the information placed into the field -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
May I ask why you are suggesting this function ? Stuart --- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] It's a mysql text field. [/snip] You can use htmlentities() on the information placed into the field -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Jay Blanchard
[snip] May I ask why you are suggesting this function ? You can use htmlentities() on the information placed [/snip] Because it will convert things like quotes into their HTML counterparts before you place them into the table. If you are reading it back out to a web interface they get properly

Re: [PHP] Question: Validation on a text field

2004-11-04 Thread Ben Ramsey
Jay Blanchard wrote: [snip] May I ask why you are suggesting this function ? You can use htmlentities() on the information placed [/snip] Because it will convert things like quotes into their HTML counterparts before you place them into the table. If you are reading it back out to a web interface

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] May I ask why you are suggesting this function ? You can use htmlentities() on the information placed [/snip] Because it will convert things like quotes into their HTML counterparts before you place them into the table. I'm still a

Re: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
--- Ben Ramsey [EMAIL PROTECTED] wrote: You should also use mysql_real_escape_string() on the data from the client. Even though Magic Quotes GPC is turned on ? Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Question about the date

2004-11-03 Thread Henri Marc
Hello, I have a question about the date. I have a script that compose an e-mail and send it. No problem until now, but I also need that the script can write the date of the next week. Let say we are Wednesday. The script must write the date of Wednesday 3rd in the e-mail. But from 5pm today, it

[PHP] Question about function dns_check_record

2004-11-01 Thread Bao Vu
Hello, I have a problem regard to function - dns_check_record - dns_get_mx Can you tell me why the PHP said the Call to undefined function? and also class Dog { function __construct() { } } the construct or descontruction are not working? Thanks, Bao

[PHP] Question on HTML_QuickForm: Validation ignored if specify form action

2004-10-28 Thread Ying Guo, Ms
Hi, I just started to try HTML_QuickForm, and got a problem on setting form action in the HTML_QuickForm constructor. It looks like if I set the form action other than default, i.e., self, all the validation rule is ignored, the page goes directly to the process.php after click on

Re: [PHP] Question on mysql_fetch_object()

2004-10-23 Thread Jason Wong
On Saturday 23 October 2004 13:05, Walter Wojcik wrote: I am trying to write a script that checks a table for a value in MySQL. It opens the table and queries it fine but if my query returns nothing i have no way of testing to see if it returned anything. I have tried testing for false and

<    5   6   7   8   9   10   11   12   13   14   >