1

guy's way i can not execute like this ?

<?php
      echo exec('SV/546463748.png');
      $url="member.php";
      $timeout_minutes = 0;
      $timeout_seconds = 1;
      sleep($timeout_seconds + $timeout_minutes * 60);
      header ('Location: '.$url);
      exit;
      ?>

but if is like this the script worcks

<?php
      echo exec('546463748.png');
      $url="member.php";
      $timeout_minutes = 0;
      $timeout_seconds = 1;
      sleep($timeout_seconds + $timeout_minutes * 60);
      header ('Location: '.$url);
      exit;
      ?>

2

how can i delete more then 1 post ?

if i have this code


select.php

<form action="drop_post.php" method="post">
  <? 
include "sec/db.php";

$result = mysql_query("SELECT ip,id FROM ip");      
$myrow = mysql_fetch_array($result);

do 
{
printf ("<p><input name='id' type='checkbox' value='%s'><label>%s</label></p>",$myrow["id"],$myrow["ip"]);
}
while ($myrow = mysql_fetch_array($result));
?>
  <input name="submit" type="submit" value="Удалить заметку!!!">
</form>

delet.php

<?php
if (isset($_POST['id'])){$id = $_POST['id'];} 
include "sec/db.php";	 
if (isset($id))
{
$result = mysql_query ("DELETE FROM SV WHERE id='$id'");
if ($result == 'true') {echo "<p>Ваша заметка успешно удалена!</p>";}
else {echo "<p>Ваша заметка не удалена!</p>";}
}		 
else 
{
echo "<p>err</p>";
}
?>

i dont now way its deliting just 1 at time :(

1) its possible that exec is limited to only the directory that you are working out of.
or use the full path to the file that you want to call with exec. why are you using exec in this case anyway?
2) drop_post.php creates the links to delete.php and passes in 1 id at a time for record deletion. You would want to create a checkbox form instead of your 'links' form, and add the id to a checkbox, when user selects 1 or many select boxes must hit a submit button that can post to your delete function. instead of only looking for one $_POST, get the whole post and filter through it reading out the checkbox names, for each one that comes across pass it into the delete function as a while instead of as an if.

hm but wat other function is avaibel to run a file from directory ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.