[PHP] Array_keys problem

2004-04-03 Thread Robin 'Sparky'; Kopetzky
ys($this->ma_arguments)) ) { return true; } else { return false; } } Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Local define?

2004-02-22 Thread Robin 'Sparky'; Kopetzky
Greetings!! If you define a constant within a function, is it local or global? Example: function foo() { define('BAR', 0); } Robin Kopetzky Black Mesa Computers/Internet Services, LLC -- PHP General Mailing List (http://w

Re: [PHP] Credit card/Debit card validation

2003-07-09 Thread Sparky Kopetzky
Thank you for responding. I found just what the doctor ordered - ECHO php. Sparky - Original Message - From: "Ralph Guzman" <[EMAIL PROTECTED]> To: "'Sparky Kopetzky'" <[EMAIL PROTECTED]>; "'PHP General'" <[EMAIL PROTECTED

[PHP] Credit card/Debit card validation

2003-07-09 Thread Sparky Kopetzky
Does anyone know of a PHP routine to validate Credit/Debit cards? I've seen some convoluted Javascript scripts but want a PHP version so validation can be done done server-side. Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

[PHP] URL problem

2003-07-07 Thread Sparky Kopetzky
Hi! I'm passing this url to the script: http://www.fttta.com/auction.php and intercepting it with: if ($_SERVER['QUERY_STRING'] = "") { disp_cat(); } However, nothing is happening. phpinfo show $_SERVER['QUERY_STRING'] as 'no value', so this should work. Anyone know why this doesn't work

[PHP] print vs heredoc

2003-07-07 Thread Sparky Kopetzky
Hi, again!! I'm looking for opinions as to which is better/faster, print or heredoc. print makes the code layout look nice and eazy to debug, where heredoc IS faster but makes the code look like a nightmare with everything jammed against the left side of the code. I'm pretty picky about what lo

[PHP] print vs. heredoc

2003-07-06 Thread Sparky Kopetzky
Hi, again!! I'm looking for opinions as to which is better, print or heredoc. print makes the code layout look nice and eazy to debug, where heredoc IS faster but makes the code look like a nightmare and I'm pretty picky about what looks good. Robin E. Kopetzky Black Mesa Computers/Internet Ser

Re: [PHP] Re: Nested mysql_query()'s

2003-07-01 Thread Sparky Kopetzky
Problem was a fat-finger - meant 'bid' not 'bids'... Doh!!! Sparky - Thanks again. - Original Message - From: "Shena Delian O'Brien" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 16:01 Subject: [PHP] Re: Nested my

[PHP] Nested mysql_query()'s

2003-07-01 Thread Sparky Kopetzky
Hi! I've got two nested queries where one looks up data based on values returned from the first. $lot_query = "SELECT * FROM LOT WHERE lot_category_id=" . $lot_category . " AND lot_close_time>" . time(); $lot_result = mysql_query($lot_query, $CONNECT_ID); if ($lot_result)

[PHP] Email troubles

2003-06-30 Thread Sparky Kopetzky
I'm getting this error while sending email with mail(): Warning: mail(): SMTP server response: 550 5.7.1 <[EMAIL PROTECTED]>... Relaying denied in (path to my program) How do I turn relaying on?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

Re: [PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Sparky Kopetzky
Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 29, 2003 14:56 Subject: Re: [PHP] ARGHHH!!! POST variable problem > On Monday 30 June 2003 04:38, Sparky Kopetzky wrote: > > I can click links and they work but when I enter data in a form and try

Re: [PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Sparky Kopetzky
29, 2003 14:56 Subject: Re: [PHP] ARGHHH!!! POST variable problem > On Monday 30 June 2003 04:38, Sparky Kopetzky wrote: > > I can click links and they work but when I enter data in a form and try to > > send it to the next php script to process the data, nothing happens. Is > >

[PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Sparky Kopetzky
I can click links and they work but when I enter data in a form and try to send it to the next php script to process the data, nothing happens. Is there a simple way I can see what is returning from the browser to see if what I expect is actually getting there?? I think $_SERVER['QUERY_STRING']

Re: [PHP] Sorting problem

2003-06-28 Thread Sparky Kopetzky
Yes, I need the key to remain associated with the value as the key links the value to a directory. Can't have files going into the wrong places. So if asort does the job, I'll try that and see if the code breaks or not. Sparky - Original Message - From: "Daryl Meese" <[EMAIL PROTECTED]> To

[PHP] Sorting problem

2003-06-27 Thread Sparky Kopetzky
I need to sort an array and have the key 'follow' the value. I know I could splice a string, sort it, then split it again but what a pain. Is there a simpler way? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net -- PHP General Mailing List (http://www.php.net/) To

[PHP] $_POST problem

2003-06-27 Thread Sparky Kopetzky
Hi, it's me again... I've got my script kinda running but am unable to retrieve any values with $_POST. I turned on register_globals in the php.ini and am using this url: http://www.fttta.com/auction.php?action=reg. (Sorry, it's local for now...) I'm using this kind of line to check for values:

[PHP] OOPS!!! [PHP] Date/Time problem

2003-06-27 Thread Sparky Kopetzky
Opps! I meant strftime() as I have to pass timestamp from a file. Sparky - Original Message - From: "Adam Voigt" <[EMAIL PROTECTED]> To: "Sparky Kopetzky" <[EMAIL PROTECTED]> Cc: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, June 27,

[PHP] Date/Time problem

2003-06-27 Thread Sparky Kopetzky
Well, I got the time displaying sort of right but have a length problem. See, using %T doesn't work in date() but %Z does but it returns a very long string 'Mountain Daylight Time' when all I want is 'MDT'. Is there a way around this problem other than having to edit the string date() returns??

[PHP] Cookoo clock

2003-06-26 Thread Sparky Kopetzky
I am in New Mexico and my php system is telling via date() that my timezone is BST (British standard time) and not MST (Mountain Standard Time). Any clue as to why it's doing this?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

[PHP] One more time - HTTP_HOST

2003-06-25 Thread Sparky Kopetzky
Is $_SERVER['HTTP_HOST'] the same as CGI $_ENV['REMOTE_HOST'] ?? Please, I need to know... Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

[PHP] HTTP_HOST question

2003-06-25 Thread Sparky Kopetzky
Is $_SERVER['HTTP_HOST'] the same as $_ENV['REMOTE_HOST'] ?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

[PHP] Reg Exp help needed

2003-06-24 Thread Sparky Kopetzky
I'm translating (hacking) code from Perl to PHP and have two reg exp expressions I can't figure out what they do. 1st: $goodbadnum =~ tr/0-9//cd; I think this one removes any chars that are not numbers. 2nd: $goodbadnum =~ tr/0-9/x/; I think this one replaces and numbers with an 'x'. Right, wr

[PHP] Text files vs other types

2003-06-21 Thread Sparky Kopetzky
If there an ability like Perl to determine if a file is a text file (-T) or any other type?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

Re: [PHP] Chomp, Chomp, Chomp

2003-06-20 Thread Sparky Kopetzky
I looked at the documentation on rtrim. It trims ALL whitespace characters from the end, not just the '\n'. I need only the '\n' trimmed. Sparky - Original Message - From: "Lars Torben Wilson" <[EMAIL PROTECTED]> To: "Sparky Kopetzky"

[PHP] Chomp, Chomp, Chomp

2003-06-20 Thread Sparky Kopetzky
Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. Thanks in advance!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

[PHP] Cookies- peanut butter or chocolate??

2003-06-19 Thread Sparky Kopetzky
Yes, this question is about PHP cookies. Two questions: 1. How do you setup a cookie that will not expire?? 2. How do you put 2 items that you want to save in the cookie and retrieve?? Examples in the PHP manual only show how to work with a single value. Thanks! Robin E. Kopetzky Black Mesa C

[PHP] Url problem

2003-06-12 Thread Sparky Kopetzky
OK. I'm suffering from brain gas... I'm trying this, it doesn't work and I can't figure out why: include_once $SYSTEM_URL . "/classes/category.php"; where $SYSTEM_URL = "http://www.example.com"; is the url to the web site. and I get this error: Fatal error: Cannot instantiate non-existent c

[PHP] Questions, questions, questions...

2003-06-10 Thread Sparky Kopetzky
Ok - let the war begin... Question: Why doesn't the PHP community support using an Hungarian style of programming if it prevents errors?? I've gotten too darn many times now by a type mismatch using what the 'Bible' of PHP programming style recommends - PHP Coding Standard by Fredrik Kristianse

Re: [PHP] Heredoc question

2003-06-06 Thread Sparky Kopetzky
That's fine for that but I have several places that use if's and else's... Sparky - Original Message - From: "Jennifer Goodie" <[EMAIL PROTECTED]> To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]>

[PHP] Heredoc question

2003-06-06 Thread Sparky Kopetzky
Can one use within the heredoc syntax or is there another way?? I'm trying to dynamically generate email from generic text but with obvious additions, like this: $message = < Lot get_id(); ?> has been approved. Here is the link to the lot: my_message; Robin E. Kopetzky Black Mes

Re: [PHP] Heredoc question

2003-06-06 Thread Sparky Kopetzky
s/Internet Services www.blackmesa-isp.net - Original Message - From: "Jennifer Goodie" <[EMAIL PROTECTED]> To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 16:47 Subject: RE: [PHP] Heredoc q

[PHP] Prefix question

2003-04-05 Thread Sparky Kopetzky
Does anyone know of a prefix convention used for PHP? What I'm talking about is using a type of Hungarian notation for PHP variables. I know they use 'g', 'm', and 'r' for global, method and reference variables but for other variable types. I get confused once and a while, while I am coding and