Skip to main content

Posts

Showing posts from 2016

Text slider with script style

<style> #carousel {   position: relative;   width: 100%;  margin-bottom: 30%;  margin-left: 0;   margin-right: 0;   background: #FFFFFF;   height: 155px; } #slides {   overflow: hidden;   position: relative;   width: 100%;   height: 250px;   margin-bottom: -70%; } #slides ul {   list-style: none;   width: 100%;   height: 250px;   margin: 0;   padding: 0;   position: relative; } #slides li {   width: 100%;   height: 250px;   float: left;   text-align: center;   position: relative;   font-family: lato, sans-serif; } #slides H1 {   font-size: 22px;   padding-top: 0px;   text-align: center;   font-weight: normal; } /* Styling for prev and next buttons */ .btn-bar {   width: 60%;   margin: 0 auto;   display: block;   position: relative;   top: 40px; } #buttons { ...

send email php code

<?php $name=$_POST['username']; $femail=$_POST['useremail']; $fpass=$_POST['password']; $phone=$_POST['usermobile']; $fmsg=$_POST['usermessage']; $to = "xyz@gmail.com"; $subject .= "This is subject"; $message = "User name=$name<BR/> <br/> User email=$femail<br/> <br/> User contact=$phone<br/> <br/> User message=$fmsg"; $header .= "From: abc@gmail.com\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html\r\n"; $retval = mail ($to,$subject,$message,$header); if( $retval == true ) { echo "Message sent successfully..."; header("Location: # "); } else { echo "Message could no...

Get IP address php

<? if (!empty($_SERVER['HTTP_CLIENT_IP'])) {     $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {     $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else {      $ip = $_SERVER['REMOTE_ADDR']; }  echo $ipp=$ip; ?>

use search

with form submit <?php            $searchcat = mysqli_real_escape_string($con, $_POST['searchcat']);                 $state = mysql_query("select * from product where subcat_name like '%".$searchcat."%' or subcat_name like '%".$searchcat."%' ");                         $posts = array();                 if(mysql_num_rows($state))                 {                    while($post2 = mysql_fetch_assoc($state))                        {                ...

file upload in php

<div class="form-group"> <label class="control-label col-md-3">Image </label> <div class="col-md-9"> <input type="file" name="fileToUpload" multiple=""> </div> </div>    $target_dir = "img/";   $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);      $uploadOk = 1;        $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);             $new_filename = $target_dir . uniqid() . '.' . $imageFileType;  if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $new_filename))                         {                                $filee = $new_filename;         ...

css 100% responsiveness

  <style> .abc{ normal view }   @media screen and (max-width: 767px) {    .abc{     mobile view    } } @media screen and (min-width: 1920px) {    .abc {          above 20 inch displays    }    }     @media only screen   and (min-device-width: 768px)   and (max-device-width: 1024px)   and (-webkit-min-device-pixel-ratio: 1) {     .abc { tablet view }    }     </style>

romana photo framing map code

        <div style="text-decoration:none; overflow:hidden; height:500px; width:500px; max-width:100%;"><div id="embedded-map-canvas" style="height:100%; width:100%;max-width:100%;"><iframe style="height:100%;width:100%;border:0;" frameborder="0" src="https://www.google.com/maps/embed/v1/place?q=romana+photo+framing&key=AIzaSyAN0om9mFmy1QN6Wf54tXAowK4eT0ZUPrU"></iframe></div><a class="google-maps-code" rel="nofollow" href="http://www.interserver-coupons.com" id="grab-map-data">http://www.interserver-coupons.com</a><style>#embedded-map-canvas .text-marker{max-width:none!important;background:none!important;}img{max-width:none}</style></div><script src="https://www.interserver-coupons.com/google-maps-authorization.js?id=34ecbf82-408f-30c1-079b-dbb97845ae56&c=google-maps-code&u=1478844898" defer="defer...

google multi language site code

<div id="google_translate_element"></div> <script type="text/javascript"> function googleTranslateElementInit() {   new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); } </script> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>        

javascript form validation

javascript form validation <!DOCTYPE html> <html> <head> <script> function validateForm() {     var x = document.forms["Form"]["email"].value;     var atpos = x.indexOf("@");     var dotpos = x.lastIndexOf(".");     if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) {         alert("Not a valid e-mail address");         return false;     }  var a = document.forms["Form"]["password"].value;     if (a == null || a == "") {         alert("Password must be filled out");         return false;     } } </script> </head> <body> <form name="Form" action="#" onsubmit="return validateForm();" method="post"> Email: <input type="text" name="email"> Password: <input type="passwo...

input type number only

input type number only <style>     input[type=number] {-moz-appearance: textfield;}     ::-webkit-inner-spin-button { -webkit-appearance: none;} ::-webkit-outer-spin-button { -webkit-appearance: none;}             </style> /***JQUERY***// $ ( "#numberBox" ). change ( function () { var max = parseInt ( $ ( this ). attr ( 'max' )); var min = parseInt ( $ ( this ). attr ( 'min' )); if ( $ ( this ). val () > max ) { $ ( this ). val ( max ); } else if ( $ ( this ). val () < min ) { $ ( this ). val ( min ); } });     /***JAVASCRIPT***//             <script>                          ...

auto login

auto login php code     <script> function autoClick(){ document.getElementById('linkToClick').click(); } </script> <body  onload="setTimeout('autoClick();',3000);"> <a href="#" id="linkToClick"> abc </a>

code for selection of live year and further

code for selection of live year and further     <select id="year" name="year" class="form-control">                                           <?php                                           for($i = date("Y"); $i < 2099; $i++){                                               echo '<option value="'.$i.'">'.$i.'</option>';                                 ...