Código:
ya probe quitar la variable de el unlik y ponerle una ruta de un archivo en especifico y de esa forma si funciona, tambien eh tratado de provar si la variable realmente contiene el valor que necesito, pero como esta pagina terminando de completar sus funciones redirecciona a otra, no hay momento en el que pudiera ver lo que tiene la variable con un echo. <?php require_once('../Connections/conectalucard.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if ((isset($_GET['recordID'])) && ($_GET['recordID'] != "")) {
$deleteSQL = sprintf("DELETE FROM tblproducto WHERE idProducto=%s",
GetSQLValueString($_GET['recordID'], "int"));
mysql_select_db($database_conectalucard, $conectalucard);
$Result1 = mysql_query($deleteSQL, $conectalucard) or die(mysql_error());
$varProducto_Datosproducto = "0";
if (isset($_GET["recordID"])) {
$varProducto_Datosproducto = $_GET["recordID"];
}
mysql_select_db($database_conectalucard, $conectalucard);
$query_Datosproducto = sprintf("SELECT * FROM tblproducto WHERE tblproducto.idProducto = %s", GetSQLValueString($varProducto_Datosproducto, "int"));
$Datosproducto = mysql_query($query_Datosproducto, $conectalucard) or die(mysql_error());
$row_Datosproducto = mysql_fetch_assoc($Datosproducto);
$totalRows_Datosproducto = mysql_num_rows($Datosproducto);
unlink("documentos/productos/".$row_Datosproducto['strImagen']);
$deleteGoTo = "productos_lista.php";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
echo $row_Recordset1['strImagen'];
}
?>


