|
|
|
แนะนำการสร้างระบบ album โดยใช้ php+mysql แนะนำหน่อยครับ |
|
|
|
|
|
|
|
Code (PHP)
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<?
$fileName = date("YmdHis")."_".$_FILES["filAlbumShot"]["name"];
if(move_uploaded_file($_FILES["filAlbumShot"]["tmp_name"],"myfile/".$fileName))
{
echo "Copy/Upload Complete<br>";
//*** Insert Record ***//
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
$strSQL = "INSERT INTO album ";
$strSQL .="(AlbumName,AlbumShot) VALUES ('".$_POST["txtAlbumName"]."','".$fileName."')";
$objQuery = mysql_query($strSQL);
mysql_close($objConnect);
}
?>
<a href="view_album.php">View Album</a>
</body>
</html>
Go to : PHP Create Album Images Gallery / jQuery Lightbox
|
|
|
|
|
Date :
2011-10-01 07:43:40 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|