MySQL version
Server: localhost via TCP/IP
Server version: 5.5.16
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)
thank u for your time !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
homepage.php
- Code: Select all
<?php error_reporting (E_ALL ^ E_NOTICE); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>untitled-3.jpg</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}</style>
<!--Fireworks CS3 Generic target. Created Fri Jan 20 17:14:29 GMT-0500 (Eastern Standard Time) 2012-->
<script language="JavaScript1.2" type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<center>
<body style="overflow:hidden;" bgcolor="#ffffff" onload="MM_preloadImages('images/untitled-3_r2_c2_s2.jpg','images/untitled-3_r2_c4_s2.jpg','images/untitled-3_r4_c2_s2.jpg','images/untitled-3_r6_c2_s2.jpg','images/untitled-3_r8_c2_s2.jpg','images/untitled-3_r10_c2_s2.jpg','images/untitled-3_r12_c2_s2.jpg','images/untitled-3_r12_c4_s2.jpg');">
<table border="0" cellpadding="0" cellspacing="0" width="1200">
<!-- fwtable fwsrc="Untitled" fwpage="Page 1" fwbase="untitled-3.jpg" fwstyle="Generic" fwdocid = "153907550" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="25" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="199" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="929" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="46" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5"> </td>
<td><img src="images/spacer.gif" width="1" height="31" border="0" alt="" /></td>
</tr>
<tr>
<td rowspan="12"><img name="untitled3_r2_c1_s1" src="images/untitled-3_r2_c1_s1.jpg" width="25" height="669" border="0" id="untitled3_r2_c1_s1" alt="" /></td>
<td><a href="http://gmail.com" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r2_c2_s1','','images/untitled-3_r2_c2_s2.jpg',1);"><img name="untitled3_r2_c2_s1" src="images/untitled-3_r2_c2_s1.jpg" width="199" height="100" border="0" id="untitled3_r2_c2_s1" alt="" /></a></td>
<td rowspan="12"><img name="untitled3_r2_c3_s1" src="images/untitled-3_r2_c3_s1.jpg" width="1" height="669" border="0" id="untitled3_r2_c3_s1" alt="" /></td>
<td><a href="homepage.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r2_c4_s1','','images/untitled-3_r2_c4_s2.jpg',1);"><img name="untitled3_r2_c4_s1" src="images/untitled-3_r2_c4_s1.jpg" width="929" height="100" border="0" id="untitled3_r2_c4_s1" alt="" /></a></td>
<td rowspan="12"><img name="untitled3_r2_c5_s1" src="images/untitled-3_r2_c5_s1.jpg" width="46" height="669" border="0" id="untitled3_r2_c5_s1" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="untitled3_r3_c2_s1" src="images/untitled-3_r3_c2_s1.jpg" width="199" height="3" border="0" id="untitled3_r3_c2_s1" alt="" /></td>
<td rowspan="9"> </td>
<td><img src="images/spacer.gif" width="1" height="3" border="0" alt="" /></td>
</tr>
<tr>
<td><a href="http://www.youtube.com" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r4_c2_s1','','images/untitled-3_r4_c2_s2.jpg',1);"><img name="untitled3_r4_c2_s1" src="images/untitled-3_r4_c2_s1.jpg" width="199" height="100" border="0" id="untitled3_r4_c2_s1" alt="" /></a></td>
<td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="untitled3_r5_c2_s1" src="images/untitled-3_r5_c2_s1.jpg" width="199" height="3" border="0" id="untitled3_r5_c2_s1" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0" alt="" /></td>
</tr>
<tr>
<td><a href="http://jacksonville.craigslist.org/" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r6_c2_s1','','images/untitled-3_r6_c2_s2.jpg',1);"><img name="untitled3_r6_c2_s1" src="images/untitled-3_r6_c2_s1.jpg" width="199" height="100" border="0" id="untitled3_r6_c2_s1" alt="" /></a></td>
<td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="untitled3_r7_c2_s1" src="images/untitled-3_r7_c2_s1.jpg" width="199" height="3" border="0" id="untitled3_r7_c2_s1" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0" alt="" /></td>
</tr>
<tr>
<td><a href="http://www.pandora.com/" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r8_c2_s1','','images/untitled-3_r8_c2_s2.jpg',1);"><img name="untitled3_r8_c2_s1" src="images/untitled-3_r8_c2_s1.jpg" width="199" height="100" border="0" id="untitled3_r8_c2_s1" alt="" /></a></td>
<td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="untitled3_r9_c2_s1" src="images/untitled-3_r9_c2_s1.jpg" width="199" height="3" border="0" id="untitled3_r9_c2_s1" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0" alt="" /></td>
</tr>
<tr>
<td><a href="http://www.lynda.com/" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r10_c2_s1','','images/untitled-3_r10_c2_s2.jpg',1);"><img name="untitled3_r10_c2_s1" src="images/untitled-3_r10_c2_s1.jpg" width="199" height="100" border="0" id="untitled3_r10_c2_s1" alt="" /></a></td>
<td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="untitled3_r11_c2_s1" src="images/untitled-3_r11_c2_s1.jpg" width="199" height="3" border="0" id="untitled3_r11_c2_s1" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0" alt="" /></td>
</tr>
<tr>
<td><a href="bookmarks.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r12_c2_s1','','images/untitled-3_r12_c2_s2.jpg',1);"><img name="untitled3_r12_c2_s1" src="images/untitled-3_r12_c2_s1.jpg" width="199" height="100" border="0" id="untitled3_r12_c2_s1" alt="" /></a></td>
<td><a href="contacts.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('untitled3_r12_c4_s1','','images/untitled-3_r12_c4_s2.jpg',1);"><img name="untitled3_r12_c4_s1" src="images/untitled-3_r12_c4_s1.jpg" width="929" height="100" border="0" id="untitled3_r12_c4_s1" alt="" /></a></td>
<td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="untitled3_r13_c2_s1" src="images/untitled-3_r13_c2_s1.jpg" width="199" height="54" border="0" id="untitled3_r13_c2_s1" alt="" /></td>
<td> </td>
<td><img src="images/spacer.gif" width="1" height="54" border="0" alt="" /></td>
</tr>
</table>
<div id="databox" style="position:absolute; top:135px;
left:307px; overflow:auto; height:400px; width:910px; font-family:'bankGothic Md BT'; text-shadow:1px 1px 1px #000; color:#3399FF;">
<?php include("comment.php"); ?>
</div>
</body>
</center>
</html>
comment.php
- Code: Select all
<?php
require('connect.php');
$comment=$_POST['comment'];
$submit=$_POST['submit'];
if($submit)
{
if($comment)
{
$query=mysql_query("INSERT INTO comment (id,comment) VALUES ('','$comment')");
header("Location: success.php");
}
else
{
echo "Please fill out all the fields.";
}
}
?>
<html>
<head></head>
<body>
<form action="comment.php" method="POST">
<br /><br />
<label>Enter Data: </label><br /><textarea name="comment" cols="80" rows="1"></textarea><br/>
<input type="submit" name="submit" value="Post" />
</form>
</body>
<?php
require('connect.php');
$query=mysql_query("SELECT * FROM comment ORDER BY id DESC");
while($rows=mysql_fetch_assoc($query))
{
$id=$rows['id'];
$dcomment=$rows['comment'];
$linkdel="<a href=\"delete.php?id=" . $rows['id'] . "\">Delete Data</a>";
echo '<br />' . '<font color="#000099">Data:</font> ' . '<br />' . $dcomment . ' ' . ' ' .
' ' . ' ' . $linkdel ;
}
?>
</html>
connect.php
- Code: Select all
<?php
$connect=mysql_connect("localhost","root","") or die('mysql_error()');
$database=mysql_select_db("comment") or die('mysql_error()');
?>
delete.php
- Code: Select all
<?php
require('connect.php');
$deleteid=$_GET['id'];
mysql_query("DELETE FROM comment WHERE id='$deleteid'");
header("location: success.php");
?>
success.php
- Code: Select all
<?php
header("Location: homepage.php");
?>
comment.sql
- Code: Select all
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 07, 2011 at 03:27 PM
-- Server version: 5.1.53
-- PHP Version: 5.3.4
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: `comment`
--
-- --------------------------------------------------------
--
-- Table structure for table `comment`
--
CREATE TABLE IF NOT EXISTS `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`comment` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `comment`
--
INSERT INTO `comment` (`id`, `name`, `comment`) VALUES
(1, 'hi'),
(2, 'bye');


