Re: Need help for $unlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi Rajesh 
> i think u r using wrong code for deleting the image
> u should uuse this code for deleteting the image and the record from
data base
>

<?php
 $m_id = $_REQUEST['m_ id'];
 $query = "select * FROM model_photos WHERE m_id='$m_id' ";
$image_obj=mysql_fetch_object($query);
unlink("uploads/$image_obj->image");

$query1 = "DELETE FROM model_photos WHERE m_id='$m_id' ";
 $result1 = mysql_query( $query1) or die('Query failed: ' .
mysql_error( ));
>
> 
i think this will help u better.
thanks
Avishek Kumar(9748141833)
Web Developer
Nettrackers
Kolkata



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux