PHP 글 삭제하기
페이지 정보
본문
del_ok.php
<?php
// php.ini 의 register_globals=off 일 경우 (php >= 4.1.0)
//@extract($_GET);
//@extract($_POST);
//@extract($_SERVER);
$local1 = $_POST['local1'];
$local2 = $_POST['local2'];
$company = $_POST['company'];
$tel = $_POST['tel'];
/*
echo "local1={$local1}<br>";
echo "local2={$local2}<br>";
echo "company={$company}<br>";
echo "tel={$tel}<br>";
*/
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$dbconn = mysql_connect("{$mysql_host}","{$mysql_user}","{$mysql_password}") or die("데이터베이스 연결에 실패하였습니다.");
mysql_select_db($mysql_db, $dbconn);
$sql = "delete from `테이블이름` where uid='{$uid}'";
$qry = mysql_query($sql);
if(!$qry) die(mysql_error());
mysql_close($dbconn);
?>
<SCRIPT>
location.href="목록.php";
</SCRIPT>
<?php
// php.ini 의 register_globals=off 일 경우 (php >= 4.1.0)
//@extract($_GET);
//@extract($_POST);
//@extract($_SERVER);
$local1 = $_POST['local1'];
$local2 = $_POST['local2'];
$company = $_POST['company'];
$tel = $_POST['tel'];
/*
echo "local1={$local1}<br>";
echo "local2={$local2}<br>";
echo "company={$company}<br>";
echo "tel={$tel}<br>";
*/
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$dbconn = mysql_connect("{$mysql_host}","{$mysql_user}","{$mysql_password}") or die("데이터베이스 연결에 실패하였습니다.");
mysql_select_db($mysql_db, $dbconn);
$sql = "delete from `테이블이름` where uid='{$uid}'";
$qry = mysql_query($sql);
if(!$qry) die(mysql_error());
mysql_close($dbconn);
?>
<SCRIPT>
location.href="목록.php";
</SCRIPT>
댓글목록
등록된 댓글이 없습니다.