ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] php Ãö©ó¸ê®Æ§ó·s

[µo°Ý] php Ãö©ó¸ê®Æ§ó·s

ª©¤Wªº¦U¦ì¤j¤j­Ì¦n¡G

³Ì·s§Ú½m²ß¼g¤F¤@­Ó²©öªº­Ó¤H¸ê®Æµ{¦¡¡A

¸ÌÀYªº¤º®e¦³¡G

id, cname(©m¦W), cbirthday(¥Í¤é), cnote(³Æµù), cpic(¤jÀY·Ó)¡A

¦bmysqlÄæ¦ì°£¤Fcnote(³Æµù) null¡A

¨ä¥¦¬Ò³£»Ý­n¸ê®Æ¡A

¦ý§Ú²{¦b¥d¦b§ó·s³o¸Ì¡G

¥H¤U¬O§Ú§ó·s­¶­±ªºµ{¦¡½X¡A

·Q½Ðª©¤Wªº¦U¦ì¤j¤j­ÌÀ°§Ú¬Ý¤@¤U­þ¸Ì¥X°ÝÃD¤F¡H

¦p¤U¡G

Â^¨ú.JPG

<?

require_once("conn.php");



$sql="select * from demo where id='".$_GET['id']."'";

$record=mysql_query($sql);

$row=mysql_fetch_assoc($record);

if(isset($_POST['send'])){

$u_sql="update demo set cbirthday='".$_POST['cbirthday']."', cnote='".$_POST['cnote']."' where id='".$_GET['id']."'";

mysql_query($u_sql);

echo "<script type='text/javascript'> alert('§ó·s¦¨¥\¡I'); window.location.href='default.php'; </script>";

}


//¹Ï¤ù¤W¶ÇÃþ«¬
$uptypes=array(

'.jpg',
'.png',
'.gif'

);

?>

<!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">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link href="style.css" type="text/css" rel="stylesheet"/>

<?  

require_once("comfirm.php");

?>

</head>

<body>



<h4>
§ó·s¸ê®Æ
&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="default.php">ªð¦^²M³æ­¶</a>
</h4>

<form action="edit.php" method="post" name="edit" onsubmit="return check_form();" enctype="multipart/form-data">

©m¦W<input type="text" name="cname" value="<? echo $row['cname']; ?>" disabled="disabled"/>

<br/>

¥Í¤é<input type="text" name="cbirthday" value="<? echo $row['cbirthday']; ?>"/>

<br/>

³Æµù<textarea name="cnote">

<? echo $row['cnote']; ?>


</textarea>

<br/>

¹Ï¤ù<input type="file" name="cpic"/>&nbsp;¥Ø«e¹ÏÀÉ¡G<? echo $row['cpic']; ?>&nbsp;&nbsp;|&nbsp;&nbsp;<? echo "<a href='edit.php?cpic=".$row['cpic']."' onclick='return deletealert();'>§R°£</a>" ?>&nbsp;&nbsp;|&nbsp;&nbsp;¤¹³\¤W¶Çªº¤å¥óÃþ«¬¬°¡G<? echo implode(',', $uptypes); ?>
<br/>

<input type="hidden" name="send"/>
<input type="submit" name="submit" value="°e¥X"/>

</form>

</body>

</html>
Learn Learn Learn

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD