You are here: Re: How to delete a file in my web server via php « PHP Programming Language « IT news, forums, messages
Re: How to delete a file in my web server via php

Posted by marce1972 on 01/22/07 17:07

Floortje wrote:
> Janwillem Borleffs schreef:
> > marce1972 wrote:
> >> Hi to all, that's my question I have mysql database and a web page to
> >> upload files to my webpage, I know how to delete them from the
> >> database, but didnt find the code to delete them from the web server.
> >> Please help me with this code.
> >>
> >
> > The only way to do this through HTTP is to create a remote script that
> > accepts parameters and uses these to select and delete the file. There's
> > also a HTTP DELETE method, but I have never encountered a server which
> > supports it.
> >
> >
> > JW
>
> shortest way :
> @unlink($file);
>
> Make sure to check the input first
>
> --
> Arjen
> http://www.hondenpage.com

Do I rite this on my php code as you wrote it?

$nom=$_POST['numero'];
$sql="DELETE FROM canciones WHERE idcancion='$nom';";
mysql_query($sql) or die ("problema con borrado");
$arch=$_POST['ref'];
@unlink($arch);

Is this correct
Thanks I'll download the other option webdav too to see if it works

regards

Marcelo

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация