Tried Jquery basics

I have been had a nice time by trying a Slide UP and Down Div using the Jquery…For this i have been watching a video in Youtube and googling for 3 days…

Atlast I have been successfully completed and make a small Jquery HTML code running..


Here is the code for you people to try it…


Untitled Document

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$("div#msgbox").html("Data added Successfully");
return false;


body{font-family:Arial, Helvetica, sans-serif;font-size:75%}
div#msgbox msg{line-height:30px;padding-left:10px;}
<div id="msgbox"><span id="msg"></span></div>
<form id="commentform">
Name<input type="text" id="name" />
Comment<input type="text" id="comment" />
<input type="submit" id="addcomment" value="Post comment" />

Before going to the PHP File, make sure that you have created a Database with the table and its corresponding Field,

Name varchar(30);
Comment varchar(30);

PHP File

die("could not connect" . mysql_error());
$sql="insert into db_table(Name,Comment) values('$name1','$comment1')";

Now run the File and check out and try learn new things.

Njoy and keep sharing


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s