Delete user & file

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

15 replies · 725 views · started 17 years ago · 1 min read

6 participants
crazybrumi Super moderator Principal · 1,064 posts #1

i want to be able to delete all files in the gallery and downlods on wapdesire v2 can anyone help.

iv tried and tried and tried but its getin me no where and its pissin meoff mnw

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

subzero Super moderator Fellow · 3,954 posts #2

use this tool

uplink("pictures/$item[0]"); 

uplink is a php deleting tool

also add mysql to delete the sql

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #3

PHP: unlink - Manual

Subzero might have typed it wrong in a hurry

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

crazybrumi Super moderator Principal · 1,064 posts #4
$file=mysql_fetch_array(mysql_query("SELECT  filename, path FROM gallery_files WHERE uid='".$who."'"));  $nick=explode("(",$file[0]); $filename=explode("gallery/",$file[1]);  unlink("../gallery/$filename[1]"); 

iv been bessing around with this all yesterday and it only deletes one when i try and make it to delete all it dosnt wana play ball

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

subzero Super moderator Fellow · 3,954 posts #5

uplink is right ;)8)

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

syrus Junior · 44 posts #7

its quite easy @brumi if u do it like that only 1 record will b deleted. use a while statement but before u end it check if tha file exist then unlink. U could delete both user and file at once, send me that page n sql after work ill fix it up

subzero Super moderator Fellow · 3,954 posts #10

geez i must be true nub spelling yeah its unlink

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

kiLLeR-eyEd_14 Senior · 382 posts #11

mobileGIGS wrote: no it suplink() haa

i haven't used uplink but ok, i agree with you and subzero.,maybe you have tested it.,but also unlink is working too..That's what i use..From the word itself..Unlink..Means like to remove..Am i right?..unlink or uplink..whatever.,the important is what function will remove the file..Coz for me, unlink() works..

subzero Super moderator Fellow · 3,954 posts #12

No its unlink a spelling error for me

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

crazybrumi Super moderator Principal · 1,064 posts #14

syrus wrote: its quite easy @brumi if u do it like that only 1 record will b deleted. use a while statement but before u end it check if tha file exist then unlink. U could delete both user and file at once, send me that page n sql after work ill fix it up

yup you where right, i just coded and tryed this and it worked.

$sql = "SELECT  filename, path FROM gallery_files WHERE uid='".$who."'";
    $items = mysql_query($sql);
    echo mysql_error();

    if(mysql_num_rows($items)>0)
    while ($item = mysql_fetch_array($items))
    {
     $filename=explode("gallery/",$item[0]); 
     unlink("../gallery/$filename[0]");
    }

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

syrus Junior · 44 posts #15

crazybrumi wrote: yup you where right, i just coded and tryed this and it worked.

$sql = "SELECT  filename, path FROM gallery_files WHERE uid='".$who."'";
    $items = mysql_query($sql);
    echo mysql_error();


    if(mysql_num_rows($items)>0)
    while ($item = mysql_fetch_array($items))
    {
     $filename=explode("gallery/",$item[0]); 
     unlink("../gallery/$filename[0]");
    }

also to avoid some errors in case the file dnt exist u cld use

 if(file_exist($file)){ unlink($link_variable); } 

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close