[PHP] SOLVED Re: [PHP] problem with composing URL with GET Variables

2007-05-23 Thread Angelo Zanetti
SOLVED. seems that something else was causing the script not to work. Thanks anyway Angelo Zanetti wrote: Dear all. I have a script that is called by an AJAX popup. Now I use an image file to get the path of an image for an tag eg: the $getImageURL is composed as follows: $

Re: [PHP] convert numerical day of week

2007-05-23 Thread Robin Vickery
On 22/05/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Tue, 2007-05-22 at 13:47 -0500, Greg Donald wrote: > On 5/22/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > Nothing said it was important, but why implement a half-assed solution > > when you can implement a superior solution in as mu

Re: [PHP] Re: convert numerical day of week

2007-05-23 Thread Stut
itoctopus wrote: I think what you need is simply something like this: function get_day($int_day){ $arr_day_of_week = array('1'=>'Sunday', '2'=>'Monday', '3'=>'Tuesday', '4'=>'Wednesday', '5'=>'Thurdsay', '6'=>'Friday', '7'=>'Saturday'); } echo(get_day(1)); //will print Sunday Hmm, not s

[PHP] System wide variable

2007-05-23 Thread Darren Whitlen
Hi, I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the file is causing a few problems being accessed so many times. Is it possible t

Re: [PHP] System wide variable

2007-05-23 Thread Stut
Darren Whitlen wrote: I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the file is causing a few problems being accessed so many times

Re: [PHP] System wide variable

2007-05-23 Thread Darren Whitlen
Stut wrote: Darren Whitlen wrote: I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the file is causing a few problems being accessed

Re: [PHP] System wide variable

2007-05-23 Thread John Comerford
How about a table using the mysql memory engine ? Darren Whitlen wrote: Hi, I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the fil

Re: [PHP] System wide variable

2007-05-23 Thread Stut
Darren Whitlen wrote: Stut wrote: Darren Whitlen wrote: I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the file is causing a few

Re: [PHP] System wide variable

2007-05-23 Thread Darren Whitlen
John Comerford wrote: How about a table using the mysql memory engine ? Darren Whitlen wrote: Hi, I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for

Re: [PHP] System wide variable

2007-05-23 Thread Sancar Saran
On Wednesday 23 May 2007 11:52:27 Darren Whitlen wrote: > Hi, > I have a PHP script that reads and updates either a small file or a > mysql database. This script is called from several places every .5 seconds. > > I would like to move this file to a variable for extra speed as the file > is causi

[PHP] Re: PHP Data Mining/Data Scraping

2007-05-23 Thread Shannon Whitty
We are planning to eventually develop a web service and communicate in this fashion but i want to get something up quiclly that is operational while we spec the project in full. Thanks Shannon ""itoctopus"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In case you have no cont

Re: [PHP] PHP Data Mining/Data Scraping

2007-05-23 Thread Shannon Whitty
THanks, I will have far to much data to append to a GET request so a POST is the best option I think. "Myron Turner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> On Sat, May 19, 2007 10:22 pm, Shannon Whitty wrote: >> >>> I'm looking for a piece of software or coding that w

Re: [PHP] PHP Data Mining/Data Scraping

2007-05-23 Thread Shannon Whitty
THanks, I will have far to much data to append to a GET request so a POST is the best option I think. "Myron Turner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> On Sat, May 19, 2007 10:22 pm, Shannon Whitty wrote: >> >>> I'm looking for a piece of software or coding that wil

[PHP] Re: System wide variable

2007-05-23 Thread Kostas Papadimitriou
Darren Whitlen wrote: Hi, I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the file is causing a few problems being accessed so many

Re: [PHP] PHP Data Mining/Data Scraping

2007-05-23 Thread Shannon Whitty
THanks, I will have far to much data to append to a GET request so a POST is the best option I think. "Myron Turner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> On Sat, May 19, 2007 10:22 pm, Shannon Whitty wrote: >> >>> I'm looking for a piece of software or coding that wil

Re: [PHP] PHP Data Mining/Data Scraping

2007-05-23 Thread Shannon Whitty
THanks, That's what I thought... I really only need to check for one value = "success" - anything else should redirect back to the form entry page and display whatever result has been returned from the remote site. cUrl should be able to differentiate between a connection and an application f

[PHP] Creating process and do actions with signals

2007-05-23 Thread lists
Hi, I have this script testing.php that I run on a Linux machine thru the command line. In the end of the file you see two cases. One where it is just having a while(true) loop doing nothing, and the other calling an other script that is doing nothing but doesn't exit. When I send SIGTERM

[PHP] php upload files

2007-05-23 Thread kats Ant
Hi all a i am running a windows 2003 server with IIS. I have created a php script that uploads a file to a server. in the server i have users and a user1 has permission to folder1, user2 has permissions to folder2. I want an administrator to run the script and upload a file to these foldes. h

Re: [PHP] System wide variable

2007-05-23 Thread Jochem Maas
Darren Whitlen wrote: > Hi, > I have a PHP script that reads and updates either a small file or a > mysql database. This script is called from several places every .5 seconds. assuming your using a real OS whilst your figuring out an even better way to do it you might consider sticking the s

[PHP] Re: php upload files

2007-05-23 Thread itoctopus
As far as I remember, IIS used to have a reserved user that it ran all its actions under. All you have to do is to give this user the necessary permissions (I remember the username started with I). Here's a link that might help : http://support.microsoft.com/kb/812614 -- itoctopus - http://www

[PHP] How to eject cd-rom with php code?

2007-05-23 Thread Chetan Graham
Hi all, I am writing a script and need to eject the cd-rom drive at some point. Does anyone have an idea how to do this? This is a simple command isn't it? I greatly appreciate your help Blessings, Chetanji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

RE: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Jim Moseby
> Hi all, > I am writing a script and need to eject the cd-rom drive at > some point. > Does anyone have an idea how to do this? > This is a simple command isn't it? > I greatly appreciate your help > Blessings, > Chetanji Found this little snippet on the php.net site. ( http://us2.php.net/manual

RE: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Jim Moseby
> > Hi all, > > I am writing a script and need to eject the cd-rom drive at > > some point. > > Does anyone have an idea how to do this? > > This is a simple command isn't it? > > I greatly appreciate your help > > Blessings, > > Chetanji > > Found this little snippet on the php.net site. ( > htt

Re: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Andrew Brampton
If you are on linux just shell out the linux eject command (which should eject the drive for you). If you are on windows (or another OS), then I'm sure you can still find a similar commnad line app that will do the same task. There isn't a built in way in PHP. Andrew - Original Message --

Re: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Zoltán Németh
exec("eject"); on linux/unix greets Zoltán Németh 2007. 05. 23, szerda keltezéssel 14.23-kor Chetan Graham ezt írta: > Hi all, > I am writing a script and need to eject the cd-rom drive at some point. > Does anyone have an idea how to do this? > This is a simple command isn't it? > I greatly app

RE: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Edward Kay
> -Original Message- > From: Chetan Graham [mailto:[EMAIL PROTECTED] > Sent: 23 May 2007 12:23 > To: php-general@lists.php.net > Subject: [PHP] How to eject cd-rom with php code? > > > Hi all, > I am writing a script and need to eject the cd-rom drive at some point. > Does anyone have a

Re: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Chris Boget
I am writing a script and need to eject the cd-rom drive at some point. Does anyone have an idea how to do this? This is a simple command isn't it? I greatly appreciate your help http://us.php.net/manual/en/function.system.php http://bama.ua.edu/cgi-bin/man-cgi?eject+1 thnx, Chris -- PHP Gen

Re: [PHP] convert numerical day of week

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 10:31 +0300, Robin Vickery wrote: > On 22/05/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-05-22 at 13:47 -0500, Greg Donald wrote: > > > On 5/22/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > Nothing said it was important, but why implement a half-as

[PHP] Embedded Image from Database

2007-05-23 Thread Bagus Nugroho
I was trying to put embedded image on HTML Mail using PHP Mailer, my problem is my image does not located on filesystem but located within MySQL Server. How I can put image from database into HTML Mail. Thanks in advance, bgs

Re: [PHP] convert numerical day of week

2007-05-23 Thread Greg Donald
On 5/23/07, Robin Vickery <[EMAIL PROTECTED]> wrote: they're all bloated: print jddayofweek($day_number, 1); Must go --enable-calendar now :) -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Include???

2007-05-23 Thread Dan Shirah
Okay, I think I'm doing everything right, but for whatever reason my include isn't working. The echo of my status_code retruns the correct value so the if should trigger. This is my include page: VERY simple, but for some reason is not working

Re: [PHP] Include???

2007-05-23 Thread Greg Donald
On 5/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. == not = -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Include???

2007-05-23 Thread Darren Whitlen
Dan Shirah wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. The echo of my status_code retruns the correct value so the if should trigger. This is my include page: VERY simple, but for some reason is not working change this line: i

Re: [PHP] Embedded Image from Database

2007-05-23 Thread Greg Donald
On 5/23/07, Bagus Nugroho <[EMAIL PROTECTED]> wrote: I was trying to put embedded image on HTML Mail using PHP Mailer, my problem is my image does not located on filesystem but located within MySQL Server. How I can put image from database into HTML Mail. How do you view the images now? That

Re: [PHP] convert numerical day of week

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 09:23 -0500, Greg Donald wrote: > On 5/23/07, Robin Vickery <[EMAIL PROTECTED]> wrote: > > they're all bloated: > > > > print jddayofweek($day_number, 1); > > Must go --enable-calendar now :) Awww, I didn't notice it's a compile flag... hmmm, not so portable that way. Somet

Re: [PHP] Include???

2007-05-23 Thread Daniel Brown
On 5/23/07, Greg Donald <[EMAIL PROTECTED]> wrote: On 5/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > Okay, I think I'm doing everything right, but for whatever reason my include > isn't working. > > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { == not = -- Greg Donald ht

[PHP] Form Validation Issues

2007-05-23 Thread kvigor
Hi, I have an issue with a particular if statement when I check 3 form fields for their value. The problem is no matter what input is entered in the fields the output is the same. I only added the 3 fields in question of the form to reduce heartache for the readers of this post. Output alway

Re: [PHP] Include???

2007-05-23 Thread Richard Davey
Hi Dan, Wednesday, May 23, 2007, 3:24:11 PM, you wrote: > Okay, I think I'm doing everything right, but for whatever reason my include > isn't working. > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { > include ('complete_save.php'); > } ?>> > The echo of my status_code re

Re: [PHP] Include???

2007-05-23 Thread Alister Bulman
On 23/05/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. if ($_POST['status_code'] = "C") { It's a pretty classic error, Not one that I make very often though - because I will generally write: if ('C' = $_POS

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 07:41 -0500, kvigor wrote: > > if($field == "conState" || $field == "schState" || $field == "strState") > //if these 3 fields are entered >{ >if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' || $value!= > 'AK' || $value != 'Arizona' || $value!= 'AZ'

[PHP] zend framework

2007-05-23 Thread Greg Donald
Has anyone looked at the Zend Framework lately? http://framework.zend.com/manual I've been playing with a few parts of it off and on the past couple of days. It seems really heavy overall and there is no Javascript integration anywhere. Nothing on the roadmap about Javascript either: http://f

Re: [PHP] Form Validation Issues

2007-05-23 Thread Zoltán Németh
2007. 05. 23, szerda keltezéssel 07.41-kor kvigor ezt írta: > Hi, > > I have an issue with a particular if statement when I check 3 form fields > for their value. The problem is no matter what input is entered in the > fields the output is the same. I only added the 3 fields in question of the

Re: [PHP] Form Validation Issues

2007-05-23 Thread Daniel Brown
On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: Hi, I have an issue with a particular if statement when I check 3 form fields for their value. The problem is no matter what input is entered in the fields the output is the same. I only added the 3 fields in question of the form to reduce heartac

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: The code is: "Consumer Name", "conAddress" => "Consumer Address", "conCity" => "Consumer City", "conState" => "Consumer State", "conZip" => "Consumer Zip Code", "conPhone" => "Consumer Phone", "schName" => "School Name",

Re: [PHP] Form Validation Issues

2007-05-23 Thread kvigor
Thanks Dan, Work like a dream. I solute you. ""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I have an issue with a particular if statement when I check 3 form fields >> for their value. The problem is

[PHP] Re: System wide variable

2007-05-23 Thread Al
Take a look at SQLite Darren Whitlen wrote: Hi, I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the file is causing a few problems

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 10:17 -0500, kvigor wrote: > Thanks Dan, > > Work like a dream. I solute you. Don't look now Dan... but you're dissolving!!! *hehe* Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com

Re: [PHP] Include???

2007-05-23 Thread Jim Lucas
Dan Shirah wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. The echo of my status_code retruns the correct value so the if should trigger. This is my include page: VERY simple, but for some reason is not working I think to this point

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 10:10 -0500, Greg Donald wrote: > On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: > > [-- SNIPPITY SNIP SNIP --] > > != 'Texas' || $value!= 'TX' || $value != 'Utah' || $value!= 'UT' || $value > > != 'Vermont' || $value!= 'VT' || $value != 'Virginia' || $value!= 'VA' || > > $valu

Re: [PHP] Include???

2007-05-23 Thread Daniel Brown
On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > Okay, I think I'm doing everything right, but for whatever reason my > include > isn't working. > > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { > include ('complete_save.php'); > } > ?> > > The echo of my

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
On 5/23/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > You should really look into learning in_array() for stuff like this. Wouldn't that slow things down and increase the memory footprint? ;) It'd be interesting to see a benchmark. -- Greg Donald http://destiney.com/ -- PHP General Maili

Re: [PHP] Form Validation Issues

2007-05-23 Thread Jim Lucas
kvigor wrote: if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' || $value!= 'AK' || $value != 'Arizona' || $value!= 'AZ' || $value != 'Arkansas' || $value!= 'AR' || $value != 'California' || $value!= 'CA' || $value != 'Colorado' || $value!= 'CO' || $value != 'Conneticut' || $valu

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 10:55 -0500, Greg Donald wrote: > On 5/23/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > You should really look into learning in_array() for stuff like this. > > > > Wouldn't that slow things down and increase the memory footprint? ;) > > It'd be interesting to see a be

[PHP] Re: Form Validation Issues

2007-05-23 Thread Jared Farrish
Having a giant conditional statement such as the one you have posted is a real problem for many different reasons. Below is a simple states class that allows you to test for a state using a couple of different checks (such as making both comparables lower or upper case). One major issue with the c

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: $states['TN'] => 'Tennesee'; :%s/Tennesee/Tennessee/ -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Ok, here is something that might help you. $states['AL'] => 'Alabama'; $states['AK'] => 'Alaska'; And a little something for you as well: :%s/=>/=/g -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] Re: Form Validation Issues

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 11:16 -0500, Jared Farrish wrote: > > Abraham Maslow: "If the only tool you have is a hammer, you tend to see > every problem as a nail." $$ Robert Cummings: "if every problem can be described as a nail, then all you need is a hammer." Cheers, Rob. -- .---

[PHP] Re: Form Validation Issues

2007-05-23 Thread Jared Farrish
Also, Indiana and Connecticut were misspelled. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

Re: [PHP] Form Validation Issues

2007-05-23 Thread Jim Lucas
Greg Donald wrote: On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Ok, here is something that might help you. $states['AL'] => 'Alabama'; $states['AK'] => 'Alaska'; And a little something for you as well: :%s/=>/=/g oops, did over look that one -- Jim Lucas "Some men are born to gre

Re: [PHP] Form Validation Issues

2007-05-23 Thread Jim Lucas
Greg Donald wrote: On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: $states['TN'] => 'Tennesee'; :%s/Tennesee/Tennessee/ Not my typo, this was the ops list just reformatted. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon

[PHP] Form Processing Question - Empty Fields

2007-05-23 Thread Stephen
I have a script to process the post from a form. The form is used to upload photos and has fields for the filename, alt text, caption and a checkbox to indicate if this photo is the main page image rotation. I wanted to build a general routine to build the form to allow for a varying

Re: [PHP] Include???

2007-05-23 Thread Jim Lucas
Daniel Brown wrote: On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > Okay, I think I'm doing everything right, but for whatever reason my > include > isn't working. > > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { > include ('complete_save.php'); > } >

Re: [PHP] Include???

2007-05-23 Thread Tijnema
On 5/23/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: > > Dan Shirah wrote: > > Okay, I think I'm doing everything right, but for whatever reason my > > include > > isn't working. > > > > > echo $_POST['status_code']; > > if ($_POST['status_code'] =

Re: [PHP] Form Processing Question - Empty Fields

2007-05-23 Thread Tijnema
On 5/23/07, Stephen <[EMAIL PROTECTED]> wrote: I have a script to process the post from a form. The form is used to upload photos and has fields for the filename, alt text, caption and a checkbox to indicate if this photo is the main page image rotation. I wanted to build a general routine

Re: [PHP] Re: Form Validation Issues

2007-05-23 Thread Greg Donald
On 5/23/07, Robert Cummings <[EMAIL PROTECTED]> wrote: Robert Cummings: "if every problem can be described as a nail, then all you need is a hammer." Don't you ever get the urge to swing a different hammer? I sure do. As I watch PHP de-evolve into Java, I find myself wanting somethi

Re: [PHP] Include???

2007-05-23 Thread Greg Donald
On 5/23/07, Tijnema <[EMAIL PROTECTED]> wrote: include is a control structure, I believe it isn't required, but preferred to use the include without (), like this: include "complete_save.php"; What variable or escape sequence are you interpolating in that double quoted string? include 'complet

[PHP] problems in WHERE statment

2007-05-23 Thread Mike Ryan
I am a newbie so please bear with me. I get this error message when I try to run a query Connected successfullyCould not successfully run query () from DB: Unknown column '$today' in 'where clause' this is the query command $query = 'SELECT * FROM `job listing` WHERE open >=$today LIMIT 0 , 30

[PHP] format date field

2007-05-23 Thread Mike Ryan
I am reading in a date field from a mysql database the field on the screen shows up as 2007-05-01 on the screen I would like the field to show 05-01-2007 currently I am issueing the following command print $row['open']; how can I format this field??? while I am at it how can I accept the date f

[PHP] date format from a database date field

2007-05-23 Thread Mike Ryan
Sorry I am a bit of a newbie with php and hope this has not been aswered a million times, but here it goes I have a date base with a couple of date fields when I pull up and display the fields it show 2007-05-21. the question I have is how to convert the field to 05-21-2007? Currently the command

Re: [PHP] problems in WHERE statment

2007-05-23 Thread Greg Donald
On 5/21/07, Mike Ryan <[EMAIL PROTECTED]> wrote: I am a newbie so please bear with me. I get this error message when I try to run a query Connected successfullyCould not successfully run query () from DB: Unknown column '$today' in 'where clause' this is the query command $query = 'SELECT * F

Re: [PHP] format date field

2007-05-23 Thread Greg Donald
On 5/23/07, Mike Ryan <[EMAIL PROTECTED]> wrote: I am reading in a date field from a mysql database the field on the screen shows up as 2007-05-01 on the screen I would like the field to show 05-01-2007 currently I am issueing the following command print $row['open']; how can I format this fie

Re: [PHP] Include???

2007-05-23 Thread Daniel Brown
On 5/23/07, Greg Donald <[EMAIL PROTECTED]> wrote: On 5/23/07, Tijnema <[EMAIL PROTECTED]> wrote: > include is a control structure, I believe it isn't required, but > preferred to use the include without (), like this: > include "complete_save.php"; What variable or escape sequence are you inte

Re: [PHP] zend framework

2007-05-23 Thread Aaron Gould
I've been experimenting with it for a new site revision at the company I work at. I have to agree, it's feels heavy, almost bloated. Mind you, I've only used a small fraction of the framework -- namely the Zend_Db, Zend_Config and Zend_Controller portions. The lack of Javascript seems like a

Re: [PHP] date format from a database date field

2007-05-23 Thread Daniel Brown
On 5/21/07, Mike Ryan <[EMAIL PROTECTED]> wrote: Sorry I am a bit of a newbie with php and hope this has not been aswered a million times, but here it goes I have a date base with a couple of date fields when I pull up and display the fields it show 2007-05-21. the question I have is how to con

Re: [PHP] problems in WHERE statment

2007-05-23 Thread Davi
Em Segunda 21 Maio 2007 16:46, Mike Ryan escreveu: > I get this error message when I try to run a query > > Connected successfullyCould not successfully run query () from DB: Unknown > column '$today' in 'where clause' > > this is the query command > $query = 'SELECT * > FROM `job listing` > WHERE

[PHP] Swinging Hammers (was Re: Form Validation Issues)

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 11:51 -0500, Greg Donald wrote: > On 5/23/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > Robert Cummings: > > > > "if every problem can be described as a nail, then all you > > need is a hammer." > > Don't you ever get the urge to swing a different hammer? > > I

Re: [PHP] Form Processing Question - Empty Fields

2007-05-23 Thread Greg Donald
On 5/23/07, Tijnema <[EMAIL PROTECTED]> wrote: Again, this is Off topic, /me rolls eyes Do you even know what P-H-P stands for? HTML questions are not off topic, especially form related ones. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] format date field

2007-05-23 Thread Kevin Murphy
Leave the date as is, its a MySQL thing. To format it on your page, use the date function: $formattedDate = date("m-d-Y",strtotime($row["open"])); http://us2.php.net/manual/en/function.date.php -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.

Re: [PHP] problems in WHERE statment

2007-05-23 Thread Eric Butera
On 5/21/07, Mike Ryan <[EMAIL PROTECTED]> wrote: I am a newbie so please bear with me. I get this error message when I try to run a query Connected successfullyCould not successfully run query () from DB: Unknown column '$today' in 'where clause' this is the query command $query = 'SELECT * F

Re: [PHP] problems in WHERE statment

2007-05-23 Thread Daniel Brown
On 5/23/07, Greg Donald <[EMAIL PROTECTED]> wrote: On 5/21/07, Mike Ryan <[EMAIL PROTECTED]> wrote: > I am a newbie so please bear with me. > > I get this error message when I try to run a query > > Connected successfullyCould not successfully run query () from DB: Unknown > column '$today' in '

[PHP] Re: problems in WHERE statment

2007-05-23 Thread Jared Farrish
Change the single quote to a double quote: $query = "SELECT * FROM `job listing` WHERE open >= '$today' LIMIT 0 , 30 "; This tells the PHP string parser to replace all declared, in-scope variables that are detected in a string with the value of the variable (as a toString() method, so a refere

Re: [PHP] Include???

2007-05-23 Thread Dan Shirah
Thank you for all of the quick responses. I guess jumping between ColdFusion, PHP and Informix all day long got the better of me. Thanks again! Dan On 5/23/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 5/23/07, Greg Donald <[EMAIL PROTECTED]> wrote: > > On 5/23/07, Tijnema <[EMAIL PROTECTE

[PHP] Re: date format from a database date field

2007-05-23 Thread Johan Holst Nielsen
Mike Ryan wrote: Sorry I am a bit of a newbie with php and hope this has not been aswered a million times, but here it goes I have a date base with a couple of date fields when I pull up and display the fields it show 2007-05-21. the question I have is how to convert the field to 05-21-2007? Cu

[PHP] Re: How to eject cd-rom with php code?

2007-05-23 Thread Colin Guthrie
Chetan Graham wrote: > Hi all, > I am writing a script and need to eject the cd-rom drive at some point. > Does anyone have an idea how to do this? > This is a simple command isn't it? > I greatly appreciate your help Seeing as everyone is telling you to use "exec('eject')" to eject your disk I'll

[PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Rahul Sitaram Johari
Ave, Apache 2.2, PHP5 & mySQL 5 on Windows 2003. I have some files sitting on a Network Drive accessible on the Windows 2003 Server. But my php script is not able to open the files. Let¹s say there¹s a database on X:\Transfer\test.dbf If I use: $db = dbase_open(³X:\Transfer\test.dbf², 0); It i

RE: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jay Blanchard
[snip] Let¹s say there¹s a database on X:\Transfer\test.dbf If I use: $db = dbase_open(³X:\Transfer\test.dbf², 0); It is not able to open the database. The X: Drive is a network drive. Any clues on how to make this happen? [/snip] Have you checked the permissions? -- PHP General Mailing List (h

Re: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Rahul Sitaram Johari
Well, Full Permissions (Full Control, including read & write) have been given to the Machine on which the Apache Web Server is setup. Not sure if anything else needs to be done! On 5/23/07 3:02 PM, "Jay Blanchard" <[EMAIL PROTECTED]> wrote: > [snip] > Let¹s say there¹s a database on X:\Transfer

Re: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Tijnema
On 5/23/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote: Well, Full Permissions (Full Control, including read & write) have been given to the Machine on which the Apache Web Server is setup. Not sure if anything else needs to be done! The \ is an escape token, and you should use \\ instead.

[PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jared Farrish
Other than permissions, you might be referencing the folder by the local network mapping drive initial, instead of the actual path: X:\\offsite\db\test.dbf == \\compname-x\offsite\db\test.dbf Generally, I like using the computer name and not a mapping. I find this name-based address through the

[PHP] Re: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jared Farrish
Oh yeah, and tijnema has a good point: \\compname-x\\offsite\\db\\test.dbf Btw, what does top post mean? On 5/23/07, Jared Farrish <[EMAIL PROTECTED]> wrote: Other than permissions, you might be referencing the folder by the local network mapping drive initial, instead of the actual path: X:

Re: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Rahul Sitaram Johari
Didn't help. Tried X:\\Transfer\\test.dbf Still can't access the file. On 5/23/07 3:11 PM, "Tijnema" <[EMAIL PROTECTED]> wrote: > The \ is an escape token, and you should use \\ instead. > > Try X:\\Transfer\\test.dbf instead. > > Tijnema > > ps. Please don't top post. -- PHP General Maili

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Rahul Sitaram Johari
Tried that too. Used \\Servername\sharename\test.dbf Also used additional backslashes for the escape issue: Servername\\sharename\\test.dbf Still doesn't work! I'm not getting a permissions related issue and I'm doubting it is a permissions issue. I have Full Control given to the system al

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jared Farrish
Try to simply include() and var_dump() or something. Start from just checking you can access the file first (I'd even start with a test.txtfile), before you inflate the db... Let us know what the error is exactly, as well. What happens? Error? Warning? Blank page? What tells you the script doesn'

Re: [PHP] Re: Form Validation Issues

2007-05-23 Thread Crayon Shin Chan
On Thursday 24 May 2007 00:51, Greg Donald wrote: > As I watch PHP de-evolve into Java, I find myself wanting something > lighter weight and with a smaller syntax. PHP has long since spawned into something uncontrollable. Compare the number of functions (and its aliases) to eg Ruby. The string

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Rahul Sitaram Johari
I've been trying to run various entry level functions on the file, like file_exists(), isreadable() etcetera But no matter what I do, I pretty much get the "cannot open" warnings without much specification as to Why cannot open. So when I do the dbase_open() function, and I've tried all diff

[PHP] Weird behaviour with move_uploaded_file on CGI version of PHP.

2007-05-23 Thread Brett Davidson
Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3 CGI under SuExec in FastCGI mode. Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix permissions 600 (read and write for user only) regardless of ownership, directory or umask settings. This works fine with

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Rahul Sitaram Johari
I use a Mac OS X Server generally, where I mount network drives to a share point. Everything works therein. Recently I had a need to setup Apache Web Server, PHP & mySQL on a Windows 2003 Server we have in the office. There I used the same scripts I was running on Mac OS X to access files on a ne

[PHP] Include file questions

2007-05-23 Thread Stephen
1) Does the filename extension matter? I prefer *.inc? It seems to work fine, but I only see others using *.php 2) Does the include file need an opening ? Not big issues, but I am curious. Thanks Stephen

[PHP] PHP needs better funtion organization, naming and parameter specifications. WAS: Form Validation Issues

2007-05-23 Thread Daevid Vincent
> On Thursday 24 May 2007 00:51, Greg Donald wrote: > > As I watch PHP de-evolve into Java, I find myself wanting something > > lighter weight and with a smaller syntax. > > PHP has long since spawned into something uncontrollable. Compare the > number of functions (and its aliases) to eg Ruby.

Re: [PHP] Include file questions

2007-05-23 Thread Kevin Murphy
.inc files have a disadvantage in that if you view the file: http://www.yoursite.com/file.inc you can see the php code. I prefer not to use those just on the off chance that someone can see my code and use that as the basis for figuring out a way to exploit it (especially true of password fi

  1   2   >