En este codigo presento como una advertencia a eliminar . SI / NO
codigo :
borrar_confirma.php
Código PHP:
Ver original<?php require_once('Connections/con_usuarios.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
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;
}
}
$colname_usuario = "-1";
if (isset($_GET['nombre_user'])) { $colname_usuario = $_GET['nombre_user'];
}
$query_usuario = sprintf("SELECT * FROM usuarios WHERE nombre_user = %s", GetSQLValueString
($colname_usuario, "text")); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/base.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin título</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
margin-top: 0px;
background-image: url(fondo.jpg);
background-repeat: repeat-x;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<table width="80%" border="0" align="center">
<tr>
<td align="center" bgcolor="#6DC1F0"><h1>curso de control de usuarios<br />
ww.videotutoriales.es</h1></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"><!-- InstanceBeginEditable name="contenido" -->
<h2>¿Seguro que desea eliminar al usuario <?php echo $row_usuario['nombre_user']; ?>?.</h2>
<p><a href="eliminar_user.php?nombre_user=<?php echo $row_usuario['nombre_user']; ?>">SI</a> / <a href="listado_users.php">NO</a></p>
<!-- InstanceEndEditable --></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
?>