[PHP] object references

2004-01-05 Thread Tilman Giese
Hi, I was wondering if any of you could help me out with a problem concerning object references. At first, I thought that it would be a bug (http://bugs.php.net/bug.php?id=26756) but the developers told me that it is not. So here is a short description: If you have two object that reference

[PHP] how to display the info including japanese or big5 etc

2004-01-05 Thread Span
hi,everyone now I'm reading a test.xml file in php,the xml file includes some japanese or big5's content. but for some reason ,I must set the default charset with 'GB2312' in php.ini ,so it means this setting such as meta http-equiv=Content-Type content=text/html; charset=utf-8 is valid and the

[PHP] Problem with using php at the command line with mysql

2004-01-05 Thread Richard Kurth
I am using PHP to do some command line work on a Linux box. I keep getting this error and can not figure out way. Is there something I am missing because this should work. There is a copy of the code at the bottom of this message. Warning: mysql_fetch_array(): supplied argument is not a valid

Re: [PHP] Readfile, DAP and 3 questions

2004-01-05 Thread Adam i Agnieszka Gasiorowski FNORD
Ryan A wrote: I am using the example from the online manual: http://de3.php.net/manual/en/function.readfile.php to read a file that is in a .htaccess protected folder and pop a download box to the client. Surprisingly, after screwing around with the example code for 2 mins I got it

[PHP] Current Month Only ?

2004-01-05 Thread Dave Carrera
Hi List, How do I return from a MySql db, rows which only contain data for the CURRENT Month / Year ? So this month would currently return 5 days worth of data since its the 5th of Jan 2004. Thank you in advance for any examples, pointers or urls that may help with this. Dave C --- Outgoing

[PHP] RE: Current Month Only ?

2004-01-05 Thread Dave Carrera
Dont worry worked it out :-) Dave c -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED] Sent: 05 January 2004 10:02 To: '[EMAIL PROTECTED]' Subject: Current Month Only ? Hi List, How do I return from a MySql db, rows which only contain data for the CURRENT Month / Year ?

[PHP] Re: PHP Accelerator Support?

2004-01-05 Thread Geoff Caplan
Hi, m Hello, I have spent hours searching the web for any kind of support m regarding Ioncube's PHP Accelerator. Not clear what the problem is. You can get excellent support from the author at Ioncube: I have always found him exceptionally helpful. m The number of users is planned to m be in

Re: [PHP] How to do this? 6 lines of code...Parse error

2004-01-05 Thread Geoff Caplan
Hi, RA for($i=1; $i21; $i++) RA { if(isset($product$i)) RA {echo Product.$i. is set!br;} RA else(!isset($product$i)) RA {echo Product.$i. is NOT set!br;}} RA exit; ... RA all of the above give me a parse error. Your problem is here: else(!isset($product$i)) You can't put conditions

[PHP] Counting back 90 days...

2004-01-05 Thread Tristan . Pretty
Got this function... I wanna remove 90 days from todays date, giving a final date, in the same format as the original, that counts back 90 days... I'm listing dates on a reporting tool, and I've been asked to only show info that we recieved in the last 90 days... Anyhoo... I believe I can minus

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Richard Davey
Hello Tristan, Monday, January 5, 2004, 11:29:16 AM, you wrote: TPrsc But is there an easy was to calculate 90 days from the timestamp... Based on the current time: $previous_90_days_timestamp = strtotime (-90 day); All in one: $previous_90_days_date = date(Y-m-d, strtotime(-90 day)); --

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Jon Haworth
Hi Tris, But is there an easy was to calculate 90 days from the timestamp... There are 86400 seconds in a day... can't you just do something like: $timestamp -= (86400 * 90); Or even $timestamp -= 7776000; // 90 days Cheers Jon -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: Counting back 90 days...

2004-01-05 Thread Sven
Tristan Pretty schrieb: I believe I can minus 10 days from $day by having... $timestamp = mktime (0,0,0,$month,$day-10,$year); hi tristan, i believe, that this works with 90 days, too. mktime() takes care of invalid dates. otherwise you had a problem with your code with the first 10

RE: [PHP] Counting back 90 days...

2004-01-05 Thread Jami
Easier way to do that is like so: $archive_date = date(Y-m-d, (time()-(86400*90))); I use this same kind of calculation for getting a date in the future. 86400 is the number of seconds in a day. Time returns the Unix Timestamp, just like you would get with mktime(). Makes for a lot less code and

[PHP] Re: Problem with using php at the command line with mysql

2004-01-05 Thread Sven
hi richard, Richard Kurth schrieb: ? include(location.inc); Global $roothostname,$rootusername,$rootpassword,$dbName; dbconnect($dbName,$rootusername,$rootpassword,$roothostname); $query = SELECT * FROM domhosted; $result=safe_query($query); i don't know what safe_query() does for you. if it's

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Tristan . Pretty
My word... 6 odd lines, to one... you're a genius... Cheers for that... Tris... Richard Davey [EMAIL PROTECTED] 05/01/2004 11:45 Please respond to Richard Davey [EMAIL PROTECTED] To [EMAIL PROTECTED] cc [EMAIL PROTECTED] [EMAIL PROTECTED] Subject Re: [PHP] Counting back 90 days...

RE: [PHP] Problem with using php at the command line with mysql

2004-01-05 Thread Jay Blanchard
[snip] I am using PHP to do some command line work on a Linux box. I keep getting this error and can not figure out way. Is there something I am missing because this should work. There is a copy of the code at the bottom of this message. Warning: mysql_fetch_array(): supplied argument is not a

[PHP] Submit Button Refresh Problem?

2004-01-05 Thread wknit
I have a php file that contains all the functions that I run on the page that is displayed, self-contained. The main function is ? makeArrays(); ? I am invoking that function with a Submit button OnClick event. Whenever I click the button, the page refreshes and the function runs just fine

RE: [PHP] Submit Button Refresh Problem?

2004-01-05 Thread Larry Brown
we need more code than ? makeArrays(); ?... By the looks of that alone, it appears that you have that inserted into the html somewhere around the submit button. If that is the case, the function will run every time you load the page. You have to set a trigger to determine whether it should run

[PHP] Re: which Bugtracker for a PHP-project?

2004-01-05 Thread Manuel Lemos
Hello, On 01/02/2004 09:47 AM, Andreas Korthaus wrote: Suche nen netten/einfachen Bugtracker für ein PHP-Projekt. Welchen könnt Ihr empfehlen? Oh sorry, I it wasn't the german list ;-) But perhaps it's also a question for this group: I am looking for a nice/easy Bug-Tracker for my

Re[2]: [PHP] Counting back 90 days...

2004-01-05 Thread Richard Davey
Hello Tristan, Monday, January 5, 2004, 11:55:36 AM, you wrote: TPrsc My word... TPrsc 6 odd lines, to one... TPrsc you're a genius... TPrsc Cheers for that... Glad to help. I too have spent ages messing with mktime and min/sec additions, etc - but strtotime() does it all for you. There are

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Paul Chvostek
Richard Davey [EMAIL PROTECTED] 05/01/2004 11:45: Based on the current time: $previous_90_days_timestamp = strtotime (-90 day); All in one: $previous_90_days_date = date(Y-m-d, strtotime(-90 day)); On Mon, Jan 05, 2004 at 11:55:36AM +, [EMAIL PROTECTED] wrote: My word... 6 odd

Re[2]: [PHP] Counting back 90 days...

2004-01-05 Thread Richard Davey
Hello Paul, Monday, January 5, 2004, 2:26:16 PM, you wrote: PC For example, strftime(%+,0) returns Wed Dec 31 19:00:00 EST 1969 in PC my timezone, and strftime(%+,-1) returns a blank. Yet, doing a PC strtotime(1969-12-31 23:59:59 GMT) will get you a -1, and the date() PC function appears to

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Eric Wood
Paul Chvostek wrote: Beware timestamps, though. They usually won't work for dates before 1970 or after 2038. If you suspect you'll need to use dates outside that period (for example, show the 90 days of whatever as of some date in 1969), your results may be unpredictable. For example,

[PHP] sessions and virtual sites

2004-01-05 Thread Matthew Weier O'Phinney
I've got a problem with sessions and Apache virtual sites. My specs: PHP 4.3.2 on Apache 1.3.27, operating on a Red Hat 8 server with kernel 2.4.20 with SMP. I've developed a simple event calendar that uses sessions in two different instances. The first is when paging through search results; I

[PHP] Password in LDAP with php

2004-01-05 Thread Bc. Radek Kreja
Hello, I need to set up password for user in LDAP. From command line is not problem to set up pass with ldappass, but is some function or method in PHP? -- Regards, Bc. Radek Kreja Starnet, s. r. o. [EMAIL PROTECTED] http://www.ceskedomeny.cz http://www.skdomeny.com

[PHP] How to get sessions worked with register_globals=OFF?

2004-01-05 Thread sudheer yakkala
Hi, I was wondering If I could get applications run with register_globals = OFF I have developed few applications, long back when I was using php 4.0.6. All of them worked fine when register_globals=ON. But none of the sessions were working when I turned off register_globals. I tried replacing

Re: [PHP] Current Month Only ?

2004-01-05 Thread Adam i Agnieszka Gasiorowski FNORD
Dave Carrera wrote: How do I return from a MySql db, rows which only contain data for the CURRENT Month / Year ? So this month would currently return 5 days worth of data since it?s the 5th of Jan 2004. Thank you in advance for any examples, pointers or urls that may help with this.

RE: [PHP] Password in LDAP with php

2004-01-05 Thread Chakravarthy Cuddapah
You can do this in PHP. Check this: http://us4.php.net/manual/en/ref.ldap.php I wrote a form in PHP to add users to LDAP, change passwords etc. Check this https://www.cuddapahonline.net/ldap/ I can send the forms if you want. From: Bc. Radek Kreja Sent: Mon 1/5/2004 10:30 AM To: [EMAIL

Re: [PHP] Submit Button Refresh Problem?

2004-01-05 Thread Chris Shiflett
--- wknit [EMAIL PROTECTED] wrote: I have a php file that contains all the functions that I run on the page that is displayed, self-contained. The main function is ? makeArrays(); ? I am invoking that function with a Submit button OnClick event. [snip] How do I keep the page from

Re: [PHP] Current Month Only ?

2004-01-05 Thread David O'Brien
$current = getdate(); if ($current[mday] 10) { $current[mday] = 0 . $current[mday]; } if ($current[mon] 10) { $current[mon] = 0 . $current[mday]; } $sql = SELECT * FROM yourtable WHERE datefield BETWEEN . $current[year] . $currentmonth] . $current[mday] - ($current[mday] - 1) . and .

Re: [PHP] Password in LDAP with php

2004-01-05 Thread Stig Venaas
On Mon, Jan 05, 2004 at 10:45:58AM -0500, Chakravarthy Cuddapah wrote: You can do this in PHP. Check this: http://us4.php.net/manual/en/ref.ldap.php I wrote a form in PHP to add users to LDAP, change passwords etc. Check this https://www.cuddapahonline.net/ldap/ I can send the forms if you

Re: [PHP] How to get sessions worked with register_globals=OFF?

2004-01-05 Thread Chris Shiflett
--- sudheer yakkala [EMAIL PROTECTED] wrote: I was wondering If I could get applications run with register_globals = OFF Yes, otherwise disabling register_globals would not be the default behavior chosen. :-) I have developed few applications, long back when I was using php 4.0.6. All of

[PHP] OOP design question

2004-01-05 Thread Mike Smith
I am starting to get a handle (I think) on OOP. I was wondering if anyone would care to comment on what I think I understand: For simplicity's sake class.php contains AddItem() and DisplayItems(). Since submitting form data ?php include('class.php'); If(!$_POST['submit']){ //Do I need to

Re: [PHP] Alternate way of e-mailing in PHP

2004-01-05 Thread David Otton
On Mon, 05 Jan 2004 01:38:09 -0500, you wrote: I've been getting data format errors from Sendmail when trying to send automatic e-mails from my websites recently, and as I can't find a fix for Quick questions: what does sendmail_path in php.ini look like? Where is the data format error message

RE: [PHP] Password in LDAP with php

2004-01-05 Thread Chakravarthy Cuddapah
The new function would be of great help. I am using Apple's Panther Server. In their documentation Apple suggested to use passwd command at the terminal instead of ldap commands. If you can send me detailed instructions, I can test. From: Stig Venaas Sent: Mon 1/5/2004 11:01 AM To:

[PHP] Re: Redirection to a named frame

2004-01-05 Thread Geoffrey Thompson
I would prefer not having to use script - is there not a way to handle this by modifying the header? Something similar to the example I found in the O'Reilly book - except which works? :) Martin Helie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How about simply: echo SCRIPT

[PHP] Re: Redirection to a named frame

2004-01-05 Thread Geoffrey Thompson
BTW - I misquoted - the example below was in the PHP Cookbook (page 173) - not in the MySQL Cookbook - my apologies... Geoffrey Thompson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I would prefer not having to use script - is there not a way to handle this by modifying the header?

Re: [PHP] Strange counter behavior

2004-01-05 Thread Jason Wong
On Saturday 03 January 2004 14:47, Cesar Aracena wrote: I know most of you doesn't have the time() for this kind of things, but I have a problem with this beautifull counter script I found on hotscripts. I read it over and over again but I can't find where the problem is. As the code is way

Re: [PHP] php stub

2004-01-05 Thread Jason Wong
On Saturday 03 January 2004 16:11, Dan Mahoney wrote: So it's, at the time of this writing, 2:47 AM. Keep this in mind. That's no excuse for: You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading.

[Fwd: Re: [PHP] Submit Button Refresh Problem?]

2004-01-05 Thread Asegu
oops, should have double checked the 'to'. Sorry. Original Message Subject: Re: [PHP] Submit Button Refresh Problem? From:Andrew Séguin [EMAIL PROTECTED] Date:Mon, January 5, 2004 12:26 To:___

[PHP] Re: OOP design question

2004-01-05 Thread Geoffrey Thompson
Mike Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am starting to get a handle (I think) on OOP. I was wondering if anyone would care to comment on what I think I understand: For simplicity's sake class.php contains AddItem() and DisplayItems(). Since submitting form data

[PHP] Re: extract/replace the content of html pages

2004-01-05 Thread JLake
I will mess around with this I think that this will help me get to where I'm going. Thnaks, J. Martin Helie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Not sure I understand, but it sounds like you'd want to do something like: $dir = yourdir/; $d = dir( $dir ); while (false

[PHP] MAIL doesn't work anymore

2004-01-05 Thread Monty
Shouldn't this work in PHP 4.3.2? ... mail('[EMAIL PROTECTED]', 'Subject', 'Body of email'); This very simple use of the mail command produces an error by Sendmail: dsn=5.6.0, stat=Data format error, which must mean there is a bug in this function. Does anyone know why this won't work

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Paul Chvostek
On Mon, Jan 05, 2004 at 09:51:33AM -0500, Eric Wood wrote: In Business Basic I use Julian Dates: http://www.basis-documentation.com/commands/jul_function.htm. This lets me easily calculate days between dates just by substracting integers. Why has PHP made dates more difficult? Unix

Re: [PHP] MAIL doesn't work anymore

2004-01-05 Thread Rolf Brusletto
Monty wrote: Shouldn't this work in PHP 4.3.2? ... mail('[EMAIL PROTECTED]', 'Subject', 'Body of email'); This very simple use of the mail command produces an error by Sendmail: dsn=5.6.0, stat=Data format error, which must mean there is a bug in this function. Does anyone know why this

[PHP] Remove quotes from form field

2004-01-05 Thread Vernon
I'm having trouble returning the value less the quatation marks from the following: $words=explode( , strtolower($keywords)); I'm having the words from the form field put into an array. Problem is if the field contains something like trackworker AND New York It seperates the words

[PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
I cannot seem to find the problem in my code. I have two pages. Both need to select a product from a database. The first page works fine, the product is found and I use the data in the page. The second one does not fetch the product. The code is exactly the same: $query=SELECT * FROM products

RE: [PHP] Strange coding bug

2004-01-05 Thread Jay Blanchard
[snip] $query=SELECT * FROM products WHERE stock_number = '$item_number'; $result=mysql_query($query); $row=mysql_fetch_array($result); When I do 'echo $result;' on the first page, I get the result number. [/snip] If you echo $result; with this code all you should get back is 'array' ($result

Re: [PHP] Strange coding bug

2004-01-05 Thread Brad Pauly
On Mon, 2004-01-05 at 12:59, Pat Hanna wrote: I cannot seem to find the problem in my code. I have two pages. Both need to select a product from a database. The first page works fine, the product is found and I use the data in the page. The second one does not fetch the product. The code is

RE: [PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
I have tried printing out the query and got the exact same thing on both pages. The only relevent code is the code I included. The $item_number gets passed to both pages exactly the same. The query comes up no different on both pages. It is accessing the exact same product and yet it will not get

RE: [PHP] Strange coding bug

2004-01-05 Thread Jay Blanchard
[snip] I have tried printing out the query and got the exact same thing on both pages. The only relevent code is the code I included. The $item_number gets passed to both pages exactly the same. The query comes up no different on both pages. It is accessing the exact same product and yet it will

RE: [PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
?php require 'functions.php3'; session(); connect(); require 'header.htm'; require 'side_bar.htm'; $query=SELECT * FROM products WHERE stock_number = '$item_number'; $result=mysql_query($query); $row=mysql_fetch_array($result); ?php require 'functions.php3'; header(Pragma: no-cache);

RE: [PHP] Strange coding bug

2004-01-05 Thread Chris Shiflett
--- Pat Hanna [EMAIL PROTECTED] wrote: I have tried printing out the query and got the exact same thing on both pages. The only relevent code is the code I included. The $item_number gets passed to both pages exactly the same. The query comes up no different on both pages. It is accessing the

[PHP] IN ANTICIPATION OF A MUTUAL BUSINESS RELATIONSHIP

2004-01-05 Thread PETER MBA ASSOCIATES
I am PETER MBA, an attorney at law, personal attorney to this engineering contractor, a National of your country, who used to be a contractor with a Mining Company here in South Africa. Herein shall be referred to as my client. On the 21st of April 2001, my client, his wife and their only

Re: [PHP] Alternate way of e-mailing in PHP

2004-01-05 Thread Monty
Here's what's in my PHP.INI for e-mail: sendmail_path = /usr/sbin/sendmail -t -i I confirmed that the path is correct. The alternate e-mail code I posted previously DOES work, but this simple mail command always causes a data format error in Sendmail: mail('[EMAIL PROTECTED]',

RE: [PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
I think I've fixed it but in an odd way. Apparently I was getting error 1046: no database seleted. So I ran mysql_db_query and that worked. But on the other pages I have, mysql_query always works. I have a function called connect() that I run on every page: function connect() { global $DB_SERVER,

[PHP] Session expiry issues in IE, still.

2004-01-05 Thread Tarrant Costelloe
php-general, I wrote to the list a couple of days ago about issues Planet-Tolkien.com members were experiencing with Internet Explorer, where their PHP based $_SESSION seemed to be expiring very speradically, where as Mozilla and Opera browsers this issue was not occuring and they would stay

[PHP] Checkboxes?

2004-01-05 Thread Jas
I am having a problem with checkboxes... ?php $_SESSION['logs'] .= trtd width=\25%\bDate/b/tdtd width=\15%\bTime/b/tdtd width=\20%\bIP Address/b/tdtd width=\15%\bPort/b/tdtd width=\20%\bLog Message/b/tdtd width=\20%\ align=\right\bDetails?/b/td/tr; require 'database_script.php'; $table = logs;

Re: [PHP] Session expiry issues in IE, still.

2004-01-05 Thread Chris Shiflett
Hi Tarrant, --- Tarrant Costelloe [EMAIL PROTECTED] wrote: I wrote to the list a couple of days ago about issues Planet-Tolkien.com members were experiencing with Internet Explorer, where their PHP based $_SESSION seemed to be expiring very speradically, where as Mozilla and Opera browsers

[PHP] Re: Remove quotes from form field

2004-01-05 Thread Matt Grimm
In the very simplest way? Just use a str_replace on the quotes: $words=explode( , str_replace('', '', strtolower($keywords))); -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Parkway Anchorage, AK 99508 907.770.6200 ext. 686 907.336.6205

[PHP] readfile from startpos to endpos

2004-01-05 Thread JLake
I've been looking around for a bit and can't quite find what I'm looking to do. I want to read a file (from a pattern matched start position) to (a pattern matched end position) $startPos = strpos($file, '!- start -'); $endPos = strpos($file, '!- end -'); $stuff = fread($file, ($endPos -

[PHP] developing a plug-in framework

2004-01-05 Thread Justin French
Hi all, I'm struggling to find any tutorials or 'thought starters' on how I can incorporate script-level plug-ins into a PHP application. Another way, can I see some examples of how my application framework can provide an API for modular, add-on code? I understand that there would definitely

Re: [PHP] Remove quotes from form field

2004-01-05 Thread John W. Holmes
Vernon wrote: I'm having trouble returning the value less the quatation marks from the following: $words=explode( , strtolower($keywords)); I'm having the words from the form field put into an array. Problem is if the field contains something like trackworker AND New York It seperates

[PHP] Retrieve key from $_POST

2004-01-05 Thread Robin Kopetzky
Is there any way to retrieve a key value from $_POST when there is more than one $_POST array entry? I'm trying to retrieve the name of an 'INPUT TYPE=image' control with HTML because you can't pass a value back. I need to get the name of the control to use in a 'switch' statement. Any help is

Re: [PHP] Remove quotes from form field

2004-01-05 Thread Vernon
The search is already completd. The previous response answered my question. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Retrieve key from $_POST

2004-01-05 Thread Richard Davey
Hello Robin, Tuesday, January 6, 2004, 12:31:24 AM, you wrote: RK Is there any way to retrieve a key value from $_POST when there is more than RK one $_POST array entry? Do this: echo pre; print_r($_POST); echo /pre; If you can see it, you can retrieve it. Otherwise, you can't. -- Best

[PHP] Re: readfile from startpos to endpos

2004-01-05 Thread Matt Grimm
Close. You need to adjust for the length of your pattern. So if you're matching against !- start -, then your actual start position (minus the start comment) is the strpos plus strlen($pattern), or 14 in this case. $startPos = strpos($file, '!- start -') + 14; -- Matt Grimm Web Developer The

[PHP] Re: readfile from startpos to endpos

2004-01-05 Thread DvDmanDT
Like Matt Grimm said, add +14, and do fseek($file,$startPos); -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com ## Please, if you are using windows, you may be infected by Swen. Please go here to find out more:

[PHP] Re: readfile from startpos to endpos

2004-01-05 Thread JLake
Thanks a bunch. J Jlake [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've been looking around for a bit and can't quite find what I'm looking to do. I want to read a file (from a pattern matched start position) to (a pattern matched end position) $startPos = strpos($file, '!-

[PHP] Re: Retrieve key from $_POST

2004-01-05 Thread Justin Patrin
Robin Kopetzky wrote: Is there any way to retrieve a key value from $_POST when there is more than one $_POST array entry? I'm trying to retrieve the name of an 'INPUT TYPE=image' control with HTML because you can't pass a value back. I need to get the name of the control to use in a 'switch'

Re: [PHP] Retrieve key from $_POST

2004-01-05 Thread John W. Holmes
Robin Kopetzky wrote: Is there any way to retrieve a key value from $_POST when there is more than one $_POST array entry? I'm trying to retrieve the name of an 'INPUT TYPE=image' control with HTML because you can't pass a value back. I need to get the name of the control to use in a 'switch'

RE: [PHP] Retrieve key from $_POST

2004-01-05 Thread Vail, Warren
is an INPUT TYPE=img actually an input? I've never actually seen it used that way. If not that may explain difficulty finding it in $_POST array. Warren Vail -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 4:49 PM To: Robin Kopetzky Cc:

RE: [PHP] Retrieve key from $_POST

2004-01-05 Thread Vail, Warren
OK, found my answer, behaves like submit button, and I know from experience that if I don't code a name parameter for the submit button, and in this case probably a value, it doesn't get returned to the $_POST array. Warren Vail -Original Message- From: Vail, Warren Sent: Monday,

Re: [PHP] Retrieve key from $_POST

2004-01-05 Thread John W. Holmes
Vail, Warren wrote: is an INPUT TYPE=img actually an input? I've never actually seen it used that way. If not that may explain difficulty finding it in $_POST array. It is, but you end up with two variables. If you name it img for example, you'll have $_POST['img_x'] and $_POST['img_y']. --

RE: [PHP] Retrieve key from $_POST

2004-01-05 Thread Robin Kopetzky
Reworked the code and used an 'Input TYPE=button' and fixed the problem. Thanks to all who replied. Amazing isn't it, that as we grow older the brain slowly turns into mush... Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020 -- PHP General Mailing List

[PHP] [Fwd: failure notice] Why??

2004-01-05 Thread Rolf Brusletto
Whenever I submit a message to this list, I get a bounce back saying its a dupe, anyone have any ideas? -- Rolf Brusletto rolf[at]emailfeeds[dot]com http://www.emailfeeds.com ---BeginMessage--- Hi. This is the qmail-send program at pb1.pair.com. I'm afraid I wasn't able to deliver your message

Re: [PHP] developing a plug-in framework

2004-01-05 Thread Brad Pauly
On Mon, 2004-01-05 at 17:13, Justin French wrote: Hi all, I'm struggling to find any tutorials or 'thought starters' on how I can incorporate script-level plug-ins into a PHP application. Another way, can I see some examples of how my application framework can provide an API for

Re: [PHP] [Fwd: failure notice] Why??

2004-01-05 Thread Richard Davey
Hello Rolf, Tuesday, January 6, 2004, 1:26:31 AM, you wrote: RB Whenever I submit a message to this list, I get a bounce back saying its RB a dupe, anyone have any ideas? I get exactly the same - it's highly annoying and happens every time. Do you use Pair Networks by any chance? (I do and

Re: [PHP] [Fwd: failure notice] Why??

2004-01-05 Thread Justin Patrin
Richard Davey wrote: Hello Rolf, Tuesday, January 6, 2004, 1:26:31 AM, you wrote: RB Whenever I submit a message to this list, I get a bounce back saying its RB a dupe, anyone have any ideas? I get exactly the same - it's highly annoying and happens every time. Do you use Pair Networks by any

[PHP] how to display the info including japanese or big5 etc

2004-01-05 Thread Span
hi,everyone now I'm reading a test.xml file in php,the xml file includes some japanese or big5's content. but for some reason ,I must set the default charset with 'GB2312' in php.ini ,so it means this setting such as meta http-equiv=Content-Type content=text/html; charset=utf-8 is valid and the

Re: [PHP] [Fwd: failure notice] Why??

2004-01-05 Thread Rolf Brusletto
Richard Davey wrote: Hello Rolf, Tuesday, January 6, 2004, 1:26:31 AM, you wrote: RB Whenever I submit a message to this list, I get a bounce back saying its RB a dupe, anyone have any ideas? I get exactly the same - it's highly annoying and happens every time. Do you use Pair Networks by any

[PHP] Re: Session expiry issues in IE, still.

2004-01-05 Thread Matthew Weier O'Phinney
* Tarrant Costelloe [EMAIL PROTECTED]: I wrote to the list a couple of days ago about issues Planet-Tolkien.com members were experiencing with Internet Explorer, where their PHP based $_SESSION seemed to be expiring very speradically, where as Mozilla and Opera browsers this issue was not

Re: [PHP] Alternate way of e-mailing in PHP

2004-01-05 Thread Manuel Lemos
Hello, On 01/05/2004 08:14 PM, Monty wrote: I've also tried Manuel Lemos' MIME, SMTP, and MAIL classes but they don't work for me either. The only thing that works in PHP for sending e-mail is by opening Sendmail as a separate process using popen() within PHP, then writing directly to it using

[PHP] Strange IF(condition) behaviour

2004-01-05 Thread Tim L
I'm not sure if this is intended behaviour or not, but I can see that is might be. Just thought I would bounce this to see what people think about it: ?php if (false) ?Hello?php else echo Hi; echo World\n; ? This returns a parse error due to the fact there is no brackets around the

[PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tyler Longren
Hi, http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple I read that. Doesn't work in php since the whole register_globals thing. Now, when I get the results from a form, they're all in a $_POST[] array. Example. When I have a select name=test MULTIPLE I would have to access

Re: [PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tyler Longren
Oh yea, I also searched the archives at http://marc.theaimsgroup.com/?l=php-general There were quite a few releated postings, but no answers! Mostly it was dick heads telling people that need help to RTFM. So, if you don't have any real help for me, then disregard my question. Telling me to

[PHP] Re: developing a plug-in framework

2004-01-05 Thread Tim L
Its actually quite easy once you wrap your head around the problem. I've just finished writing one in C#, but the concept is portable. First thing you need to know is what goes in the plugin and what goes in the framework. 1. The plugin should not know anything about the framework that it runs

Re: [PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tom Rogers
Hi, Tuesday, January 6, 2004, 2:05:47 PM, you wrote: TL Hi, TL http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple TL I read that. Doesn't work in php since the whole register_globals TL thing. Now, when I get the results from a form, they're all in a TL $_POST[] array.

Re: [PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tyler Longren
Hi Tom, $_POST['test'][] doesn't work. I thought I had tried $test = $_POST['test'] before and it didn't work. I just tried it though and it seemed to work. Thanks Tom! Tyler On Mon, 2004-01-05 at 22:20, Tom Rogers wrote: Hi, Tuesday, January 6, 2004, 2:05:47 PM, you wrote: TL Hi, TL

[PHP] Re: Getting results from Select Multiple HTML tag

2004-01-05 Thread Tim L
Easiest way is this foreach ($_POST['test'] as $key = $value) { echo $key . '|' . $value . \n; } By putting the [] on the end of the variable name in the html, it has turned the variable test into an array. Because test is a post variable, it is now multidimensional. Tyler Longren [EMAIL

[PHP] Preg Replace

2004-01-05 Thread Aaron Axelsen
Hello, I am fighting replacing items in the following hunk of code. This code is pulled from a database, and then I want to replace items like name with the contents of a variable $name. I have tried code like: preg_replace(/\\\?.*?\\/,$name,$paypal); However it doesn't work, any suggestions

Re: [PHP] Preg Replace

2004-01-05 Thread Jason Wong
On Tuesday 06 January 2004 12:35, Aaron Axelsen wrote: I am fighting replacing items in the following hunk of code. This code is pulled from a database, and then I want to replace items like name with the contents of a variable $name. I have tried code like:

[PHP] Re: fsockopen to conect to ssl sites

2004-01-05 Thread Manuel Lemos
Hello, On 01/03/2004 03:06 PM, Jorge Castaneda wrote: WHERE IS THE ERROR? The username and the password are the correct and the name of the variables (login and pass) also match. I tried to get data from a secure site but I always receive the next message instead of the page I

[PHP] Comparison PHP to Perl

2004-01-05 Thread Warren Vail
I am looking for a comparison of features supported by PHP vs those supported by Perl. My gut tells me PHP is more robust, but we are trying to implement something in a company that has long had a standard allowing Perl as a sanctioned language, but current management does not want to fight for

[PHP] Call for Papers: PHP and Web Standards Conference UK 2004

2004-01-05 Thread Davey
Hi folks, I would like to announce the public Call for Papers for the PHP and Web Standards Conference UK 2004. The PHP and Web Standards (PaWS) Conference will cover using PHP, Web Standards and the Semantic Web separately and in conjunction with each other. We would like to stress that