Sunday, 30 June 2013

Insert Coding using mysql

Insert Coding Using Mqsql :

This insert coding is used to  insert the values into the database using mysql.. This will be very usefull for the beginners who is learning PHP....

    $varname1=$_POST['fieldname1']; //field name in the form
    //insert coding
    $insert=mysql_query("insert into tablename(fieldname1 in database,fieldname2,fieldname3) values ('$varname1','$varname2','$varname3')") or mysql_error(); 
   //field name in the Database
        echo "Inserted";

Thursday, 27 June 2013

On Hover Star Rating with Database

<form name="aform" method="post">
<div id="rateMe" title="Rate Me...">
    <a onclick="rateIt(this)" id="_1" title="Very Poor" onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_2" title="Poor " onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_3" title="Good" onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_4" title="Very Good" onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_5" title="Excellent" onmouseover="rating(this)" onmouseout="off(this)"></a>&nbsp;&nbsp;&nbsp;&nbsp;
        <textarea  id="rateStatus" name="user_rate" hidden="hidden" ></textarea>
              <span id="ratingSaved"></span>
              <span id="rate5"></span>
        <input type="submit" name="sub" class="submit" value="submit"/>

Wednesday, 26 June 2013

Multiple Select box with select & disable concept

Download Coading : Multiple select field

Index :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="chosen.css" rel="stylesheet" />
<title>Multiple Select box with select & disable concept</title>


          <p><em>Multiple Select</em>&nbsp;&nbsp;
          <select data-placeholder=" Types Your Favorite"  multiple class="chzn-select" tabindex="8" size="20" >
            <option value=""></option>
            <option>Web Designing</option>
            <option>Web Developer</option>
            <option>Web Hosting</option>
            <option selected>Bpo</option>
            <option disabled>Software</option>
            <option selected>Networking</option>
            <option disabled>Web Technology</option>

Script :

<script src="prototype.js" type="text/javascript"></script>
<script src="chosen.proto.js" type="text/javascript"></script>
 <script type="text/javascript">
        document.observe('dom:loaded', function(evt) {
        var config = {
        '.chzn-select'           : {},
        '.chzn-select-deselect'  : {allow_single_deselect:true},
        '.chzn-select-no-single' : {disable_search_threshold:10},
        '.chzn-select-no-results': {no_results_text: "Oops, nothing found!"},
        '.chzn-select-width'     : {width: "95%"}
        var results = [];
        for (var selector in config) {
        var elements = $$(selector);
        for (var i = 0; i < elements.length; i++) {
          results.push(new Chosen(elements[i],config[selector]));
        return results;

Friday, 21 June 2013

Uploading videos in MP4 Format

Live demo :

MP4 Video format coding :

Download Coding :  MP4video format

Script :

<script type="text/javascript" src="videofiles/swfobject.js"></script>
       <script type="text/javascript">
        var attributes = {};

        var params = {};
        // for fullscreen
        params.allowfullscreen = "true";

        var flashvars = {};
        // the video file or the playlist file
        flashvars.file = "Brave Kitten Stands Up to Dog - YouTube.mp4";
        //flashvars.file = "upload/vclassvideo/1296426907_Rajini video songs.flv.mp4";
        // the PHP script NONE FOR LOCAL ACCESS
        //flashvars.streamscript = "flvprovider.php";
        //flashvars.bufferlength = "1.5";

        // width and height of the player (h is height of the video + 20 for controlbar)
        // required for IE7
        flashvars.width = "520";
        flashvars.height = "460";
        // width  and height of the video
        flashvars.displaywidth = "520";
        flashvars.displayheight = "460";
        flashvars.autostart = "true";
        flashvars.showdigits = "true";

        // for fullscreen
        flashvars.showfsbutton = "true";

        // 9 for Flash Player 9 (for ON2 Codec and FullScreen)


Index :

<div id="flashcontent">
  <p>To view this video you need JavaScript enabled and the latest Adobe Flash Player installed.  <br />
    <a href="">Download the free Flash Player now</a>.</p>
  <p><a href=""><img src="" alt="Download Flash Player" style="border: none;" /></a></p>