Posts

Change Javascript variable image source based on radio button selection

Image
<html><head>   <meta http-equiv="content-type" content="text/html; charset=UTF-8">   <title> - jsFiddle demo</title>         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>         <link rel="stylesheet" type="text/css" href="/css/result-light.css">     <style type="text/css">       </style>   <script type="text/javascript">//<![CDATA[ $(window).load(function(){ $('.radio').on({     'click': function(){         console.log($(this).val());         var image_url=$(this).val();         $('#my_image').attr('src',image_url);     } }); });//]]> </script> </head> <body>    <img id="my_image" src="http://i.imgur.com/tL6nW.gif"...

jquery get the image of radio button

Image
<html><head>   <meta http-equiv="content-type" content="text/html; charset=UTF-8">   <title> - jsFiddle demo</title>         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>         <link rel="stylesheet" type="text/css" href="/css/result-light.css">     <style type="text/css">       </style>   <script type="text/javascript">//<![CDATA[ $(window).load(function(){ $('.radio').on({     'click': function(){         console.log($(this).val());         var image_url=$(this).val();         $('#my_image').attr('src',image_url);     } }); });//]]> </script> </head> <body>    <img id="my_image" src="http://i.imgur.com/tL6nW.gif"...

jquery get value of selected radio button

var resfront=$('input[name="front"]:checked').val(); $ ( 'input[name=radioName]:checked' , '#myForm' ). val ()

show data from database in new page based on id using php/ mysql

Image
firstpage.php   <?php $servername="localhost"; $username="root"; $password=""; $database="db"; //create connection$ $conn=new mysqli($servername, $username, $password, $database); //check connection if ($conn->connect_error) {     die("connection failed: ".$conn->connect_error); } $query = mysqli_query($conn,"select * from dress"); while ($row = mysqli_fetch_array($query)) { echo "<b><a href=\"detail.php?id={$row['OMDR_ID']}\">{$row['OMDR_NAME']}</a></b>"; echo "<br />"; } ?> detail.php <html> <head> <title>get data detail</title></head> <body> <?php $servername="localhost"; $username="root"; $password=""; $database="db"; //create connection$ $conn=new mysqli($servername, $username, $password, $database); //check c...

jquery to check if radio option is selected

if ($('input[name="front"]:checked').length == 0){               erros = 1;     }     else {            }

fetch data fron mysql different table connected using foreing key based on id

Image
php code <!DOCTYPE html> <html> <head> <title>Read Data From Database Using PHP - Demo Preview</title> <meta content="noindex, nofollow" name="robots"> <style> @import "http://fonts.googleapis.com/css?family=Droid+Serif"; /* Above line is to import google font style */ .maindiv { margin:0 auto; width:980px; height:500px; background:#fff; padding-top:20px; font-size:14px; font-family:'Droid Serif',serif } .title { width:100%; height:70px; text-shadow:2px 2px 2px #cfcfcf; font-size:16px; text-align:center; font-family:'Droid Serif',serif } .divA { width:70%; float:left; margin-top:30px } .form { width:400px; float:left; background-color:#fff; font-family:'Droid Serif',serif; padding-left:30px } .divB { width:100%; height:100%; background-color:#fff; border:dashed 1px #999 } .divD { width:200px; height:480px; padding:0 20px; float:left; bac...

fetch data fron mysql different table connected using foreing key based on id

Image
  PHP File: readphp.php <!DOCTYPE html> < html > < head > < title > Read Data From Database Using PHP - Demo Preview </ title > < meta content = " noindex, nofollow " name = " robots " > < link href = " style.css " rel = " stylesheet " type = " text/css " > </ head > < body > < div class = " maindiv " > < div class = " divA " > < div class = " title " > < h2 > Read Data Using PHP </ h2 > </ div > < div class = " divB " > < div class = " divD " > < p > Click On Menu </ p > <?php $connection = mysql_connect ( "localhost" , "root" , "" ) ; // Establishing Connection with Server $db = mysql_select_db ( "company" , $connection ) ; // Selecting Database //MySQL Query to r...