0

Get this from the var_dump($_FILES);

array(1) { ["gambar"]=> array(5) { ["name"]=> string(29) "Air Freshener POWER SPRAY.jpg" ["type"]=> string(11) "image/pjpeg" ["tmp_name"]=> string(23) "C:\xampp\tmp\php10C.tmp" ["error"]=> int(0) ["size"]=> int(281900) } } www.banner.comArrayINSERT INTO banner(link, gambar) VALUES('www.banner.com','Array')

I already replace $gambar with $gambar but still do not see the data inserted to database yet.

0

INSERT INTO banner(link, gambar) VALUES('www.banner.com','Array')

I already replace $gambar with $gambar but still do not see the data inserted to database yet.

Can you attach current file? I can still see you arer inserting an array, hence somewhere you are still using $gambar (see red colored text in quote)

Edited by Stefano Mtangoo: n/a

0

the file attached.

Attachments
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin</title>
<link href="admin-style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="includes/navstyleadmin.css" />
<script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="includes/superfish.js"></script>
<script type="text/javascript">
jQuery(function(){
	jQuery('ul.menu').superfish({
		animation: {opacity:'show',height:'show'},
		speed: 'slow', 
		autoArrows: true
	});
});
</script>

<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>

<body>
<div id="header">
      <p><a href="#">Home </a>| <a href="index.php">Logout </a>| <a href="admin.php">Admin Panel</a></p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    </div>
    
    <div id="search">
      
      <form action="search.php" method="post" name="login" target="_self" id="login" style="style.css" title="search">
      	<br>
        <label>search :
        <input type="text" name="search" id="search2" />
</label>
        <br />
                    
      </form> 		
	</div>
    
    <div id="menu">
            
<?php include ("includes/navigation_admin.php"); ?>
<?php
	
	include ("includes/koneksi.php");
	
	
   //$_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : '';
   $link = isset($_POST['link']) ? $_POST['link'] : '';
   $gambar['name'] = isset($_FILES['gambar']) ? $_FILES['gambar'] : '';
   $id = isset($_POST['id']) ? $_POST['id'] : '';
   
   var_dump($_FILES); 

	//SIMPAN DATA
	if (isset($_POST['simpan'])){
		$id = $_POST['id'];
		$link = mysql_real_escape_string($_POST['link']);
		//$gambar = $_POST['gambar'];
		
		//print_r($_POST); die(); 
		
		echo $link;
		echo $gambar['name'];
		}
		
		//Cek apakah ada file yang diupload
		if((!empty($_FILES['uploaded_file'])) && ($_FILES['uploaded_file']['error'] == 0)){
			//$gambar = uploadPicture('uploaded_file');
		
			$target_path = "Images/";

			$target_path = $target_path . basename( $_FILES['uploaded_file']['name']); 

			$gambar['name'] = $target_path; 
			
			if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $target_path)) {
    			echo "The file ".  basename( $_FILES['uploaded_file']['name']). 
   			" has been uploaded";
			
			// I add this to test insert data
			//mysql_query("INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar."')");
			
			} else{
 		   echo "There was an error uploading the file, please try again!";
			}

		}
		
		if (empty($id)){
			$sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')";
			echo $sqlstr;
		}else{
			$sqlstr = "UPDATE banner SET link = '".$link."',gambar = '".$gambar['name']."' WHERE id =".$id;
		
		$result = mysql_query($sqlstr) or die(mysql_error());
				
		$confirmation = ($result)? "Data telah tersimpan.":"Gagal menyimpan data.";
		$gambar['name'] = "";
		$link = "";
		$id = "";
		}
		
	
	//EDIT / DELETE MODE
	if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){
		if ($_REQUEST['mode'] == 'delete'){
			$result = mysql_query("DELETE FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
			$confirmation = ($result)? "Data telah terhapus.":"Gagal menghapus data.";
		}elseif ($_REQUEST['mode'] == 'edit'){
			$result = mysql_query("SELECT * FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
			
			if ($data = mysql_fetch_array($result)){
			    $id = $data['id'];
			    $link = $data['link'];
			    $gambar['name'] = $data['gambar'];
			}
		}
	}
	?>

<div align="center">
	<div style="width:700px;text-align:left;padding-top:25px;">
	<div class="pageTitle">Banner Manager</div>
	<?php //echo $confirmation; ?><br/>
	<form method="post" enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']?>">
		<table width="700px" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td>Link</td>
			<td>
				<input type="text" name="link" value="<?php echo $link; ?>"/> Contoh: http://www.garudanews.co.cc
				<input type="hidden" name="id" value="<?php echo $id; ?>"/>
			</td>
		</tr>
		<tr>
			<td>Gambar</td>
			<td><input type="file" name="gambar"/></td>
		</tr>
		<tr>
			<td colspan="2">
				<?php
				if (!empty($_REQUEST['id'])){
				?>
					<img src="<?php echo $gambar['name'];?>" alt="gambar"/>
					<input type="hidden" name="gambar" value="<?php echo $gambar['name']; ?>"/>
				<?php
				}
				?>
			</td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" name="simpan" value="Simpan"/></td>
		</tr>
	</table>
	</form>
	<hr/>
	
	<table width="400px" border="1" cellpadding="2" cellspacing="0">
		<tr>
			<th>Banner</th>
			<th>Action</th>
		</tr>
		<?php
		//LOAD BANNER AND ACTION MODE
		$result = mysql_query("SELECT * FROM banner");
		while ($data = mysql_fetch_array($result)){
		?>
			<tr>
				<td><?php echo $data['link'];?></td>
				<td>
					<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&amp;mode=delete">Hapus</a> | 
					<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&amp;mode=edit">Edit</a>
				</td>
			</tr>
		<?php
		}
		?>
	</table>
	</div>
</div>
<?php	
	//include('includes/footer.php');
?>
0

I cannot attached the sql file. invalid file errors. Therefore I just copy and paste it here.

-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 16, 2011 at 10:28 AM
-- Server version: 5.5.8
-- PHP Version: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `template`
--

-- --------------------------------------------------------

--
-- Table structure for table `banner`
--

CREATE TABLE IF NOT EXISTS `banner` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `link` varchar(50) NOT NULL,
  `gambar` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `banner`
--

The connection to the sql file is attached. It's localhost as of now.

Attachments
<?php

// koneksi database
$server = "localhost";
$username = "root";
$password = "";
$database = "template";

// memilih database di server
mysql_connect($server,$username,$password) or die("Koneksi gagal");
mysql_select_db($database) or die("Database tidak bisa dibuka");

?>
0

I have attached working file but here is your mistake, you used uploaded_file while your form says gambar. Also compare your formaer and current to see some little changes!

Attachments
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin</title>
<link href="admin-style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="includes/navstyleadmin.css" />
<script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="includes/superfish.js"></script>
<script type="text/javascript">
jQuery(function(){
	jQuery('ul.menu').superfish({
		animation: {opacity:'show',height:'show'},
		speed: 'slow', 
		autoArrows: true
	});
});
</script>

<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>

<body>
<div id="header">
      <p><a href="#">Home </a>| <a href="index.php">Logout </a>| <a href="admin.php">Admin Panel</a></p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    </div>
    
    <div id="search">
      
      <form action="search.php" method="post" name="login" target="_self" id="login" style="style.css" title="search">
      	<br>
        <label>search :
        <input type="text" name="search" id="search2" />
</label>
        <br />
                    
      </form> 		
	</div>
    
    <div id="menu">
            
<?php //include ("includes/navigation_admin.php"); ?>
<?php
	
	include ("koneksi.php");
	
	
   //$_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : '';
   $link = isset($_POST['link']) ? $_POST['link'] : '';
   $gambar = isset($_FILES['gambar']) ? $_FILES['gambar'] : '';
   $id = isset($_POST['id']) ? $_POST['id'] : '';
   
   
   //var_dump($_FILES); 

	//SIMPAN DATA
	if (isset($_POST['simpan'])){
		$id = $_POST['id'];
		$link = mysql_real_escape_string($_POST['link']);
		//$gambar = $_POST['gambar'];
		
		//print_r($_POST); die(); 
		 
		} 
		
		//Cek apakah ada file yang diupload
		if(/*(!empty($_FILES['gambar'])) && */(!$_FILES['gambar']['error'] > 0)){
		 //print_r($_FILES);
		 //die("Here I failed");
 
			//$gambar = uploadPicture('gambar');
		
			$target_path = "images/";
			$target_path = $target_path . basename( $_FILES['gambar']['name']); 

			//$gambar['name'] = $target_path; 
			
			if(move_uploaded_file($_FILES['gambar']['tmp_name'], $target_path)) {
    			echo "The file ".  basename( $_FILES['gambar']['name']). 
   			" has been uploaded";
			
			// I add this to test insert data
			mysql_query("INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')");
			
			} else{
 		   echo "There was an error uploading the file, please try again!";
			}

		}
		
		if (empty($id)){
			$sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')";
			//echo $sqlstr;
		}else{
			$sqlstr = "UPDATE banner SET link = '".$link."',gambar = '".$gambar['name']."' WHERE id =".$id;
		
		$result = mysql_query($sqlstr) or die(mysql_error());
				
		$confirmation = ($result)? "Data telah tersimpan.":"Gagal menyimpan data.";
		$gambar['name'] = "";
		$link = "";
		$id = "";
		}
		
	
	//EDIT / DELETE MODE
	if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){
		if ($_REQUEST['mode'] == 'delete'){
			$result = mysql_query("DELETE FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
			$confirmation = ($result)? "Data telah terhapus.":"Gagal menghapus data.";
		}elseif ($_REQUEST['mode'] == 'edit'){
			$result = mysql_query("SELECT * FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
			
			if ($data = mysql_fetch_array($result)){
			    $id = $data['id'];
			    $link = $data['link'];
			    $gambar['name'] = $data['gambar'];
			}
		}
	}
	?>

<div align="center">
	<div style="width:700px;text-align:left;padding-top:25px;">
	<div class="pageTitle">Banner Manager</div>
	<?php //echo $confirmation; ?><br/>
	<form method="post" enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']?>">
		<table width="700px" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td>Link</td>
			<td>
				<input type="text" name="link" value="<?php echo $link; ?>"/> Contoh: http://www.garudanews.co.cc
				<input type="hidden" name="id" value="<?php echo $id; ?>"/>
			</td>
		</tr>
		<tr>
			<td>Gambar</td>
			<td><input type="file" name="gambar"/></td>
		</tr>
		<tr>
			<td colspan="2">
				<?php
				if (!empty($_REQUEST['id'])){
				?>
					<img src="<?php echo $gambar['name'];?>" alt="gambar"/>
					<input type="hidden" name="gambar" value="<?php echo $gambar['name']; ?>"/>
				<?php
				}
				?>
			</td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" name="simpan" value="Simpan"/></td>
		</tr>
	</table>
	</form>
	<hr/>
	
	<table width="400px" border="1" cellpadding="2" cellspacing="0">
		<tr>
			<th>Banner</th>
			<th>Action</th>
		</tr>
		<?php
		//LOAD BANNER AND ACTION MODE
		$result = mysql_query("SELECT * FROM banner");
		while ($data = mysql_fetch_array($result)){
		?>
			<tr>
				<td><?php echo $data['link'];?></td>
				<td>
					<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&amp;mode=delete">Hapus</a> | 
					<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&amp;mode=edit">Edit</a>
				</td>
			</tr>
		<?php
		}
		?>
	</table>
	</div>
</div>
<?php	
	//include('includes/footer.php');
?>
0

I have the following error for the file that gave me:

--------------
Notice: Undefined index: gambar in C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 74

Notice: Undefined index: gambar in C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 81

Notice: Undefined index: gambar in
C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 85
There was an error uploading the file, please try again!

Notice: Uninitialized string offset: 0 in C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 99

-----------

undefined index gambar (basically for the name (uploaded_file) that you replace with gambar.

Edited by davy_yg: n/a

0

it works fine with me. note that I did some little changes and I don't remember all of them. Check with your old code and see what have changed which might not be in your machine (One of the things is I commented out includes)

0

line 74: if(/*(!empty($_FILES)) && */(!$_FILES > 0)){

line 81: $target_path = $target_path . basename( $_FILES);

line 85: if(move_uploaded_file($_FILES, $target_path)) {

line 99: $sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar."')";

(Notice: Uninitialized string offset: 0 in C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 99)

I checked your code, I do not know why the undefined appears after you change to . I highlighted in red the cause of the undefined. I was thinking what you did was just to be consistent with form variable name correct?

------

the codes does capture the information and put it in the database. Just there are view similar errors that I have to deal with. how to handle the undefined thing? how to define $_FILES ?

Edited by davy_yg: n/a

0

line 74: if(/*(!empty($_FILES)) && */(!$_FILES > 0)){

line 81: $target_path = $target_path . basename( $_FILES);

line 85: if(move_uploaded_file($_FILES, $target_path)) {

line 99: $sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar."')";

(Notice: Uninitialized string offset: 0 in C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 99)

I checked your code, I do not know why the undefined appears after you change to . I highlighted in red the cause of the undefined. I was thinking what you did was just to be consistent with form variable name correct?

------

the codes does capture the information and put it in the database. Just there are view similar errors that I have to deal with. how to handle the undefined thing? how to define $_FILES ?

did you do any change to a file or you tested the file I attached?

the codes does capture the information and put it in the database. Just there are view similar errors that I have to deal with. how to handle the undefined thing? how to define $_FILES ?

The error is explained here, here

Edited by Stefano Mtangoo: n/a

0

Well, I only adjust couple things to my machine that you comment out such as the includes function("includes\koneksi") and enable the admin navigation panel. Other then that, I just tested the code that gave me.

Mmmm.. I don't quite understand the explanation so what other changes do I need to make?

0

Well, I only adjust couple things to my machine that you comment out such as the includes function("includes\koneksi") and enable the admin navigation panel. Other then that, I just tested the code that gave me.

Mmmm.. I don't quite understand the explanation so what other changes do I need to make?

what happens if you comment the nav pannel?

0

if I comment out the navigation pannel, simply the admin nav would be disappeared.

0

if I comment out the navigation pannel, simply the admin nav would be disappeared.

I mean does error disappear?
Let me check error level in my apache/php

0

finally I got it.
The problem is, when file first loaded, there is no such index as gambar in $_FILES array and hence the error. But when file is submitted then gambar is defined. So I wrapped whole gambar thing into if as attached file is. You should not get errors anymore!
BTW what is the language in comments, I was having trouble understanding some gambar et al ;)

Attachments
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin</title>
<link href="admin-style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="includes/navstyleadmin.css" />
<script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="includes/superfish.js"></script>
<script type="text/javascript">
jQuery(function(){
	jQuery('ul.menu').superfish({
		animation: {opacity:'show',height:'show'},
		speed: 'slow', 
		autoArrows: true
	});
});
</script>

<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>

<body>
<div id="header">
      <p><a href="#">Home </a>| <a href="index.php">Logout </a>| <a href="admin.php">Admin Panel</a></p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    </div>
    
    <div id="search">
      
      <form action="search.php" method="post" name="login" target="_self" id="login" style="style.css" title="search">
      	<br>
        <label>search :
        <input type="text" name="search" id="search2" />
</label>
        <br />
                    
      </form> 		
	</div>
    
    <div id="menu">
            
<?php //include ("includes/navigation_admin.php"); ?>
<?php
	/*Set to production/Development modes*/
    ini_set("display_errors", 1);
    error_reporting(E_ALL);
	include ("koneksi.php");
	
	
   //$_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : '';
   $link = isset($_POST['link']) ? $_POST['link'] : '';
   $gambar = isset($_FILES['gambar']) ? $_FILES['gambar'] : '';
   $id = isset($_POST['id']) ? $_POST['id'] : '';
   
   
   //var_dump($_FILES); 

	//SIMPAN DATA
	if (isset($_POST['simpan'])){
		$id = $_POST['id'];
		$link = mysql_real_escape_string($_POST['link']);
		//$gambar = $_POST['gambar'];
		
		//print_r($_POST); die(); 
		 
		 
		
		//Cek apakah ada file yang diupload
		
		if(/*(!empty($_FILES['gambar'])) && */(!$_FILES['gambar']['error'] > 0)){
		 //print_r($_FILES);
		 //die("Here I failed");
 
			//$gambar = uploadPicture('gambar');
		
			$target_path = "images/";
			$target_path = $target_path . basename( $_FILES['gambar']['name']); 

			//$gambar['name'] = $target_path; 
			
			if(move_uploaded_file($_FILES['gambar']['tmp_name'], $target_path)) {
    			echo "The file ".  basename( $_FILES['gambar']['name']). 
   			" has been uploaded";
			
			// I add this to test insert data
			mysql_query("INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')");
			
			} else{
 		   echo "There was an error uploading the file, please try again!";
			}

		}
		
		if (empty($id)){
			$sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')";
			//echo $sqlstr;
		}else{
			$sqlstr = "UPDATE banner SET link = '".$link."',gambar = '".$gambar['name']."' WHERE id =".$id;
		
		$result = mysql_query($sqlstr) or die(mysql_error());
				
		$confirmation = ($result)? "Data telah tersimpan.":"Gagal menyimpan data.";
		$gambar['name'] = "";
		$link = "";
		$id = "";
		}
		
	
	//EDIT / DELETE MODE
	if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){
		if ($_REQUEST['mode'] == 'delete'){
			$result = mysql_query("DELETE FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
			$confirmation = ($result)? "Data telah terhapus.":"Gagal menghapus data.";
		}elseif ($_REQUEST['mode'] == 'edit'){
			$result = mysql_query("SELECT * FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
			
			if ($data = mysql_fetch_array($result)){
			    $id = $data['id'];
			    $link = $data['link'];
			    $gambar['name'] = $data['gambar'];
			}
		}
	}
}
	?>

<div align="center">
	<div style="width:700px;text-align:left;padding-top:25px;">
	<div class="pageTitle">Banner Manager</div>
	<?php //echo $confirmation; ?><br/>
	<form method="post" enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']?>">
		<table width="700px" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td>Link</td>
			<td>
				<input type="text" name="link" value="<?php echo $link; ?>"/> Contoh: http://www.garudanews.co.cc
				<input type="hidden" name="id" value="<?php echo $id; ?>"/>
			</td>
		</tr>
		<tr>
			<td>Gambar</td>
			<td><input type="file" name="gambar"/></td>
		</tr>
		<tr>
			<td colspan="2">
				<?php
				if (!empty($_REQUEST['id'])){
				?>
					<img src="<?php echo $gambar['name'];?>" alt="gambar"/>
					<input type="hidden" name="gambar" value="<?php echo $gambar['name']; ?>"/>
				<?php
				}
				?>
			</td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" name="simpan" value="Simpan"/></td>
		</tr>
	</table>
	</form>
	<hr/>
	
	<table width="400px" border="1" cellpadding="2" cellspacing="0">
		<tr>
			<th>Banner</th>
			<th>Action</th>
		</tr>
		<?php
		//LOAD BANNER AND ACTION MODE
		$result = mysql_query("SELECT * FROM banner");
		while ($data = mysql_fetch_array($result)){
		?>
			<tr>
				<td><?php echo $data['link'];?></td>
				<td>
					<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&amp;mode=delete">Hapus</a> | 
					<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&amp;mode=edit">Edit</a>
				</td>
			</tr>
		<?php
		}
		?>
	</table>
	</div>
</div>
<?php	
	//include('includes/footer.php');
?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.