Normal OOP Registration

1.Method Create

<?php

class Crud {

	public $conn;

	public function __construct() {
		$this->conn = mysqli_connect( "localhost", "root", "", "fresh" );
		if ( mysqli_connect() ) {
			//echo "Connect Successfully";
		} else {
			die( "connection error" );
		}
		session_start();
	}

	/* registration insert */

	public function regiInsert( $table, $firstname, $lastname, $username, $email, $password, $phone, $gender, $address ) {
		$query = mysqli_query( $this->conn, "INSERT INTO $table SET firstname='$firstname', lastname='$lastname', username='$username', email='$email', password='$password', phone='$phone', gender='$gender', address='$address' " );
		if ( mysqli_affected_rows( $this->conn ) > 0 ) {
			return true;
		} else {
			return false;
		}
	}


}

$obj = new Crud();

2.registration.php

<?php
include_once('../crud.php');
if (isset($_REQUEST['save'])) {
    //echo "<pre>";
    //print_r($_REQUEST);
    extract($_REQUEST);
    if ($obj->regiInsert("registration", $firstname, $lastname, $username, $email, sha1($password), $phone, $gender, $address)) {
        $err_msg = "Successfully You Registered, Please Sign in";
    } else {
        $err_msg = "Your registration not include";
    }
}
if(isset($_SESSION['username'])){
	header('location:home.php');
}
?>



<!doctype html>
<html>
    <head>
        <title>Registration Form</title>
        <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css"/>

        <!-- BootstrapValidator CSS -->
        <link rel="stylesheet" href="../bootstrap/css/bootstrapValidator.min.css"/>

        <!-- jQuery and Bootstrap JS -->
        <script type="text/javascript" src="../bootstrap/js/jquery-1.11.3.min.js"></script>
        <script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>

        <!-- BootstrapValidator JS -->
        <script type="text/javascript" src="../bootstrap/js/bootstrapValidator.min.js"></script>
    </head>
    <body>
        <div class="container">
            <div class="row">
                <div style="border: 1px solid #ddd; padding: 0 0 15px;" class="col-md-8 col-md-offset-2">
                    <div class="page-header">
                        <h2 style="text-align: center; font-family: initial;">Sign up</h2>
                        <p style="text-align:center; color: #4D73E4;">
                            <?php
                            echo isset($err_msg) ? $err_msg : "";
                            ?>
                        </p>
                    </div>

                    <form action="registration.php" id="registrationForm" method="post" class="form-horizontal">

                        <div class="form-group">
                            <label class="col-xs-3 control-label">Full name</label>
                            <div class="col-xs-4">
                                <input type="text" class="form-control" name="firstname" placeholder="First name" />
                            </div>
                            <div class="col-xs-4">
                                <input type="text" class="form-control" name="lastname" placeholder="Last name" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">Username</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" name="username" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">Email address</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" name="email" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">Password</label>
                            <div class="col-sm-5">
                                <input type="password" class="form-control" name="password" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-3 control-label">Phone number</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" name="phone" placeholder="Phone Number" />
                            </div>
                        </div>	

                        <div class="form-group">
                            <label class="col-sm-3 control-label">Gender</label>
                            <div class="col-sm-5">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="gender" value="male" /> Male
                                    </label>
                                </div>
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="gender" value="female" /> Female
                                    </label>
                                </div>
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="gender" value="other" /> Other
                                    </label>
                                </div>
                            </div>
                        </div>
                        <!-- 
                        <div class="form-group">
                             <label class="col-sm-3 control-label">Date of birth</label>
                             <div class="col-sm-5">
                                 <input type="date" class="form-control" name="date"  placeholder="YYYY/MM/DD" />
                             </div>
                         </div>-->

                        <div class="form-group">
                            <label class="col-sm-3 control-label">Address</label>
                            <div class="col-sm-5">
                                <textarea name="address" class="form-control" rows="5" cols="25"></textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- Do NOT use name="submit" or id="submit" for the Submit button -->
                                <button type="submit" name="save" value="submit" class="btn btn-default">Sign up</button>
                                <a class="btn btn-default" href="http://127.0.0.1/ibcs/fresh/template/admin/">Sign In</a>
                            </div>
                            
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <script>
            $(document).ready(function () {
                $('#registrationForm').bootstrapValidator({
                    // To use feedback icons, ensure that you use Bootstrap v3.1.0 or later
                    feedbackIcons: {
                        valid: 'glyphicon glyphicon-ok',
                        invalid: 'glyphicon glyphicon-remove',
                        validating: 'glyphicon glyphicon-refresh'
                    },
                    fields: {
                        firstname: {
                            row: '.col-xs-4',
                            validators: {
                                notEmpty: {
                                    message: 'The first name is required'
                                }
                            }
                        },
                        lastname: {
                            row: '.col-xs-4',
                            validators: {
                                notEmpty: {
                                    message: 'The last name is required'
                                }
                            }
                        },
                        username: {
                            message: 'The username is not valid',
                            validators: {
                                notEmpty: {
                                    message: 'The username is required and cannot be empty'
                                },
                                stringLength: {
                                    min: 6,
                                    max: 30,
                                    message: 'The username must be more than 6 and less than 30 characters long'
                                },
                                regexp: {
                                    regexp: /^[a-zA-Z0-9]+$/,
                                    message: 'The username can only consist of alphabetical and number'
                                },
                                different: {
                                    field: 'password',
                                    message: 'The username and password cannot be the same as each other'
                                }
                            }
                        },
                        email: {
                            validators: {
                                notEmpty: {
                                    message: 'The email address is required and cannot be empty'
                                },
                                emailAddress: {
                                    message: 'The email address is not a valid'
                                }
                            }
                        },
                        password: {
                            validators: {
                                notEmpty: {
                                    message: 'The password is required and cannot be empty'
                                },
                                different: {
                                    field: 'username',
                                    message: 'The password cannot be the same as username'
                                },
                                stringLength: {
                                    min: 8,
                                    message: 'The password must have at least 8 characters'
                                }
                            }
                        },
                        phone: {
                            row: '.col-xs-5',
                            validators: {
                                notEmpty: {
                                    message: 'The cell phone number is required'
                                }
                            }
                        },
                        birthday: {
                            validators: {
                                notEmpty: {
                                    message: 'The date of birth is required'
                                },
                                date: {
                                    format: 'YYYY/MM/DD',
                                    message: 'The date of birth is not valid'
                                }
                            }
                        },
                        gender: {
                            validators: {
                                notEmpty: {
                                    message: 'The gender is required'
                                }
                            }
                        }
                        ,
                        address: {
                            validators: {
                                notEmpty: {
                                    message: 'Please input your valid address'
                                }
                            }
                        }
                    }
                });
            });
        </script>
    </body>
</html>

3.looking like this
registration

Advertisements

WordPress Help Code


|| favicon icon:
   <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />

|| shortcode
   [bestwebsoft_contact_form]
   <?php echo do_shortcode('[bestwebsoft_contact_form]'); ?>

|| Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
   Please contact the server administrator webmaster@...

--How to Fix the Internal Server Error--
. At first check admin > settings > permalinks > select post name
. check for the corrupted .htaccess file
  /* http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/ */


|| Cause of Free theme uses, footer link redirect
   wp index.php?theme_license=true

   This problem have to do solve:
   <?php
	/*  function.php just notice this following code in the end*/
		function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) {--------}
	 
	/*  replace up this code */
	 
		function wp_initialize_the_theme_load(){ 
			if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } 
		} 

		function wp_initialize_the_theme_finish() {$uri = strtolower($_SERVER["REQUEST_URI"]); 
			if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { /* */ } 
		} 
			wp_initialize_the_theme_finish();
	 
	/* now can change footer.php powered by link */ 

	/* if you want, You can remove this code. lib>Themater.php,*/
		if (!empty($_REQUEST["theme_license"])) {----}
		
	 
   ?>


Dynamic category show in a page:
==================================
<?php
 wp_list_categories('hide_empty=0&show_count=1&title_li=
 <h3>' . __('All Categories') . '</h3>' ); 
?>

WordPress Fix – Add Media Button Not Working:
=============================================
Basically you need to open your “wp-config.php” file in the root of your WordPress Install.
Search for this line:
  <?php require_once(ABSPATH . 'wp-settings.php'); ?>

And just before it add this code:
  <?php define('CONCATENATE_SCRIPTS', false ); ?>

/****************************/

Woocommerce:
===============

|| How To Change Product Images Size?
   1st woocommerce > setting > product > Display > Product Images
   2nd Regenerate Thumbnails plugins install and active
   tutorial link: https://www.youtube.com/watch?v=YVLb3eG0JdI
   

|| product detail page sku and category
   wp-content\plugins\woocommerce\templates\single-product\meta.php

|| Product listing page product name
   content-product.php
   <a href="<?php the_permalink(); ?>">---- </a>

|| product view page review tab remove

<?php
	add_filter( 'woocommerce_product_tabs', 'sb_woo_remove_reviews_tab', 98);
	function sb_woo_remove_reviews_tab($tabs) {

	 unset($tabs['reviews']);

	 return $tabs;
	}
?>

|| product view short description:
   woocommerce/single-product/short-description.php

|| breadcrumbs slash '/' replace as '>'
   function.php

<?php
	add_filter( 'woocommerce_breadcrumb_defaults', 'my_change_breadcrumb_delimiter' );
	function my_change_breadcrumb_delimiter( $defaults ) {
	 // Change the breadcrumb delimiter from '/' to '>'
	 $defaults['delimiter'] = ' > ';
	 return $defaults;
	}
?>

|| Default breadcrumbs remove from product page:
   function.php
   <?php remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0);?>

|| prodcut view page related product remove
   function.php
   <?php remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );?>

|| Add to cart remove:
        <?php
		/* product listing page add to cart remove */
		function remove_loop_button(){
			remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
		}
		add_action('init','remove_loop_button');
			or
		remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
		
		/* product detail page add to cart remove */
		remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
		
	?>

|| Price Remove
       <?php
		/* product listing page price remove */
		remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
		/* product detail page price remove */
		remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
		
	?>

|| Where to go to edit shop/products page:

Editing the layout of items within the shop page (or any other product archive such as category, tag, etc) can be done through template files.
you need to add a folder to your theme named "woocommerce" and copy the contents from the woocommerce plugin folder under "templates"
the loop folder contains the files you want to use - that and archive-product.php
so, in your theme, you'd have something like
themefolder/woocommerce/archive-product.php
themefolder/woocommerce/loop/...
<?php
	do_action( 'woocommerce_sidebar' )
?>


|| Dynamic Product Category in sidebar:
   Appearance > Widget:
   drag and drop (WooCommerce Product Categories) in (primary sidebar) or (secondary widget area)

|| Dynamic product category anywhere:
   function.php

<?php
	/* product category */
	function wooCommerceCategories() {

		$taxonomy     = 'product_cat';
		$orderby      = 'name';  
		$show_count   = 0;      // 1 for yes, 0 for no
		$pad_counts   = 0;      // 1 for yes, 0 for no
		$hierarchical = 1;      // 1 for yes, 0 for no  
		$title        = '';  
		$empty        = 0;

		$args = array(
			'taxonomy'     => $taxonomy,
			'orderby'      => $orderby,
			'show_count'   => $show_count,
			'pad_counts'   => $pad_counts,
			'hierarchical' => $hierarchical,
			'title_li'     => $title,
			'hide_empty'   => $empty
		);
		$all_categories = get_categories( $args );
		 foreach ($all_categories as $cat) {
			if($cat->category_parent == 0) {
				$category_id = $cat->term_id;       
				echo '<br /><a href="'. get_term_link($cat->slug, 'product_cat') .'">'. $cat->name .'</a>'; 
				$args2 = array(
						'taxonomy'     => $taxonomy,
						'child_of'     => 0,
						'parent'       => $category_id,
						'orderby'      => $orderby,
						'show_count'   => $show_count,
						'pad_counts'   => $pad_counts,
						'hierarchical' => $hierarchical,
						'title_li'     => $title,
						'hide_empty'   => $empty
				);
				$sub_cats = get_categories( $args2 );
				if($sub_cats) {
					foreach($sub_cats as $sub_category) {
						echo  $sub_category->name ;
					}   
				}
			}       
		}
	}
	/**/
?>

/* function call */

<div class="product_category col-lg-1 col-md-2">
     <?php if(function_exists("wooCommerceCategories")) wooCommerceCategories(); ?>
</div>


/************************************/

|| Dashboard page href link
   <a href="index.php?page_id=###"></a>

|| separate menu click then separate content show
   twentythirteen > page.php 


|| Add Font Awesome CDN To WordPress Without A Plugin

   /* Add the Following Code to Your Theme’s functions.php File: */
   <?php
	add_action( 'wp_enqueue_scripts', 'prefix_enqueue_awesome' );
	/**
	 * Register and load font awesome CSS files using a CDN.
	 *
	 * @link   http://www.bootstrapcdn.com/#fontawesome
	 * @author FAT Media
	 */
	function prefix_enqueue_awesome() {
		wp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
	}
   ?>


For Layout
=============
<?php
|| style.css

/*
Theme Name: LenzKarft
Theme URI: http://fsb.com.bd/
Description: A clean theme completely compatible with WordPress 4.1
Author: FSB
Author URI: http://fsb.com.bd/
Version: 1.4
*/
--------------------------
?>

|| header
<!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" dir="ltr" lang="en-US">

<!-- BEGIN html head -->
	<head profile="http://gmpg.org/xfn/11">
		<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
		<meta name="viewport" content="width=device-width">
		<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
		<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
		<?php wp_head(); ?>		
	</head>
<!-- END html head -->

<!-- Start Body from here -->
	<body>
		<div id="wrapper">
			<div id="header"></div>
------------------------------------


|| Footer	
			<div class="clear"></div>
			<div id="footer"></div>
		</div><!-- End wrapper-->
	</body><!-- End Body -->
</html>
------------------------------------
|| if this get css, you have to go wordpress>wp-includes>admin-bar.php
search this: /*function _admin_bar_bump_cb()*/

html{margin-top:32px;}

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

Custom page Create
==================
1st step: include this in custom page
<?php 
/*
 Template name:Demo
*/
get_header() ;

?>

2nd step: Then go to backend add new page > right side > page attribute > Template

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

Custom widget page Create
==========================
1st step: include this in custom page

<?php 
get_header() ;
/*
Template Name:demo_2;
*/
?>

2nd step: Then go to backend add new page> right side> page attribute>Template

3rd step:
<?php
function twentythirteen_widgets_init() {
    register_sidebar( array(
   	 'name'      	=> __( 'Main Widget Area', 'twentythirteen' ),
   	 'id'        	=> Demo2',
   	 'description'   => __( 'Appears in the footer section of the site.', 'twentythirteen' ),
   	 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
   	 'after_widget'  => '</aside>',
   	 'before_title'  => '<h3 class="widget-title">',
   	 'after_title'   => '</h3>',
    ) );
}

?>

4th step: go to backend widgets>
--------------------------------------------------------
Register widget areas.
==========================
<?php
/**
 * Register widget areas.
 */
function twentyfourteen_widgets_init() {
	
	register_sidebar( array(
		'name'          => __( 'Primary Sidebar', 'twentyfourteen' ),
		'id'            => 'sidebar-1',
		'description'   => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h1 class="widget-title">',
		'after_title'   => '</h1>',
	) );
	register_sidebar( array(
		'name'          => __( 'Content Sidebar', 'twentyfourteen' ),
		'id'            => 'sidebar-2',
		'description'   => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h1 class="widget-title">',
		'after_title'   => '</h1>',
	) );
	register_sidebar( array(
		'name'          => __( 'Footer Widget Area', 'twentyfourteen' ),
		'id'            => 'sidebar-3',
		'description'   => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h1 class="widget-title">',
		'after_title'   => '</h1>',
	) );
}
add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
?>
---------------------------------------------------------------

Pages based Navigation Menu
===============================
<!-- Start Navigation Menu -->
	<div id="nav-menu">
		<ul>
			<li class="page_item"><a class="first" href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>"><?php _e('Home', 'w3p'); ?></a></li>
			<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
		</ul>
	</div>
<!-- End Navigation Menu -->


Dashboard Appearance > Menu
================================
<!-- This code include in functions.php file-->
	<?php
		add_action('admin_menu', 'my_plugin_menu');
		
		function my_plugin_menu() {
			add_theme_page('My Plugin Theme', 'My Plugin', 'edit_theme_options', 'my-unique-identifier', 'my_plugin_function');
		}
	?>

Appearance menu show in header.php file
========================================
<?php wp_nav_menu(array('theme_location' => 'primary', 'container_class' => 'w3-menu', 'container' => 'nav')); ?>

Page Content anywhere
========================
<?php
	$id = 20;
	$p = get_page($id);
	echo apply_filters('the_content', $p->post_content);
?>

ALL post show
=====================
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
	the_content();
	endwhile; else: ?>
	<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>

Single post show By ID
=======================
---Post Title---
<?php echo get_the_title($ID); ?> 

---Only Post----
<?php
	$my_postid = 1;//This is page id or post id
	$content_post = get_post($my_postid);
	$content = $content_post->post_content;
	$content = apply_filters('the_content', $content);
	$content = str_replace(']]>', ']]&gt;', $content);
	echo $content;
?>

css3 Vertical Menu

1.html

<html>
    <head>
        <title>Dropdown menu</title>
    </head>
    <body>
        <div id="menu">
            <ul>
                <li><a href="javascript:;" class="link_newproduct">Home</a></li>
                <li><a href="javascript:;">Womens wear</a>
                    <ul>
                        <li><a href="javascript:;">SHAREE</a></li>
                        <li><a href="javascript:;">KAMIZ</a></li>
                        <li><a href="javascript:;">STICHED DRESS</a></li>
                        <li><a href="javascript:;">KURTA</a></li>
                        <li><a href="javascript:;">UNSTICHED DRESS</a></li>
                        <li><a href="javascript:;">PANJABEE</a></li>
                        <li><a href="javascript:;">FATUA</a></li>
                    </ul>
                </li>
                <li><a href="javascript:;">Mens wear</a>
                    <ul>
                        <li><a href="javascript:;">Shirt</a></li>
                        <li><a href="javascript:;">Pant</a></li>
                        <li><a href="javascript:;">FATUA</a></li>
                        <li><a href="javascript:;">T-Shirt</a></li>
                    </ul>
                </li>
                <li><a href="javascript:;">Girls wear</a>
                    <ul>
                        <li><a href="javascript:;">KAMIZ</a></li>
                        <li><a href="javascript:;">STICHED DRESS</a></li>
                        <li><a href="javascript:;">FATUA</a></li>
                        <li><a href="javascript:;">SHAREE</a></li>
                    </ul>
 
                </li>
                <li><a href="javascript:;">West rang</a>
                    <ul>
                        <li><a href="javascript:;">Kamiz</a></li>
                        <li><a href="javascript:;">T-shirt</a></li>
                        <li><a href="javascript:;">Shirt</a></li>
                        <li><a href="javascript:;">Panjabee</a></li>
 
                    </ul>
                </li>
            </ul>
        </div>
    </body>
</html>

2.css

#menu {
  border-bottom: 1px solid #ff9a02;
  border-top: 1px solid #ff9a02;
  float: left;
  background: #FFC107;
}

#menu ul {
  margin: 0;
  padding: 0;
}

#menu li {
  list-style: none outside none;
  padding: 0;
  position: relative;
  border-right: 1px solid #FFEB00;
}

#menu ul li:hover ul {
  visibility: visible;
}

#menu ul li ul {
  position: absolute;
  visibility: hidden;
  background: none repeat scroll 0 0 #FFC107;
  z-index: 9999999;
  padding: 0;
  top: 26%;
  left: 102%
}

#menu li a {
  color: #AF1D1D;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-align: left;
  padding: 12px 17px;
  text-transform: uppercase;
  text-decoration: none;
}

#menu ul li ul li {
  border-bottom: 1px solid #fff;
}

#menu ul li ul li a {
  font-size: 12px !important;
  width: 145px;
  color: #000;
}

#menu ul li ul li a:hover {
  color: #fff;
}

Output:
vertical-menu

css3 Dropdown Menu

1.html

<html>
	<head>
		<title>Dropdown menu</title>
	</head>
	<body>
		<div id="menu">
			<ul>
				<li><a href="javascript:;" class="link_newproduct">Home</a></li>
				<li><a href="javascript:;">Womens wear</a>
					<ul>
						<li><a href="javascript:;">SHAREE</a></li>
						<li><a href="javascript:;">KAMIZ</a></li>
						<li><a href="javascript:;">STICHED DRESS</a></li>
						<li><a href="javascript:;">KURTA</a></li>
						<li><a href="javascript:;">UNSTICHED DRESS</a></li>
						<li><a href="javascript:;">PANJABEE</a></li>
						<li><a href="javascript:;">FATUA</a></li>
					</ul>
				</li>
				<li><a href="javascript:;">Mens wear</a>
					<ul>
						<li><a href="javascript:;">Shirt</a></li>
						<li><a href="javascript:;">Pant</a></li>
						<li><a href="javascript:;">FATUA</a></li>
						<li><a href="javascript:;">T-Shirt</a></li>
					</ul>
				</li>
				<li><a href="javascript:;">Girls wear</a>
					<ul>
						<li><a href="javascript:;">KAMIZ</a></li>
						<li><a href="javascript:;">STICHED DRESS</a></li>
						<li><a href="javascript:;">FATUA</a></li>
						<li><a href="javascript:;">SHAREE</a></li>
					</ul>

				</li>
				<li><a href="javascript:;">West rang</a>
					<ul>
						<li><a href="javascript:;">Kamiz</a></li>
						<li><a href="javascript:;">T-shirt</a></li>
						<li><a href="javascript:;">Shirt</a></li>
						<li><a href="javascript:;">Panjabee</a></li>

					</ul>
				</li>
			</ul>
		</div>
	</body>
</html>

2.css

#menu {
  border-bottom: 1px solid #ff9a02;
  border-top: 1px solid #ff9a02;
  float: left;
  background: #FFC107;
}

#menu ul {
  margin: 0;
  padding: 0;
}

#menu li {
  float: left;
  list-style: none outside none;
  padding: 0;
  position: relative;
  border-right: 1px solid #FFEB00;
}

#menu ul li:hover ul {
  visibility: visible;
}

#menu ul li ul {
  position: absolute;
  visibility: hidden;
  background: none repeat scroll 0 0 #FFC107;
  z-index: 9999999;
  padding: 0;
}

#menu li a {
  color: #AF1D1D;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-align: left;
  padding: 12px 17px;
  text-transform: uppercase;
  text-decoration: none;
}

#menu ul li ul li {
  border-bottom: 1px solid #fff;
}

#menu ul li ul li a {
  font-size: 12px !important;
  width: 145px;
  color: #000;
}

#menu ul li ul li a:hover {
  color: #fff;
}

Output:
dropdown-menu