Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function WritetoDB(){
- alert('Reached. No problem getting here.');
- $.get("savedata.php");
- }
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "mysql";
- $databaseName = "database";
- $tableName = "table";
- $conn = new mysqli($servername, $username, $password);
- $A = mysqli_real_escape_string($conn, 'this is A');
- $B = mysqli_real_escape_string(($conn, 'this is B'));
- $C = mysqli_real_escape_string(($conn, 'this is C'));
- $sql = "INSERT INTO `database`.`table` (columnA,columnB,columnC)
- VALUES ('$A', '$B', '$C')";
- $conn->close();
- ?>
Add Comment
Please, Sign In to add comment