RE: [PHP-DB] Re: [PEAR] Pear installation error

2004-10-08 Thread Bastien Koert
You could make life really simple and write csv document (excel loves those as long as you handle the data right)force the file to download with the additional add-type header set to vnd/ms-excel and excel opens it up automagically...much simpler, no? we do this for (gasp) asp data to excel

RE: [PHP-DB] Why does this conditional run, even if not true?

2004-10-08 Thread Bastien Koert
hard to say without the code for the function...what is returned by the fuction determines if the code runs, right? Are you sure the code is returning "YES"? Maybe post the code for the function bastien From: Karen Resplendo <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP-DB] Why does t

[PHP-DB] Why does this conditional run, even if not true?

2004-10-08 Thread Karen Resplendo
$c is a field in an array I have loaded in from a text file. For some reason, none of the conditionals branch off and I end up printing out error messages for every row in the text file. My brackets are balanced, I just didn't include the bottom part: If ($c==9) { If($fieldarray[3]==

Re: [PHP-DB] Help: Arrays with Session Variables not happening

2004-10-08 Thread Stuart Felenstein
K ..my problem seems to be combining echo on the menu values with the print array. If I echo $array[0]; that seems to work fine !? Stuart --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > Back again , sorry :) > > I had my form set up with 7 multi selects , on the > return page, all 7 arrays

[PHP-DB] Help: Arrays with Session Variables not happening

2004-10-08 Thread Stuart Felenstein
Back again , sorry :) I had my form set up with 7 multi selects , on the return page, all 7 arrays were returned correctly. Now that I've changed back 5 to regular menu selects (1 selection), the 2 arrays left won't return the values. The menus work fine. Here is my code: Page 1: Page 2

Re: [PHP-DB] -14 Days Ago

2004-10-08 Thread Janet Valade
Cole S. Ashcraft wrote: I am trying to see whether a data in an array pulled from a MySQL DB (YEARMONTHDATE) is older than 14 days ago. I am trying to do this in PHP. My code looks like: if($array['due'] <= $today - 14) { echo "Assignment In Void:Assignments in the void are read-only"; require(

Re: [PHP-DB] -14 Days Ago

2004-10-08 Thread Cole S. Ashcraft
That would probably work, and its not too hard to do a rows returned check. Richard Hutchins wrote: Cole, I don't know the full context of how you need to do your date math. However, what if, instead of selecting a bunch of data and putting it in an array in PHP then checking to see if its older th

RE: [PHP-DB] -14 Days Ago

2004-10-08 Thread Gryffyn, Trevor
That's probably the best way to go, but if you wanted another way: $mySqlDate = "20041008"; $month = substr($mySqlDate,4,2); $day = substr($mySqlDate,6,2); $year = substr($mySqlDate,0,4); $mySqlDateSerial = mktime(0,0,0,$month,$day,$year); $twoWeeksAgoSerial = mktime(0,0,0,date(&q

RE: [PHP-DB] -14 Days Ago

2004-10-08 Thread Hutchins, Richard
Cole, I don't know the full context of how you need to do your date math. However, what if, instead of selecting a bunch of data and putting it in an array in PHP then checking to see if its older than 14 days you wrote your query to pull only those records that are older than 14 days? Something

Re: [PHP-DB] -14 Days Ago

2004-10-08 Thread metin kale
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html That web page has tons of details. metin Cole S. Ashcraft wrote: I am trying to see whether a data in an array pulled from a MySQL DB (YEARMONTHDATE) is older than 14 days ago. I am trying to do this in PHP. My code looks like: if($a

[PHP-DB] Re: [PEAR] Pear installation error

2004-10-08 Thread Antoine
On 8 Oct 2004 17:03:15 -, Kevin Kraeer <[EMAIL PROTECTED]> wrote: > I'm a one man band working for an ad agency...good times. At any rate, a > client has requested that form values submitted through their website be > written to an excel document. > > I investigated and decided PEAR was probab

Re: [PHP-DB] -14 Days Ago

2004-10-08 Thread Cole S. Ashcraft
I needto do it in PHP, though. Cole Wendell Frohwein wrote: You can trying using the MySQL DATE_ADD() , DATE_SUB , and NOW() functions. -wendell frohwein -Original Message- From: Cole S. Ashcraft [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 11:36 AM To: [EMAIL PROTECTED] Subjec

RE: [PHP-DB] -14 Days Ago

2004-10-08 Thread Wendell Frohwein
You can trying using the MySQL DATE_ADD() , DATE_SUB , and NOW() functions. -wendell frohwein -Original Message- From: Cole S. Ashcraft [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 11:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] -14 Days Ago I am trying to see whether a da

[PHP-DB] -14 Days Ago

2004-10-08 Thread Cole S. Ashcraft
I am trying to see whether a data in an array pulled from a MySQL DB (YEARMONTHDATE) is older than 14 days ago. I am trying to do this in PHP. My code looks like: if($array['due'] <= $today - 14) { echo "Assignment In Void:Assignments in the void are read-only"; require('footer.php'); exit; }.

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Stuart Felenstein
Figured it out. Page 2 had to have the field name in the $SESSION parameters, not the holder from the Page1 array register. Stuart --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > Well I guess too much success at once is a bad > thing. > > For some unapparent reason, the variables here are

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Stuart Felenstein
Well I guess too much success at once is a bad thing. For some unapparent reason, the variables here are not carrying over. Anyone see anything wrong here ? Page1 (Somewhat snipped) Page 2: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> Untitled Document Your cart:\n"; f

Re: [PHP-DB] Dynamic pull down menus with PHP/Mysql

2004-10-08 Thread Antoine
On Fri, 8 Oct 2004 01:12:06 -0400, GH <[EMAIL PROTECTED]> wrote: > For a project in college that I had once did using ColdFusion and > MSAccess (please dont kill me :)) I had the simular situation > > What I did was when the First Drop Down was changed... it had an > onChange action or somethi

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Bastien Koert
see interspered again ;) From: Stuart Felenstein <[EMAIL PROTECTED]> To: Bastien Koert <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: RE: [PHP-DB] Help: First Time Form with Sessions Date: Fri, 8 Oct 2004 08:56:48 -0700 (PDT) See interspersed: --- Bastien Koert <[EMAIL PROTECTED]> wrote: > Hi Stu

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Stuart Felenstein
Yes, right before you answered this I found out about the first line of code by googling. My apologies. Stuart --- "Murray @ PlanetThoughtful" <[EMAIL PROTECTED]> wrote: > Hi Stuart, > > session_start() has to be the first actual codeline > in your page. > > So: > >session_start() >

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Murray @ PlanetThoughtful
Hi Stuart, session_start() has to be the first actual codeline in your page. So: Etc... On the page you're receiving the error on, move "session_start()" to the first line executed in the script. Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, One quirky

Re: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Matt M.
> Warning: session_start(): Cannot send session cookie - > headers already sent by (output started at > /home/lurkkcom/public_html/Multi2Return.php:2) in > /home/lurkkcom/public_html/Multi2Return.php on line 3 read a little more about sessions. session_start is trying to set a cookie but output h

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Stuart Felenstein
See interspersed: --- Bastien Koert <[EMAIL PROTECTED]> wrote: > Hi Stu > > 1. why not check it on every page, then if it fails > the user won't need to > make it to the end and then have to go back to the > beginning to fix > something minor. > > 2. You could use hidden fields to pass the dat

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Bastien Koert
Hi Stu 1. why not check it on every page, then if it fails the user won't need to make it to the end and then have to go back to the beginning to fix something minor. 2. You could use hidden fields to pass the data back and for or just use a session, otherwise the variables expire on that page

[PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Stuart Felenstein
Okay , so I'm working on the multi page form. Insert into DB will come at the last page. Couple of things I want to confirm: 1-Each page should have validiation for each field. Probably doesn't make any sense to wait for last page ? or maybe ? Below is the first page of the form: I only have

RE: [PHP-DB] Importing Excel and Access data to MySQL

2004-10-08 Thread Bomgardner, Mark A
The best way I have found is convert the data to a comma separated value file, use phpMyAdmin and insert the data into you database. A couple of things that you have to watch out for is the number of records that you are importing and that all your fields in your DB are of the correct format and le

Re: [PHP-DB] Re: php_mysql.dll (5.0.2) and libmysql.dll (4.0.20a) incompatibilities

2004-10-08 Thread Sadeq Naqashzade
Hi. I do copy it to my Apache directory and it seems is ok now. but I can not connect to database (php know the functions but raise error and say my client is old) I force use mysqli in replace of mysql functions. and it work. Is there any one know better solution? Regards, Sadeq On Thu, 07 Oc