[PHP-DB] Arrays from forms....

2006-11-30 Thread Gary E. Terry
I have a problem. I have done this before, but can't find the files. I am using the following function to upload files from a form. foreach ($_FILES[pictures][error] as $key = $error) { if ($error == UPLOAD_ERR_OK) { echo $error_codes[$error]; move_uploaded_file(

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: I have a problem. I have done this before, but can't find the files. I am using the following function to upload files from a form. foreach ($_FILES[pictures][error] as $key = $error) { if ($error == UPLOAD_ERR_OK) { echo $error_codes[$error];

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: I don't know if we are on the same page here... Maybe we are and I am just an idiot. The fields in my db are image1 image2 and image3. There are only three fields in the form that is being passed to the php script. But, on the form they are named pictures[]. Here is the

RE: [PHP-DB] Arrays from forms....

2006-11-30 Thread Gary E. Terry
- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, November 30, 2006 10:10 PM To: Gary E. Terry Cc: PHP DB Subject: Re: [PHP-DB] Arrays from forms Gary E. Terry wrote: I don't know if we are on the same page here... Maybe we are and I am just an idiot. The fields in my db are image1

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: Sorry about that, not CC'ing the list... the values are not always empty, they should always have something in them... There should be 3 images uploading. But, I am sure just to make life interesting, there will be times when there could be as little as one uploaded.

RE: [PHP-DB] Arrays from forms....

2006-11-30 Thread Gary E. Terry
- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, November 30, 2006 10:39 PM To: Gary E. Terry Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Arrays from forms Gary E. Terry wrote: Sorry about that, not CC'ing the list... the values are not always empty, they should always have

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: If I print them, there's nothing. all three Here is the same file, in test mode... ?php include db.inc.back.php; foreach ($_FILES[pictures][error] as $key = $error) { if ($error == UPLOAD_ERR_OK) { echo $error_codes[$error]; move_uploaded_file(

RE: [PHP-DB] Arrays from forms....

2006-11-30 Thread Gary E. Terry
Nope... here is the output. -- -- Array ( [error] = ) -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, November 30, 2006 10:56 PM To: Gary E. Terry Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Arrays from forms Gary E. Terry wrote: If I print them

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: Nope... here is the output. -- -- Array ( [error] = ) So files aren't being uploaded properly at all. Does your form have: enctype=multipart/form-data in the form header? ie form name='blah' action='form2.php' enctype=multipart/form-data Are your picture

RE: [PHP-DB] Arrays from forms....

2006-11-30 Thread Gary E. Terry
OK.. I am a moron.. Forgot that I had changed the name of the field in the form, and got sidetracked and didn't change it in the php... But, still not working correctly. Here is the output: Array -- Array -- Array from: ?php include db.inc.back.php; foreach ($_FILES[pictures][error] as

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: OK.. I am a moron.. Forgot that I had changed the name of the field in the form, and got sidetracked and didn't change it in the php... But, still not working correctly. Here is the output: Array -- Array -- Array Oops this: ${image.($key+1)} =

RE: [PHP-DB] Arrays from forms....

2006-11-30 Thread Gary E. Terry
-DB] Arrays from forms Gary E. Terry wrote: OK.. I am a moron.. Forgot that I had changed the name of the field in the form, and got sidetracked and didn't change it in the php... But, still not working correctly. Here is the output: Array -- Array -- Array Oops this: ${image.($key+1

Re: [PHP-DB] Arrays from forms....

2006-11-30 Thread Chris
Gary E. Terry wrote: I know you really meant : ${image.($key+1)} = $_FILES['pictures']['name'][$key]; Oh yeh ;) Glad we got there in the end! :) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Arrays and forms

2003-01-14 Thread Mignon Hunter
Hello list, I submitted this problem earlier but got no response so I thought I'd elaborate. The code below successfully displays all of the problems from the db. Based on what is chosen here, needs to go into another table in the db along with a customer tracking id. for($knt = 0;$row =

Re: [PHP-DB] Arrays and forms

2003-01-14 Thread Jason Wong
On Wednesday 15 January 2003 03:23, Mignon Hunter wrote: Hello list, I submitted this problem earlier but got no response so I thought I'd elaborate. The code below successfully displays all of the problems from the db. Based on what is chosen here, needs to go into another table in the db

[PHP-DB] arrays

2002-11-21 Thread Martin Allan Jensen
Hi everyone, I have a problem sorting my data, I have an array with a flush of values and years from a mysql database. When i have all the values i need php to only print the values, and then group it by year souch that if i had an array that looked like this: Array([2002] = 20,[2002] =

[PHP-DB] Arrays again

2002-11-13 Thread Martin Allan Jensen
Hi everyone, I need a little help again I have a array with 4 values: 320 - 570 - 860 - 960 Each time it extracts one value it's supposed to take minus it with the old value. So that the output for the array above would be: 320 - 250 - 290 - 100 I hope you get the point and you're able

[PHP-DB] Arrays again again

2002-11-13 Thread Martin Allan Jensen
Sorry fellers Allready figured it outsorrynow i see that the question was foolish Anyway now i need help with something else... I now have some values: 320 - 250 - 290 - 100 And years that fits to them: 2002 - 2003 - 2004 - 2005 How can i put these dynamic values in a

Re: [PHP-DB] Arrays again again

2002-11-13 Thread Marco Tabini
Perhaps I don't understand what it is you're looking for, but... $a = array(); for ($i = 0; $i $maxvalue; $i++) { $a[$year] = $value; } but this is almost too simple, which probably just means I didn't quite understand your question. Marco -- php|architect - The magazine

Re: [PHP-DB] Arrays again again

2002-11-13 Thread Peter Beckman
The problem there is that you've got $a[$year] getting set a bunch of times. That is busted code. $a[$year] will only contain the LAST value. Replace that line with this one. $a[] = array(year=$year, value=$value); OR $a[$i] = array(year=$year, value=$value); Now $a[0][year] = 2002

[PHP-DB] arrays db

2002-11-11 Thread Martin Allan Jensen
Okey people, i try again!! I have a table in a mysql database that holds this: +++++--+ | id | maaler | aflaest| vaerdi | pris | +++++--+ | 21 | 11 | 2002-01-01 | 15160 | 0.00 | | 22 | 11 | 2002-02-01 |

Re: [PHP-DB] arrays db

2002-11-11 Thread Ignatius Reilly
Why don't you want to do this with SQL? Ignatius - Original Message - From: Martin Allan Jensen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 11, 2002 2:48 PM Subject: [PHP-DB] arrays db Okey people, i try again!! I

Re: [PHP-DB] arrays db

2002-11-11 Thread Jason Wong
On Monday 11 November 2002 21:48, Martin Allan Jensen wrote: Okey people, i try again!! I have a table in a mysql database that holds this: +++++--+ | id | maaler | aflaest| vaerdi | pris | +++++--+ | 21 |

[PHP-DB] arrays, variables, and register_globals

2002-07-24 Thread GOLD, MATTHEW
I developed my site on a server where register_globals was off; now I'm putting the site up on a server where they are on. I know how to echo the value of a variable that is passed in the querystring, but I'm having trouble echoing the value of a variable that is in my select statement--I can

Re: [PHP-DB] Arrays

2002-05-30 Thread Jason Wong
On Friday 31 May 2002 03:53, Morten Nielsen wrote: Hi, I need to store a lot of vaiables (75+) in a MySQL database. What is the best way to do this? Should I create a field for each variable in the database or is it possible to create an array for a series of variables? You can put

[PHP-DB] Arrays

2002-04-15 Thread Alex Francis
I am trying to insert event dats into a database and to make sure the user puts the date in the correct format. I am now trying to collect the information from the three fields and insert it into one field. code as follows: $eventdate = array (eventyear, eventmonth, eventday); when I insert it

Re: [PHP-DB] Arrays

2002-04-15 Thread Steve Cayford
Your $eventdate variable is an array, not a string so you can't just drop it into an sql query string like that. If you have separate fields in the db for year, month and day then you probably want something like: $query = insert into ... values ( ... , '$eventdate[0]', '$eventdate[1]',

Re: [PHP-DB] Arrays

2002-04-15 Thread Alex Francis
Got it now, Thank you -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are

[PHP-DB] arrays and email

2002-01-29 Thread Kevin Ruiz
I'm working on an application that will allow someone to view all attendees for a specific webinar that my company is hosting. I want to allow the user to send one group email to all participants scheduled for that particular webinar. After I connect to my database my code looks like this: ?

RE: [PHP-DB] arrays and email

2002-01-29 Thread Gurhan Ozen
]; $email = $row[12]; $list[$count] = $email; $count = $count + 1; } Hope this helps. Gurhan -Original Message- From: Kevin Ruiz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 2:14 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] arrays and email I'm working

RE: [PHP-DB] arrays and email

2002-01-29 Thread olinux
To: [EMAIL PROTECTED] Subject: [PHP-DB] arrays and email I'm working on an application that will allow someone to view all attendees for a specific webinar that my company is hosting. I want to allow the user to send one group email to all participants scheduled for that particular webinar

RE: [PHP-DB] arrays and email

2002-01-29 Thread Oliver Cronk
It would appear that I should check if anyone else has answered a question first! And get some more sleep! Sorry! Ollie -Original Message- From: olinux [mailto:[EMAIL PROTECTED]] Sent: 29 January 2002 20:05 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] arrays and email The other thing