Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-10-01 Thread Aziz Saleh
Hey Tim, It seems that deleteObject takes in 2 params, and you are sending it 1 param. I would recommend you look at the documentation and make sure you are sending the right params. Aziz On Sun, Sep 29, 2013 at 10:29 PM, Tim Dunphy wrote: > Hi Aziz, > > Thank you for getting back to me! > >

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Tim Dunphy
Hi Aziz, Thank you for getting back to me! I appreciate you spotting that error. So I corrected that deleteObject(array( 'Bucket' => $bucket_name ));* // The response comes back as a Simple XML Object // In this case we just want to know if everything was okay. // If not, report the me

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Aziz Saleh
No Problem, the issue is that you referring to the invalid post element $bucket_name as opposed to the correct on bucket_name. *$bucket_name = $_POST['$bucket_name'];* Should be *$bucket_name = $_POST['bucket_name'];* Aziz On Sun, Sep 29, 2013 at 3:28 PM, Tim Dunphy wrote: > Hey guys, > >

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Tim Dunphy
Hey guys, Sorry about that i should have posted the full code to give you some idea of context. Anyway, here it is: deleteObject(array(* *'Bucket' => $bucket_name ));* // The response comes back as a Simple XML Object // In this case we just want to know if everything was okay. // If not,

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Aziz Saleh
Hi Tim, Is the call working? Does it actually get deleted? This could just be an issue (which I see alot) where developers do not check for variables or preset them before usage, causing those notices to come up (pretty harmless most of the times). Aziz On Sun, Sep 29, 2013 at 12:30 PM, Tim Du

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Ashley Sheridan
On Sun, 2013-09-29 at 12:30 -0400, Tim Dunphy wrote: > Hi All, > > I am attempting to delete an empty S3 bucket using the AWS PHP SDK. > > Here's how they describe the process in the docs: > > $result = $client->deleteBucket(array( > // Bucket is required > 'Bucket' => 'string', > ));

Re: [PHP] delete and recreate

2011-11-09 Thread Jim Lucas
On 11/9/2011 7:35 AM, Kirk Bailey wrote: > So, I want to create a script to delete an old file and create a new one which > is empty. The script receives a password via query string. The obvious methods > give me back a very useless 500 error. Any suggestions on how to accomplish > what > I seek?

Re: [PHP] delete and recreate

2011-11-09 Thread Jim Giner
Is anyone concerned about the OP's original statement about "receives a password via query string". Perhaps that is his problem since he did mention it? I didn't attempt to answer it because I didn't know what/why he was prompting for a password. -- PHP General Mailing List (http://www.ph

Re: [PHP] delete and recreate

2011-11-09 Thread Adam Richardson
On Wed, Nov 9, 2011 at 10:35 AM, Kirk Bailey wrote: > So, I want to create a script to delete an old file and create a new one > which is empty. The script receives a password via query string. The > obvious methods give me back a very useless 500 error. Any suggestions on > how to accomplish what

Re: [PHP] delete and recreate

2011-11-09 Thread Stuart Dallas
On 9 Nov 2011, at 15:35, Kirk Bailey wrote: > So, I want to create a script to delete an old file and create a new one > which is empty. The script receives a password via query string. The obvious > methods give me back a very useless 500 error. Any suggestions on how to > accomplish what I see

Re: [PHP] Re: PHP delete confirmation

2011-04-29 Thread Ashley Sheridan
"Jim Lucas" wrote: >On 4/29/2011 12:06 AM, Geoff Lane wrote: >> On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote: >> >>> Personally I would use the javascript page navigation is senseless >if they >>> miss click. >> >>> Javascript: Small and simple javascript. >> >>> onclick="return con

Re: [PHP] Re: PHP delete confirmation

2011-04-29 Thread Jim Lucas
On 4/29/2011 12:06 AM, Geoff Lane wrote: > On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote: > >> Personally I would use the javascript page navigation is senseless if they >> miss click. > >> Javascript: Small and simple javascript. > >> onclick="return confirm('Are you sure you want

[PHP] Re: PHP delete confirmation

2011-04-29 Thread Geoff Lane
On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote: > Personally I would use the javascript page navigation is senseless if they > miss click. > Javascript: Small and simple javascript. > onclick="return confirm('Are you sure you want to delete?')" Personally, I'd use Javascript and al

Re: [PHP] Delete File With Any File Extension

2010-06-15 Thread Ashley Sheridan
On Tue, 2010-06-15 at 16:23 +0530, cheran krishnamoorthy wrote: > You can't use regular expression with unlink directly. > have a look on this > http://www.phpfreaks.com/forums/index.php?topic=256367.0 > > Regards > Cherankrish > > On Tue

Re: [PHP] Delete File With Any File Extension

2010-06-15 Thread cheran krishnamoorthy
You can't use regular expression with unlink directly. have a look on this http://www.phpfreaks.com/forums/index.php?topic=256367.0 Regards Cherankrish On Tue, Jun 15, 2010 at 4:17 PM, Shaun Thornburgh < shaunthornbu...@hotmail.com> wrote:

Re: [PHP] Delete File With Any File Extension

2010-06-15 Thread Adrian
Use glob() to get a list of matching afiles nd then unlink() them separately. > I need to delete a file with any file extension where i know the > name of the file, is it possible to use regular expressions with the unlink > function? -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] delete & insert ?

2009-06-23 Thread Bastien Koert
On Tue, Jun 23, 2009 at 4:20 PM, PJ wrote: > I just had a bright idea ??? > Am doing editing file for book entries; it occurs to me (now that I am > practically finished) that it might be much simpler to delete entries > and just insert rather than going through the rigamarole of checking if > the

Re: [PHP] Delete rows from database

2008-01-07 Thread Jim Lucas
Balasubramanyam A wrote: Hi all, I'm searching names from MySQL and printing it on a browser. Also, I've provided checkbox for all the rows and a delete button for a page. I want to delete the selected rows from MySQL when I click on the "Delete" button. How do I do that? Here is the code which

Re: [PHP] Delete rows from database

2008-01-05 Thread Daniel Brown
On Jan 5, 2008 9:03 AM, Balasubramanyam A <[EMAIL PROTECTED]> wrote: > Hi all, Hi! [snip] > while ($line = mysql_fetch_array($resultset, MYSQL_ASSOC)) { [snip] Just a side note: wouldn't it be easier to just use mysql_fetch_assoc() ? It does the exact same thing, with less typing. --

Re: [PHP] Delete rows from database

2008-01-05 Thread Per Jessen
Balasubramanyam A wrote: > Hi all, > > I'm searching names from MySQL and printing it on a browser. Also, > I've provided checkbox for all the rows and a delete button for a > page. I want to delete the selected rows from MySQL when I click on > the "Delete" button. How do I do that? You process

Re: [PHP] Delete row in a lookup table

2007-08-27 Thread nitrox .
Wow, I actually managed to get this working now. Thanks to Richard and stut I realized I was on the right track but had my code screwed up. Richard your right, a primary key column was silly but was a temporary fix. It allowed me to delete with one column and not have to reference a second. So I

Re: [PHP] Delete row in a lookup table

2007-08-26 Thread Richard Lynch
On Sat, August 18, 2007 6:31 pm, nitrox . wrote: > Is it not considered good practice to have a primary key on a lookup > table for a database? > I have 3 tables setup, games, memberleagues and members. The > memberleagues table holds the id of the games table and members table. > The problem I hav

Re: [PHP] Delete row in a lookup table

2007-08-18 Thread Larry Garfield
Whether or not it's good practice depends on who you ask. :-) Every table should have a primary key. Primary keys, however, may span multiple columns. That's perfectly legal. In some cases that primary key may span every column, but generally that's a sign of bad design unless you're talki

Re: [PHP] Delete first line of a csv file if it is the headers

2007-05-02 Thread Richard Lynch
Do one, and only one, fgetcsv() before you entere the loop? Or, if only SOME people add the header lines to their CSV file, check if one of the numeric fields is actually numeric, and skip any "bad" lines. You could even keep a counter going of which line you are on, and give an error message if

Re: [PHP] Delete first line of a csv file if it is the headers

2007-04-29 Thread Chris
Richard Kurth wrote: The below script will parse a csv file to a database I need to remove the first line because it is the header files and I don't need them. How can I test for that and remove them. $file = fopen($_POST['copy'], 'r') or $message .= "Could not open" . $_POST[copy] . "fo

RE: [PHP] Delete an upload

2006-07-17 Thread mike bellerby
You unlink it. Mike Message Received: Jul 17 2006, 04:26 PM From: "Benjamin Adams" <[EMAIL PROTECTED]> To: "php php" Cc: Subject: [PHP] Delete an upload I created a form where users can upload. I'm working on the section where admins can delet

RE: [PHP] Delete an upload

2006-07-17 Thread Jay Blanchard
[snip] I created a form where users can upload. I'm working on the section where admins can delete entries. When I have a user delete an entery, I have it taking out of MySQL (working fine) But how do I delete the file that was uploaded? Thanks for any help [/snip] http://www.php.net/unlink --

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Mon, June 5, 2006 11:52 am, Chris Boget wrote: >> On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: >>> You may find it easier to generate links of the form >>> delete.php?id=1, etc. Then you won't have to use a seperate >>> form for each link. The id will be available in delete.php >>> in $_GE

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Mon, June 5, 2006 12:41 am, Rabin Vincent wrote: > I don't see how POST is better/more secure for a delete action. If you don't see how it's better, then READ THE HTTP SPECS!!! -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] Delete

2006-06-05 Thread Chris Boget
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: You may find it easier to generate links of the form delete.php?id=1, etc. Then you won't have to use a seperate form for each link. The id will be available in delete.php in $_GET. The same sanity checking applies in this case too. Gah! That vi

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: > You may find it easier to generate links of the form > delete.php?id=1, etc. Then you won't have to use a seperate > form for each link. The id will be available in delete.php > in $_GET. The same sanity checking applies in this case too. Gah!

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Sat, June 3, 2006 8:40 pm, George Babichev wrote: > Hello everyone! I wrote a blog application, but now for the admin > panel, i > am trying to add a feature to delete blog posts. It would show the > title of > the post next to it, and have a delete link which would delete it. How > would > I do

Re: [PHP] Delete

2006-06-04 Thread Larry Garfield
On Monday 05 June 2006 00:41, Rabin Vincent wrote: > On 6/4/06, Larry Garfield <[EMAIL PROTECTED]> wrote: > > Only if delete.php is a confirmation page. Never ever ever have a > > delete function that operates solely by GET. > > > > Here's why: http://thedailywtf.com/forums/thread/66166.aspx > >

Re: [PHP] Delete

2006-06-04 Thread Rabin Vincent
On 6/4/06, Larry Garfield <[EMAIL PROTECTED]> wrote: Only if delete.php is a confirmation page. Never ever ever have a delete function that operates solely by GET. Here's why: http://thedailywtf.com/forums/thread/66166.aspx Yes, I've seen that one before. IMO the main problem there is the fa

Re: [PHP] Delete

2006-06-04 Thread tedd
At 10:30 AM -0700 6/4/06, George Babichev wrote: >Yes, that checkbox idea is exactly what I was thinking about. Exept I have no >idea how my program would tell one checkbox from the other, and delete the >wrong thing... George: You're going to have to play around with forms and find out how che

Re: [PHP] Delete

2006-06-04 Thread George Babichev
Yes, that checkbox idea is exactly what I was thinking about. Exept I have no idea how my program would tell one checkbox from the other, and delete the wrong thing... On 6/4/06, tedd <[EMAIL PROTECTED]> wrote: At 10:53 PM -0700 6/3/06, George Babichev wrote: >Thank you for the help guys, but t

Re: [PHP] Delete

2006-06-04 Thread Larry Garfield
On Sunday 04 June 2006 03:11, Rabin Vincent wrote: > On 6/4/06, Larry Garfield <[EMAIL PROTECTED]> wrote: > > Make each button a separate form, with the id as a hidden value. Like > > so: > > > > > > > > My first entry > > > > > > > > > > [snip] > > You may find it easier to generate links o

Re: [PHP] Delete

2006-06-04 Thread tedd
At 10:53 PM -0700 6/3/06, George Babichev wrote: >Thank you for the help guys, but the I guess I kinda have another question. >So I do assign an id to each blog post, and it is auto_increment, so in my >blog delete page, it would display all the blog title's and a delete button >nex to it. So lets

Re: [PHP] Delete

2006-06-04 Thread Rabin Vincent
On 6/4/06, Larry Garfield <[EMAIL PROTECTED]> wrote: Make each button a separate form, with the id as a hidden value. Like so: My first entry [snip] You may find it easier to generate links of the form delete.php?id=1, etc. Then you won't have to use a seperate form for each link. The i

Re: [PHP] Delete

2006-06-03 Thread Larry Garfield
Make each button a separate form, with the id as a hidden value. Like so: My first entry My second entry Obviously you'd want something better formatted, but you get the idea. Then on the receiving end, you'd simply "DELETE FROM entries where id=$id;". That is, AFTER you process

Re: [PHP] Delete

2006-06-03 Thread George Babichev
Thank you for the help guys, but the I guess I kinda have another question. So I do assign an id to each blog post, and it is auto_increment, so in my blog delete page, it would display all the blog title's and a delete button nex to it. So lets say I click delete on the third entry. How would my

Re: [PHP] Delete

2006-06-03 Thread Rabin Vincent
On 6/4/06, George Babichev <[EMAIL PROTECTED]> wrote: Hello everyone! I wrote a blog application, but now for the admin panel, i am trying to add a feature to delete blog posts. It would show the title of the post next to it, and have a delete link which would delete it. How would I do this? I me

Re: [PHP] Delete

2006-06-03 Thread benifactor
when you insert each blog into your database, im assuming your not doing this by hand each and every time, assign each blog an id. in the place you want to delete the blog entries, list all of the blogs titles and ids. and then use mysql(delete); example: You Need To Choose a post to delete";

Re: [PHP] delete duplicates from array and insert statement

2005-09-17 Thread Jasper Bryant-Greene
Ryan A wrote: want i want to do is, do a select and get the data that is already in the db, compare it, and if its in the insert statement delete those rows... am getting screwed up in the logic for this...so far I have exploaded the insert statement so its in a neat array, now i need to check in

Re: [PHP] delete session cookie?

2005-04-20 Thread William Stokes
Thanks. That's what I was looking for... "Burhan Khalid" <[EMAIL PROTECTED]> kirjoitti viestissä:[EMAIL PROTECTED] > William Stokes wrote: >> Hello, >> >> Is it possible to delete a session cookie from browser? If so how? > > http://www.php.net/manual/en/function.session-destroy.php > > See the

Re: [PHP] delete session cookie?

2005-04-20 Thread Burhan Khalid
William Stokes wrote: Hello, Is it possible to delete a session cookie from browser? If so how? http://www.php.net/manual/en/function.session-destroy.php See the example. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] delete session cookie?

2005-04-20 Thread Petar Nedyalkov
On Wednesday 20 April 2005 14:51, William Stokes wrote: > Hello, > > Is it possible to delete a session cookie from browser? If so how? Just unset it. > > Thanks > -Will -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc

Re: [PHP] delete file

2005-03-24 Thread Richard Davey
Hello William, Thursday, March 24, 2005, 2:08:13 PM, you wrote: WS> How can I let user delete a uploaded image file in the server's WS> directory? unlink() Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them

RE: [PHP] delete file

2005-03-24 Thread Jay Blanchard
[snip] How can I let user delete a uploaded image file in the server's directory? [/snip] http://www.php.net/unlink -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Delete last 15 chars from a file

2005-03-02 Thread Burhan Khalid
Shaun wrote: Hi, I am trying to create an XML file, it will be done in stages so if the file isn't present I will add the line: Then for each line I add I add the following data But for various reasons the application won't know when the file is complete so it won't have the final:

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Richard Lynch
Shaun wrote: > Hi Marek, > > Thanks for your reply, could you tell me how I would go about this please? You can muck around with CSV if you prefer, but tab-delimited is way easier, assuming no tabs in your content. This also assumes no newlines in your content. If there are tabs and/or newline

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Jason Barnett
Shaun wrote: Hi Marek, Thanks for your reply, could you tell me how I would go about this please? header('Content-type: text/csv'); header('Content-Disposition: attachment; filename="download.csv"'); /** Now you perform the MySQL query, DECODE the information and echo it to the screen. Hopefully

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Marek Kilimajer
Shaun wrote: Hi Marek, Thanks for your reply, could you tell me how I would go about this please? "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Shaun wrote: Hi, I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be all

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Shaun
Hi Marek, Thanks for your reply, could you tell me how I would go about this please? "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Shaun wrote: >> Hi, >> >> I have a database that contains encrypted data using Mysql function >> ENCODE(). Certain users will be

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Marek Kilimajer
Shaun wrote: Hi, I have a database that contains encrypted data using Mysql function ENCODE(). Certain users will be allowed to view this data and I will allow them to download a CSV file contain the decrypted data using the Mysql DECODE() function. However I don't want this file to be left on t

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Bret Hughes
On Tue, 2005-02-15 at 14:00, Richard Lynch wrote: > Matt M. wrote: > >> I have a database that contains encrypted data using Mysql function > >> ENCODE(). Certain users will be allowed to view this data and I will > >> allow > >> them to download a CSV file contain the decrypted data using the Mysq

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Richard Lynch
Matt M. wrote: >> I have a database that contains encrypted data using Mysql function >> ENCODE(). Certain users will be allowed to view this data and I will >> allow >> them to download a CSV file contain the decrypted data using the Mysql >> DECODE() function. However I don't want this file to be

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Richard Lynch
Shaun wrote: > Thanks for the reply, I know how to delete a file I just wanted to know if > its possible to ensure that its deleted automatically as soon as the user > has downloaded it. Yes. You don't even put the file into your web tree DocumentRoot directory, and you write a PHP script that al

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Shaun
Hi Matt, Thanks for the reply, I know how to delete a file I just wanted to know if its possible to ensure that its deleted automatically as soon as the user has downloaded it. Thanks... "Matt M." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> I have a database that contains e

Re: [PHP] Delete a file immediately after download

2005-02-15 Thread Matt M.
> I have a database that contains encrypted data using Mysql function > ENCODE(). Certain users will be allowed to view this data and I will allow > them to download a CSV file contain the decrypted data using the Mysql > DECODE() function. However I don't want this file to be left on the server, >

RE: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Torsten Rosenberger
Hello take a look a the Pear File_Find class require_once 'File/Find.php'; $fs = new File_Find; $data = $fs->maptree('my_dir'); $data[0] contains all directorys $data[1] all files $ok = 0; $err = 0; foreach ($data[1] as $key) { if (unlink($k

Re: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread John Nichel
Tim Burgan wrote: Hello, How can I delete ALL files within a specified directory every 20 days? Does anyone know of any code-snippets that are around at the moment that are able to do this? (And where I can find them?) Thanks Tim Write a script that will delete them, and set the script to run on

Re: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Robby Russell
On Tue, 2005-02-15 at 02:12 +1030, Tim Burgan wrote: > Hello, > > How can I delete ALL files within a specified directory every 20 days? > Does anyone know of any code-snippets that are around at the moment that > are able to do this? (And where I can find them?) > > Thanks > > Tim > What oper

Re: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Greg Donald
On Tue, 15 Feb 2005 01:22:42 +1030, Tim Burgan <[EMAIL PROTECTED]> wrote: > How can I delete ALL files within a specified directory every 20 days? > Does anyone know of any code-snippets that are around at the moment that > are able to do this? (And where I can find them?) You can put a tmp file i

RE: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Mikey
> How can I delete ALL files within a specified directory every 20 days? > Does anyone know of any code-snippets that are around at the > moment that are able to do this? (And where I can find them?) > > Thanks > > Tim Sounds more like a job for cron than for PHP - "man crontab" should set you

RE: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Jay Blanchard
[snip] How can I delete ALL files within a specified directory every 20 days? Does anyone know of any code-snippets that are around at the moment that are able to do this? (And where I can find them?) [/snip] Create a script that deletes files in the directory and then CRON it. http://www.unixge

Re: [PHP] delete part of array

2005-01-13 Thread Leif Gregory
Hello Jochem, Thursday, January 13, 2005, 10:55:35 AM, you wrote: J> heh but who says I'm not a bar steward ;-) I'll take a beer then! I need one after today. J> sorry if it came accross a little harsh, but I stand by the point J> that the onus is on the person asking the question to give an J>

Re: [PHP] delete part of array

2005-01-13 Thread John Nichel
Ford, Mike wrote: Without actually running it (I'm too lazy!), I'm pretty sure this won't work correctly -- the count($array) is being recalculated each time round the loop, so each time you do an unset() it will reduce by one, resulting in the last few elements never being checked. Not too much

Re: [PHP] delete part of array

2005-01-13 Thread Jochem Maas
crap - hit 'reply' by mistake. --- Leif Gregory wrote: > Hello Jochem, > > Wednesday, January 12, 2005, 8:08:09 PM, you wrote: > JM> read the manual entry first (see below) - and understand what the > JM> function actually does - never just assume because its giving you > JM> the result you want no

RE: [PHP] delete part of array

2005-01-13 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 13 January 2005 05:28, Matthew Fonda wrote: > use the unset() function. > > for ($i = 0; $i < count($array); $i++) { > if (empty($array[$i]) { > unset($array

Re: [PHP] delete part of array

2005-01-13 Thread Sebastian
coder would go for help FIRST, but it doesn't always solve a problem thats why there is a thing called MAILING LIST. :) cheers. - Original Message - From: "Leif Gregory" <[EMAIL PROTECTED]> To: Sent: Thursday, January 13, 2005 7:39 AM Subject: Re: [PHP] delete pa

Re: [PHP] delete part of array

2005-01-13 Thread M. Sokolewicz
that only works for numerical indices. However, if you're sure that neither null values, nor false values are supposed to be present in the array, (that means, they MIGHT be, but should be removed anyway; or just not be there at all,) then you could try array_filter with no callback-argument :)

Re: [PHP] delete part of array

2005-01-13 Thread Matthew Fonda
use the unset() function. for ($i = 0; $i < count($array); $i++) { if (empty($array[$i]) { unset($array[$i]); } } On Wed, 2005-01-12 at 16:22, Sebastian wrote: > how do i delete keys from an array if it has no values? > eg, this: > > [name] => Array > ( >

Re: [PHP] delete part of array

2005-01-13 Thread Leif Gregory
Hello Jochem, Wednesday, January 12, 2005, 8:08:09 PM, you wrote: JM> read the manual entry first (see below) - and understand what the JM> function actually does - never just assume because its giving you JM> the result you want now that it will always work the way you JM> expect. Don't be a 'ta

Re: [PHP] delete part of array

2005-01-12 Thread Jochem Maas
Leif Gregory wrote: Hello Sebastian, Wednesday, January 12, 2005, 5:22:20 PM, you wrote: S> how do i delete keys from an array if it has no values? S> eg, this: array_merge($name); Try it that way first. If not, read the manual entry first (see below) - and understand what the function actually do

Re: [PHP] delete part of array

2005-01-12 Thread Jochem Maas
Sebastian wrote: how do i delete keys from an array if it has no values? eg, this: what does the value have to do with it??? other than that you want to remove items where the value is 'empty'. also 'no value' is vague, do you mean an empty string or do you mean NULL? --- try the array_values() f

Re: [PHP] delete part of array

2005-01-12 Thread Leif Gregory
Hello Sebastian, Wednesday, January 12, 2005, 5:22:20 PM, you wrote: S> how do i delete keys from an array if it has no values? S> eg, this: array_merge($name); Try it that way first. If not, $name = array_merge($name); But I think I remember the first way working for me. Cheers, Leif Gre

Re: [PHP] delete part of array

2005-01-12 Thread Tatang Widyanto
Sebastian wrote: how do i delete keys from an array if it has no values? eg, this: [name] => Array ( [0] => grape [1] => apple [2] => [3] => orange [4] => [5] => cherry ) to: [name] => Array ( [0] => grape [1] => apple [2] => orange

Re: [PHP] Delete files from the server

2004-12-17 Thread Richard Lynch
Steve Marquez wrote: > I have uploaded some pictures and thumbnails using a PHP form into a > particular directory. I would like to be able to select the name of the > picture and then chose to delete that picture and its thumbnail from the > server using another form. > > The name of the picture i

Re: [PHP] Delete files from the server

2004-12-16 Thread Matt M.
> I have uploaded some pictures and thumbnails using a PHP form into a > particular directory. I would like to be able to select the name of the > picture and then chose to delete that picture and its thumbnail from the > server using another form. try the manual my man http://us2.php.net/unlink

RE: [PHP] Delete files from the server

2004-12-16 Thread Jay Blanchard
[snip] I have uploaded some pictures and thumbnails using a PHP form into a particular directory. I would like to be able to select the name of the picture and then chose to delete that picture and its thumbnail from the server using another form. The name of the picture is in the MySQL database.

Re: [PHP] Delete Line from File?

2004-09-13 Thread Nick Wilson
* and then John Holmes declared > >Whats the easiest/best way to do that with php? > >just replace the line with ''? > > Yes, basically. You have to read the file, replace the part you don't want > with an empty string and then re-write the file. If the file is small and > you're using file

Re: [PHP] Delete Line from File?

2004-09-13 Thread John Holmes
From: "Nick Wilson" <[EMAIL PROTECTED]> Whats the easiest/best way to do that with php? just replace the line with ''? Yes, basically. You have to read the file, replace the part you don't want with an empty string and then re-write the file. If the file is small and you're using file() to read i

Re: [PHP] Delete Line from File?

2004-09-13 Thread zareef ahmed
Hi, some function with whihc you can do this file(); foreach(); zareef ahmed --- Nick Wilson <[EMAIL PROTECTED]> wrote: > Whats the easiest/best way to do that with php? > just replace the line with ''? > -- > Nick W > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe

Re: [PHP] Delete a file after it has been downloaded?

2004-08-18 Thread Matt M.
On Wed, 18 Aug 2004 23:56:57 +0200, Yngve <[EMAIL PROTECTED]> wrote: > Hi! > > I wonder if it´s possible (and how) to delete a file after it has been > downloaded, without running anything on the server except for the PHP page > which the user gets the file from. > > If it is not possible, i wond

Re: [PHP] Delete a file after it has been downloaded?

2004-08-18 Thread John Holmes
Yngve wrote: I wonder if it´s possible (and how) to delete a file after it has been downloaded, without running anything on the server except for the PHP page which the user gets the file from. unlink() You need a middle man script to manage the download and delete the file. The script receives th

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 11:17 PM, Albert Padley wrote: On May 26, 2004, at 11:16 PM, Curt Zirzow wrote: * Thus wrote Albert Padley ([EMAIL PROTECTED]): The processing code is: if (count($del) > 0){ for ($i=0;$iI think you need to take a step back and figure out where the $del variable is commi

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 11:16 PM, Curt Zirzow wrote: * Thus wrote Albert Padley ([EMAIL PROTECTED]): The processing code is: if (count($del) > 0){ for ($i=0;$iI think you need to take a step back and figure out where the $del variable is comming from. Both solutions that have been provided sho

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Curt Zirzow
* Thus wrote Albert Padley ([EMAIL PROTECTED]): > > > > The processing code is: > > if (count($del) > 0){ > for ($i=0;$i > $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'"; > } > } I think you need to take a step back and figure out where the $del variable

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 7:55 PM, Tom Rogers wrote: Hi, Thursday, May 27, 2004, 11:34:03 AM, you wrote: AP> I've checked the archives and several other sources, but still can't AP> seem to make this work. AP> I have a form with checkboxes to designate records to be deleted from AP> the mysql database

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 8:01 PM, John W. Holmes wrote: Albert Padley wrote: I've checked the archives and several other sources, but still can't seem to make this work. I have a form with checkboxes to designate records to be deleted from the mysql database. The pertinent form code is: The processin

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread John W. Holmes
Albert Padley wrote: I've checked the archives and several other sources, but still can't seem to make this work. I have a form with checkboxes to designate records to be deleted from the mysql database. The pertinent form code is: The processing code is: if (count($del) > 0){ for ($i=0;$i

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Tom Rogers
Hi, Thursday, May 27, 2004, 11:34:03 AM, you wrote: AP> I've checked the archives and several other sources, but still can't AP> seem to make this work. AP> I have a form with checkboxes to designate records to be deleted from AP> the mysql database. The pertinent form code is: AP> AP> The pro

Re: [PHP] - Delete records in an Access DB

2004-05-01 Thread Torsten Roehr
So the problem is not the delete statement but that you cannot even open a connection, right? Have you tried PHP's ODBC functions to connect to the Access DB?: http://de.php.net/manual/en/function.odbc-connect.php There are some user comments regarding Access - maybe this helps. Regards, Torsten

Re: [PHP] delete a function

2004-02-23 Thread Adam Bregenzer
On Sun, 2004-02-22 at 07:25, Sztankó Demeter wrote: > I'm not sure that I want to start OOP-ing in my php code, but I will if > necessary. Ok, I have below a non-OO response. Personally, while I enjoy the OO methodology, I don't think it is the "one true way." I adhere to the philosophy that any

Re: [PHP] delete a function

2004-02-23 Thread Michal Migurski
>There are two (or more) different functions on my web site, that have the >same name (an action). They are called depending on the permittions of >the end user. I want to have the code clean so I don't want to put >the switch or if operators to it. I will call the wrapper that will check >the

Re: [PHP] delete a function

2004-02-22 Thread Marek Kilimajer
Sztankó Demeter wrote: Hello! Is there any way to delete (unset) a function? I want to write some function with one constantyl defined name, then call a function_manager function, that will gice this function an unique name, than delete the original function, so I can start the process from the b

Re: [PHP] delete a function

2004-02-22 Thread Sztankó Demeter
dicts my philosophy of lazyness. 3. Some great idea that You will provide. Maybe based on OOP, maybe not, but it is easy to code and perfect. Have a nice day. Dimi. - Original Message - From: "Adam Bregenzer" <[EMAIL PROTECTED]> To: "Sztankó Demeter" <[EMAIL P

Re: [PHP] delete a function

2004-02-21 Thread Adam Bregenzer
On Sat, 2004-02-21 at 06:02, Sztankó Demeter wrote: > Hello! > > Is there any way to delete (unset) a function? No, why would you really want to delete a function? > I want to write some function with one constantyl defined name, then call a > function_manager function, that will gice this funct

Re: [PHP] Delete Temporary Internet Files

2003-11-11 Thread Marek Kilimajer
Joe Mack wrote: I am trying to use PHP to delete temporary internet files in IE6. I would also like to access other "Internet Options" functions. Any assistance would be appreciated. PHP is server side, it cannot mess with browser this way. As on another list. -- PHP General Mailing List (http

  1   2   >