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”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<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> |