php-general Digest 28 Oct 2006 22:12:24 -0000 Issue 4427

2006-10-28 Thread php-general-digest-help
php-general Digest 28 Oct 2006 22:12:24 - Issue 4427 Topics (messages 243787 through 243806): Re: Shopping Cart 243787 by: chris smith 243788 by: CK 243791 by: Stut 243792 by: CK 243793 by: Greg Maruszeczka 243795 by: Ed Lazor Re: heredoc

Re: [PHP] Upload not finding directory to write to.

2006-10-28 Thread Robert Cummings
On Sat, 2006-10-28 at 14:49 +0900, Dave M G wrote: PHP List, I had a file upload script which was working fine. Then, because of other needs, I changed my local Apache settings so that my local web site directory structure behaved the same as they do on my web hosting service. What I

Re: [PHP] Shopping Cart

2006-10-28 Thread CK
Hi, Yes, I have and thought I was seeking the assistance of knowledgeable colleagues . The solution researched does not offer the desired features. I was not asking for code, but perhaps some solutions/ applications to explore. CK PS I don't appreciate being scolded. On Oct 27, 2006,

Re: [PHP] Shopping Cart

2006-10-28 Thread chris smith
I don't appreciate being scolded. Spend some time on the list and see how many times this question (or type of question) gets asked and how many people actually do *some* sort of work for themselves and you'll appreciate why people ask this straight away. If you had said I found product X Y

Re: [PHP] Shopping Cart

2006-10-28 Thread CK
Hi, I'm new to the list, and PHP. My assumption was others who have asked similar questions, would have, like myself, done research. So I thought no need to clarify. I'm aware these list are not a do my homework solution. However, having received a verbally abusive retort, when

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Nisse Engström
On Thu, 26 Oct 2006 13:10:17 -0400, Robert Cummings wrote: On Thu, 2006-10-26 at 11:43 +0200, clive wrote: or you could write it likes this ' echo option value='$day' $selected $day /option; much easier to read, but slightly more taxing on the server. Also slightly more taxing on

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Nisse Engström
On Thu, 26 Oct 2006 01:04:25 -0700, Paul Novitski wrote: It's so interesting that some details bug some people and others bug others. In an expression such as this: echo 'option value=' . $day . '' . $selected . '' . $day . '/option'; ...I count eight transitions (instances

Re: [PHP] Shopping Cart

2006-10-28 Thread Stut
CK wrote: I'm new to the list, and PHP. My assumption was others who have asked similar questions, would have, like myself, done research. So I thought no need to clarify. I'm aware these list are not a do my homework solution. However, having received a verbally abusive retort, when

Re: [PHP] Shopping Cart

2006-10-28 Thread CK
On Oct 28, 2006, at 8:52 AM, Stut wrote: CK wrote: I'm new to the list, and PHP. My assumption was others who have asked similar questions, would have, like myself, done research. So I thought no need to clarify. I'm aware these list are not a do my homework solution. However, having

Re: [PHP] Shopping Cart

2006-10-28 Thread Greg Maruszeczka
CK, With the obligatory chastisement and ensuing defensiveness out of the way :) you may want to check out Zen Cart (zen-cart.com) and see if it meets your requirements. Cheers, G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Paul Novitski
On Thu, 26 Oct 2006 01:04:25 -0700, Paul Novitski wrote: It's so interesting that some details bug some people and others bug others. In an expression such as this: echo 'option value=' . $day . '' . $selected . '' . $day . '/option'; ...I count eight transitions (instances of

Re: [PHP] Shopping Cart

2006-10-28 Thread Ed Lazor
Be specific in stating what prior research has been done so that we may help, if possible. Point noted. Helping out further, you'll find that this rule applies to almost all mailing lists. 2) We don't owe you anything. If you decide to go elsewhere for help don't expect us to feel

[PHP] Uploading files.

2006-10-28 Thread Jo�o C�ndido de Souza Neto
Hi everyone. I´m in a big doubt about uploading files ins a safe way. I wont give permission for the web server user to write in some folder of my system and then use move_uploaded_file function in order to keep it secure. I was using ftp functions to do it but a get a new trouble, in some

Re: [PHP] Uploading files.

2006-10-28 Thread Ed Lazor
Side note on the PHP FTP... I'm sure there are PHP FTP classes out there for you to use... google php ftp class and you'll see a few options to explore. On Oct 28, 2006, at 10:47 AM, João Cândido de Souza Neto wrote: Hi everyone. I´m in a big doubt about uploading files ins a safe way.

Re: [PHP] Re: PHP Sessions || Problems with AOL, Safari, etc.

2006-10-28 Thread Ed Lazor
Check php.ini session settings. There are some options in there for you to use in your scripts. Set up scripts to test whether session cookies are being saved and then route accordingly. On Oct 28, 2006, at 12:41 PM, sit1way wrote: Hey all. I run a members-only hockey report that

[PHP] A general UL script

2006-10-28 Thread Børge Holen
When I use a normal single file upload form; both of these statements will continue wether my form is empty or not, why? if(!empty($_FILES)){ do som checking if its a jpg. if not exit; if(isset($_FILES)){ -- --- Børge Kennel Arivene http://www.arivene.net --- -- PHP General

[PHP] Re: PHP Sessions || Problems with AOL, Safari, etc.

2006-10-28 Thread sit1way
Hey all. I run a members-only hockey report that relies on Session variable(s) to grant/deny access to members-only site content. Generally members have no trouble accessing members-only content once logged-in to the site; however, since we have a few thousand members, I frequently receive

[PHP] Re: A general UL script

2006-10-28 Thread M.Sokolewicz
Børge Holen wrote: When I use a normal single file upload form; both of these statements will continue wether my form is empty or not, why? if(!empty($_FILES)){ do som checking if its a jpg. if not exit; if(isset($_FILES)){ because it IS set and NOT empty.

Re: [PHP] Re: A general UL script

2006-10-28 Thread Børge Holen
Ok. got that thanks. But that leaves me a bit off to how to tell the script to leave it alone. Is it possible to check it or maby even better. Posible to not add an empty field in the submit. The multifile submit I actually intended this script for, always send the first field empty so later on

Re: [PHP] Re: A general UL script

2006-10-28 Thread Børge Holen
This could also be omitted with the help of NOT use echo irritating reason exit Witch would leave the script running to BREAK on switch out of it all =D YES. Not an elegant solution... but beats whatever I'm doing right now. On Saturday 28 October 2006 23:46, Børge Holen wrote: Ok. got that

[PHP] Query question

2006-10-28 Thread Beauford
Hi, I have a MySQL database with a date field and a bunch of other fields. The date field is in the format - 01/01/2006. What I want to do is query the database and create a table that shows just the year and how many instances of the year there is. I have been taxing my brain for a simple

Re: [PHP] Re: A general UL script

2006-10-28 Thread Ed Lazor
Are you just trying to tell whether the form has been submitted? Or are you just trying to validate form data? -- verify form submitted - if (isset($_POST)) { // form submitted, process data } else { // display form }

Re: [PHP] Re: A general UL script

2006-10-28 Thread Børge Holen
I'm trying to validate wether or not to run the image check script. however empty the file field(s) are This script is started... how do I tell it there is nothing here, go do other stuff. for both multiupload forms and single upload forms since they're supposed to share this script. My logic

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Robert Cummings
On Sat, 2006-10-28 at 13:27 +0200, Nisse Engström wrote: On Thu, 26 Oct 2006 13:10:17 -0400, Robert Cummings wrote: On Thu, 2006-10-26 at 11:43 +0200, clive wrote: or you could write it likes this ' echo option value='$day' $selected $day /option; much easier to read, but

Re: [PHP] OPTION

2006-10-28 Thread Jochem Maas
Robert Cummings wrote: On Fri, 2006-10-27 at 13:51 +0200, Jochem Maas wrote: range(1, 31) Memory waster ;) any idea as to what the damage is as compared to the classic for loop? Given that a variable probably costs X and that any variable cane be stored as Y in an array, and an array would

Re: [PHP] OPTION

2006-10-28 Thread Robert Cummings
On Sun, 2006-10-29 at 01:32 +0200, Jochem Maas wrote: Robert Cummings wrote: On Fri, 2006-10-27 at 13:51 +0200, Jochem Maas wrote: range(1, 31) Memory waster ;) any idea as to what the damage is as compared to the classic for loop? Given that a variable probably costs X and that any

Re: [PHP] A general UL script

2006-10-28 Thread Ed Lazor
You posted this earlier and people, myself included, responded. I don't know why you're reposting your original message rather than reply to what we went. If you're not happy with the answers we provided, please rephrase your question in order that have more luck in answering it. On

Re: [PHP] Query question

2006-10-28 Thread Ed Lazor
Use the mysql list :) On Oct 28, 2006, at 3:01 PM, Beauford wrote: Hi, I have a MySQL database with a date field and a bunch of other fields. The date field is in the format - 01/01/2006. What I want to do is query the database and create a table that shows just the year and how many

Re: [PHP] Query question

2006-10-28 Thread Joe Wollard
Agreed, this should go to a MySQL list. But in the spirit of helping I think the following should give you a good starting point. SELECT `year`, COUNT(`year`) AS `count` FROM `tbl` GROUP BY `year` ASC On 10/28/06, Ed Lazor [EMAIL PROTECTED] wrote: Use the mysql list :) On Oct 28, 2006, at

RE: [PHP] Query question

2006-10-28 Thread Beauford
I posted this here as I figured I would need to manipulate this using PHP. The code below doesn't quite work because the date is in the format of 05/05/2006. So I am getting totals for each date, not each year. I need the totals for each year, regardless of the day or month. This is why I figured

Re: [PHP] Query question

2006-10-28 Thread Joe Wollard
Look into the MySQL YEAR() function to extract the year from a specific date. Start here: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html On 10/28/06, Beauford [EMAIL PROTECTED] wrote: I posted this here as I figured I would need to manipulate this using PHP. The code

[PHP] Re: A general UL script

2006-10-28 Thread Myron Turner
Try this: if(!isset($_FILES['userfile']['name']) || $_FILES['userfile']['error'] == UPLOAD_ERR_NO_FILE) { // the file was not uploaded } else { // do your thing,the file has been uploaded } Børge Holen wrote: When I use a normal single file upload form; both of