PHP Progam Code of Hexadecimal to Binary Conversions

PHP Progam Code of Hexadecimal to Binary Conversions

In this code we will learn ” PHP Program Code of Hexadecimal to Binary Conversions”

code of ” PHP Program Code of Hexadecimal to Binary Conversions”

<html>
<body>
<form method="post">
Enter hexa Value:<br>
<input type="text" name ="num1"><br>
<input type="submit" name="OK"><br>
</form>

<?php
if(isset($_POST['submit'])){
	$hexa=$_POST['num1'];
        echo "The Value after Conversion  <br>";
	$num2= base_convert($hexa,16,2);
	
	
	}?>
<?php
$con=mysqli_connect("localhost","root","conversion2");
if(isset($_POST['OK'])){
$num1=$_post['num1'];
$sql=mysqli_query($con,"insert into conversion2(num,ans) VALUES('$num1','$num2')");
}
?>
</body>
</html>

Output of code of “PHP Progam Code of Hexadecimal to Binary Conversions”

PHP Progam Code of Hexadecimal to Binary Conversions

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.