Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //get the form elements and store them in variables
- $name=$_POST["name"];
- $addr=$_POST["addr"];
- $email=$_POST["email"];
- ?>
- <?php
- //establish connection
- $con = mysqli_connect("192.168.2.1","wordpressuser","wordpresspass!","wordpress");
- //on connection failure, throw an error
- if(!$con) {
- die('Could not connect: '.mysql_error());
- }
- ?>
- <?php
- $sql="INSERT INTO `wordpress`.`wordpresstable2` ( `name` , 'addr', `email_id` ) VALUES ( '$name','$email')";
- mysqli_query($con,$sql);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement