Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $a="hello";
- $b="india";
- $c="1997-12-12";
- $d="srinu";
- $query="insert into user_info values('$a','$b','$c','$d')";
- $db='example';
- $user='root';
- $pass="";
- $conn=mysqli_connect($host,$user,$pass,$db);
- if($conn){
- echo "Connection Success".'<br>';
- }
- else{
- echo "Error";
- }
- if($q=mysqli_query($conn,$query)){
- echo "Data added to Database".'<br>';
- }
- else{
- echo "Can't add to DB";}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement