[PHP] Array Question

2007-07-10 Thread kvigor
Is there a php function similar to in_array that can detect if a "partial value" is in an array value or not: e.g. $var1 = " big horse";$var2 = " small yellow";$var3 = " red hydrant"; $theArray = array(big blue horse, small yellow bird, giant red hydrant); Is there a way to find out if

Re: [PHP] Proper way to remove an element from an array

2007-07-10 Thread tedd
At 9:30 PM -0400 7/10/07, Robert Cummings wrote: On Tue, 2007-07-10 at 21:22 -0400, tedd wrote: At 2:23 PM -0700 7/10/07, Dan wrote: >I know in some languages there's a right way to remove an element >from an array and other ways that will give you problems. > >In PHP can I just set $arrayn

Re: [PHP] Editing Files with PHP

2007-07-10 Thread jekillen
On Jul 10, 2007, at 5:33 PM, David Wonderly wrote: I am trying to create a small script to open a file and edit it. However, when I open a file with PHP in it the PHP is stripped out. It open as if I was viewing the page source. How do I fix this? Here is the code I am using. Filewri

Re: [PHP] Proper way to remove an element from an array

2007-07-10 Thread Robert Cummings
On Tue, 2007-07-10 at 21:22 -0400, tedd wrote: > At 2:23 PM -0700 7/10/07, Dan wrote: > >I know in some languages there's a right way to remove an element > >from an array and other ways that will give you problems. > > > >In PHP can I just set $arrayname[key] = null? Or will I then end up > >wi

Re: [PHP] Proper way to remove an element from an array

2007-07-10 Thread tedd
At 2:23 PM -0700 7/10/07, Dan wrote: I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under array f

Re: [PHP] Editing Files with PHP

2007-07-10 Thread Chris
David Wonderly wrote: I am trying to create a small script to open a file and edit it. However, when I open a file with PHP in it the PHP is stripped out. It open as if I was viewing the page source. How do I fix this? Here is the code I am using. include actually processes the php file, i

Re: [PHP] Checking Post Data against DB Data

2007-07-10 Thread Chris
kvigor wrote: /*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). First thing I'd suggest is making the code clearer about what's going on. Doing it the

[PHP] Editing Files with PHP

2007-07-10 Thread David Wonderly
I am trying to create a small script to open a file and edit it. However, when I open a file with PHP in it the PHP is stripped out. It open as if I was viewing the page source. How do I fix this? Here is the code I am using. Filewrite looks like this Like I said, it is very simple but

Re: [PHP] ftp_ssl_connect

2007-07-10 Thread Chris
Daniel Novotny wrote: When I tried to connect through a telnet session I got the following message: Connection failed: The certificate chain was issued by an authority that is not trusted. Get a proper certificate and you'll be right to go then I guess. -- Postgresql & php tutorials http://

Re: [PHP] Php code in html buttons

2007-07-10 Thread jekillen
On Jul 10, 2007, at 3:59 PM, k w wrote: I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. echo ""; ?> I've got all my variables stored in the php page, and I know the

[PHP] Re: Php code in html buttons

2007-07-10 Thread Dan
Thanks man, that post made my day :D. - Dan ""k w"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. echo

[PHP] Re: Php code in html buttons

2007-07-10 Thread M. Sokolewicz
Well, your first problem is that you don't understand the difference between a serverside-script and a client-script. Here's what happens: 1. A user clicks on a link 2. the browser sends a request for that page to the server 3. the server runs the script 4. the server sends the output of that sc

Re: [PHP] Php code in html buttons

2007-07-10 Thread Richard Davey
Hi k, Tuesday, July 10, 2007, 11:59:42 PM, you wrote: > I'm trying to make a button execute some php code when the button is > clicked. I'm not sure if it is the button i'm coding wrong or the php code. > Here is the code I am using. > echo ""; ?>> Everything about this approach is wrong. PHP

[PHP] Php code in html buttons

2007-07-10 Thread k w
I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. 'Click"; ?> I've got all my variables stored in the php page, and I know they are all correct. But when I push the button

Re: [PHP] Proper way to remove an element from an array

2007-07-10 Thread Dan
Thanks, this'll work. - Dan ""Eric Butera"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On 7/10/07, Dan <[EMAIL PROTECTED]> wrote: I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set

RE: [PHP] about graphs in php

2007-07-10 Thread Jay Blanchard
[snip] I need work with some statistics graphs and show it in php and I don't know how to make it. How could I make some statistics graphs like histograms or Pie graphs using php and information stored in any database? [/snip] jpgraph -- PHP General Mailing List (http://www.php.net/) To unsubsc

[PHP] about graphs in php

2007-07-10 Thread Lic. Eduardo R. Hernández Osorio
Hello everybody: I need work with some statistics graphs and show it in php and I don't know how to make it. How could I make some statistics graphs like histograms or Pie graphs using php and information stored in any database? Eduardo Ricardo Hernández

Re: [PHP] Proper way to remove an element from an array

2007-07-10 Thread Robert Cummings
On Tue, 2007-07-10 at 14:23 -0700, Dan wrote: > I know in some languages there's a right way to remove an element from an > array and other ways that will give you problems. > > In PHP can I just set $arrayname[key] = null? Or will I then end up with > key => null as a value. I looked on php.n

Re: [PHP] About Fraud Prevention

2007-07-10 Thread mlists
On Tue, 2007-07-10 at 11:51 -0700, Kelvin Park wrote: > I'm trying to make a program with PHP, that prevents ecommerce fraud orders. > Technically, what's the most effective way to prevent fraud orders on > e-commerce web sites? PHP is the least of your worries! 1) Know your customer. Perform ad

Re: [PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2

2007-07-10 Thread M5
Thanks Jim, Such common sense revealed the cause—out of memory when generating the chart. The session 'problem' was a red herring—the reason the script ran out of memory is that GD only needed more than 8MB when it was able to produce a large enough GIF (since the session data was availab

Re: [PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2

2007-07-10 Thread Eric Butera
On 7/10/07, M5 <[EMAIL PROTECTED]> wrote: I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs

Re: [PHP] Proper way to remove an element from an array

2007-07-10 Thread Eric Butera
On 7/10/07, Dan <[EMAIL PROTECTED]> wrote: I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under arra

[PHP] Proper way to remove an element from an array

2007-07-10 Thread Dan
I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under array functions for a bit and I didn't find a

Re: [PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2

2007-07-10 Thread Jim Lucas
M5 wrote: I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs (charts). Actually, it will o

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas
Jason Pruim wrote: Yes, the text box that is currently showing up under "Day to Complete" is the one that will have the date entered as MM/DD/YY then that info will be displayed in the "Reschedule Date" field. Once I can get it storing the date correctly I want to make it show up if it's not b

[PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2

2007-07-10 Thread M5
I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs (charts). Actually, it will output a

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 10, 2007, at 3:25 PM, Jim Lucas wrote: Jason Pruim wrote: On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote: Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/0

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas
Jason Pruim wrote: On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote: Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtResche

Re: [PHP] About Fraud Prevention

2007-07-10 Thread Robert Cummings
On Tue, 2007-07-10 at 11:51 -0700, Kelvin Park wrote: > I'm trying to make a program with PHP, that prevents ecommerce fraud orders. > Technically, what's the most effective way to prevent fraud orders on > e-commerce web sites? AVS - address verification system is one way that helps, but not all

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Fredrik Thunberg
Jim Lucas wrote: Fredrik Thunberg wrote: Dan skrev: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assign

Re: [PHP] About Fraud Prevention

2007-07-10 Thread Stephen
Kelvin Park <[EMAIL PROTECTED]> wrote: >I'm trying to make a program with PHP, that prevents ecommerce fraud orders. >Technically, what's the most effective way to prevent fraud orders on >e-commerce web sites? This has a little to do with PHP and a lot to do with choosing good and know

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote: Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/0

RE: [PHP] About Fraud Prevention

2007-07-10 Thread Jim Moseby
> > I'm trying to make a program with PHP, that prevents > ecommerce fraud orders. > Technically, what's the most effective way to prevent fraud orders on > e-commerce web sites? That's a really general question. More specific questions generate more specific answers. My advice to you would be

Re: [PHP] About Fraud Prevention

2007-07-10 Thread Stut
Kelvin Park wrote: I'm trying to make a program with PHP, that prevents ecommerce fraud orders. Technically, what's the most effective way to prevent fraud orders on e-commerce web sites? Give everything away for free. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.ne

[PHP] About Fraud Prevention

2007-07-10 Thread Kelvin Park
I'm trying to make a program with PHP, that prevents ecommerce fraud orders. Technically, what's the most effective way to prevent fraud orders on e-commerce web sites?

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Dan
Yeah I wanted "$products[$value['productName']] = $value['actualValue'];". I've been working a lot in Delphi recently so my mind for PHP is somewhat messed up lately, missing easy things like this. - Dan "brian" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Dan wrote: Oh yeah,

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas
Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule]

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Tijnema
On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: >> Fredrik Thunberg wrote: >> > >> > Dan skrev: >> >> Oh yeah, the problem isn't that I'm using -> instead of =>. Well that >> >> was a problem but I fixed that and it's still not w

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 10, 2007, at 11:08 AM, Jim Lucas wrote: Jason Pruim wrote: > here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Jim Lucas
Tijnema wrote: On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Fredrik Thunberg wrote: > > Dan skrev: >> Oh yeah, the problem isn't that I'm using -> instead of =>. Well that >> was a problem but I fixed that and it's still not working. >> >> - Dan >> >> ""Dan"" <[EMAIL PROTECTED]> wrote in me

Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery

2007-07-10 Thread Jim Lucas
Jim Lucas wrote: Rahul Sitaram Johari wrote: I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out ­ like thumbnails, indexes, titles & all ­ the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program w

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas
Jason Pruim wrote: > here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedul

Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery

2007-07-10 Thread Jim Lucas
Rahul Sitaram Johari wrote: I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out ­ like thumbnails, indexes, titles & all ­ the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program where you drop images

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 10, 2007, at 10:41 AM, Jim Lucas wrote: Jason Pruim wrote: On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote: Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); where are you getting the $_POST['txtReschedule'] var from? in the htm

[PHP] Checking Post Data against DB Data

2007-07-10 Thread kvigor
/*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). The code is suppose to check if the Registrants match, if they do, then check if last registration was l

Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery

2007-07-10 Thread Nathan Nobbe
Rahul, how are the image names related in your system? youll have to conjure some sort of ordering for the pictures before youll be able to tell photo.php the links for the next and previous images, because before you can do that you have to know which pictures actually come next and first in th

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas
Jason Pruim wrote: On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote: Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); where are you getting the $_POST['txtReschedule'] var from? in the html below, your var is $_POST['tasks'][#]['txtResc

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Tijnema
On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Fredrik Thunberg wrote: > > Dan skrev: >> Oh yeah, the problem isn't that I'm using -> instead of =>. Well that >> was a problem but I fixed that and it's still not working. >> >> - Dan >> >> ""Dan"" <[EMAIL PROTECTED]> wrote in message >> news:[E

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Jim Lucas
Fredrik Thunberg wrote: Dan skrev: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assigning a value to an

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
While we are on the subject of certain dates, does this date mean anything? :) Tue, Nov-30-99 12:00:00? Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable. Thanks

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 10, 2007, at 10:07 AM, Tijnema wrote: On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: While we are on the subject of certain dates, does this date mean anything? :) Tue, Nov-30-99 12:00:00? November 30th, 1999 - In Seattle, Washington, United States, protests against the WTO meet

Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery

2007-07-10 Thread Richard Heyes
I know that $key holds the sequence of images that are being picked up by glob() - I¹m just trying to figure out a way to use this $key to generate the Next & Previous link. The problem is ­ everything is passed on to a separate page (photo.php) ... What I¹m thinking is determining which Photo Fil

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Tijnema
On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: While we are on the subject of certain dates, does this date mean anything? :) Tue, Nov-30-99 12:00:00? November 30th, 1999 - In Seattle, Washington, United States, protests against the WTO meeting by anti-globalization protesters catch polic

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread David Giragosian
On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: On Jul 10, 2007, at 9:52 AM, David Giragosian wrote: > On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > >> Currently that is the date I get when I try to submit any date >> through the form. I'm sure I just have something messed up in

[PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery

2007-07-10 Thread Rahul Sitaram Johari
I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out ­ like thumbnails, indexes, titles & all ­ the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program where you drop images in a folder and glob() picks

RE: [PHP] ftp_ssl_connect

2007-07-10 Thread Daniel Novotny
When I tried to connect through a telnet session I got the following message: Connection failed: The certificate chain was issued by an authority that is not trusted. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 7:43 PM To: Daniel Novotny Cc: 'php

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 10, 2007, at 9:52 AM, David Giragosian wrote: On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable $taskTi

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread David Giragosian
On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable $taskTime=mktime(int 00,int 00,int 00, int $month, int $day, i

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote: Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); where are you getting the $_POST['txtReschedule'] var from? in the html below, your var is $_POST['tasks'][#]['txtReschedule'] What does

Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
On Jul 9, 2007, at 9:09 AM, Shafiq Rehman wrote: Hi, correct syntax for mktime is mktime( int hour, int minute, int second, int month, int day, int year) When I did that I got this error: "[Tue Jul 10 09:33:12 2007] [error] PHP Parse error: syntax error, unexpected T_LNUMBER in /Volum

RE: [PHP] About Eclipse JVM Termination

2007-07-10 Thread Jay Blanchard
[snip] Do you know the cause of this error? I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02 64bit is installed. Do you know how to fix the following error? if yes how? ** JVM

Re: [PHP] system() call in PHP5 on win2003

2007-07-10 Thread Tijnema
On 7/10/07, Xiaogang <[EMAIL PROTECTED]> wrote: We used to use php 4 on our web server on win2000, and use the system() to call some DOS programs. That how we call it: $cmd = "c:\\Inetpub\\wwwroot\\test.exe"; $last_line = system($cmd, $retval); print ("\nretval =\"". $retval.

Re: [PHP] About Eclipse JVM Termination

2007-07-10 Thread Mario Guenterberg
On Tue, Jul 10, 2007 at 02:25:49AM -0700, Kelvin Park wrote: > Do you know the cause of this error? > I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02 64bit > is installed. > Do you know how to fix the following error? if yes how? > > > **

Re: [PHP] Re: Simple PHP setting arrays with keys question

2007-07-10 Thread Fredrik Thunberg
Dan skrev: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assigning a value to an array which has a key. I

[PHP] About Eclipse JVM Termination

2007-07-10 Thread Kelvin Park
Do you know the cause of this error? I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02 64bit is installed. Do you know how to fix the following error? if yes how? ** JVM termina