Re: [PHP] Help with php server and sockets

2007-05-23 Thread Robert Cummings
On Wed, 2007-05-23 at 16:24 -0700, Adz07 wrote: i want to set up a php server that can communicate with a client (CLI PHP Script). I can setup the server socket fine. What i need to know is whether it is possible for the client to call a function in the servers php code and the server return

[PHP] ftp_put() problem??

2007-05-23 Thread Al
Can anyone help with this. On a Linux/Apache server. I want to simply copy a file with ftp_put() from one dir to another. To make certain I'm pointing to the correct dirs, I'm using this: print_r(ftp_nlist($conn_id, FTP_EP_DIR)); //It is the correct dir print_r(ftp_nlist($conn_id, $rpdir));

[PHP] help with multi dimensional arrays

2007-05-23 Thread James Lockie
I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = Starting with $newTypes[0][1] = strlen( $newTypes[0][0] ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Micky Hulse
Looks like you are missing a comma on line 3. James Lockie wrote: I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = Starting with $newTypes[0][1] = strlen( $newTypes[0][0] ); -- Wishlists: http://snipurl.com/1gqpj Switch:

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Paul Novitski
Looks like you are missing a comma on line 3. James Lockie wrote: I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = Starting with $newTypes[0][1] = strlen( $newTypes[0][0] ); Missing semicolon; Paul -- PHP General Mailing List

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

2007-05-23 Thread Jim Lucas
Rahul Sitaram Johari wrote: 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. Try a

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread James Lockie
Paul Novitski wrote: Looks like you are missing a comma on line 3. James Lockie wrote: I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = Starting with $newTypes[0][1] = strlen( $newTypes[0][0] ); Missing semicolon; Paul Argh,

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

2007-05-23 Thread Jim Lucas
Rahul Sitaram Johari wrote: 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 =

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Greg Donald
On 5/23/07, James Lockie [EMAIL PROTECTED] wrote: Argh, that is the worst error. :-( The error messages in PHP suck. When I run your code it says: Parse error: syntax error, unexpected T_VARIABLE in /opt/local/apache2/htdocs/missing.php on line 5 If you did not get a similar error you may

[PHP] Database error: Invalid SQL:

2007-05-23 Thread wisuttorn
I have a problem please help me when i loged in to egroup this show Database error: Invalid SQL: SELECT DISTINCT egw_cal_repeats.*,egw_cal.*,cal_start,cal_end,cal_recur_date FROM egw_cal JOIN egw_cal_dates ON egw_cal.cal_id=egw_cal_dates.cal_id JOIN egw_cal_user ON

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Steve Finkelstein
Might I suggest using an IDE to develop your code in. It would be able to spot simple oversights such as syntax errors. I personally use Zend Studio, however if you aren't looking to invest in a license, there are plenty of open source solutions out there. Cheers, - sf James Lockie wrote: Paul

Re: [PHP] Database error: Invalid SQL:

2007-05-23 Thread Chris
wisuttorn wrote: I have a problem please help me when i loged in to egroup this show Database error: Invalid SQL: SELECT DISTINCT egw_cal_repeats.*,egw_cal.*,cal_start,cal_end,cal_recur_date FROM egw_cal JOIN egw_cal_dates ON egw_cal.cal_id=egw_cal_dates.cal_id JOIN egw_cal_user ON

[PHP] problem with composing URL with GET Variables

2007-05-23 Thread Angelo Zanetti
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 img tag eg: img border=0 id=middleImage name=middleImage src=? echo $getImageURL; ? the $getImageURL is composed as follows: $getImageURL =

[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 img tag eg: img border=0 id=middleImage name=middleImage

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 much time?

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 so

[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

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

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

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

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 causing a

[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 control on

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 will let me

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 will let me

[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 will let me

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

[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

[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.

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

[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 -

[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:

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. (

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. (

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

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 an idea

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 ?php system( 'eject [-dfnpq] [device | nickname]' ); ? http://us.php.net/manual/en/function.system.php

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-assed solution

[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. ?php echo $_POST['status_code']; if ($_POST['status_code'] = C) { include ('complete_save.php'); } ? The echo of my status_code retruns the correct value so the if should trigger. This is my include

[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. ?php echo $_POST['status_code']; if ($_POST['status_code'] = C) { include ('complete_save.php'); } ? The echo of my status_code retruns the correct value so the if should trigger.

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. Something tells

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. ?php echo $_POST['status_code']; if ($_POST['status_code'] = C) { == not = -- Greg Donald

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' || $value

[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:

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 Greg Donald
On 5/23/07, kvigor [EMAIL PROTECTED] wrote: The code is: ?php $label_array = array (conName = Consumer Name, conAddress = Consumer Address, conCity = Consumer City, conState = Consumer State, conZip = Consumer Zip Code, conPhone = Consumer Phone, schName = School

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 no matter what

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. ?php echo $_POST['status_code']; if ($_POST['status_code'] = C) { include ('complete_save.php'); } ? The echo of my status_code retruns the correct value so the if should trigger.

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' || $value !=

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. ?php 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 Mailing

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' ||

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 benchmark.

[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

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

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

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. ?php echo $_POST['status_code']; if ($_POST['status_code'] = C) { include ('complete_save.php'); } ? The

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. ?php echo $_POST['status_code']; if ($_POST['status_code'] = C) {

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 something

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

[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

[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

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 *

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

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

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

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

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 open

[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 sure do. 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

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

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 *

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 'where

[PHP] Re: problems in WHERE statment

2007-05-23 Thread Jared Farrish
Change the single quote to a double quote: code $query = SELECT * FROM `job listing` WHERE open = '$today' LIMIT 0 , 30 ; /code 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

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 PROTECTED]

[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?

[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

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

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

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:

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 Mailing List

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

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

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

  1   2   >