This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Connect to DB | |
| $db = new SQLite3('/var/www/mfarelay/twilio.db'); | |
| if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
| // Prepare and bind parameters | |
| $stmt = $db->prepare('INSERT INTO users (name, phone, email) VALUES (:name, :phone, :email)'); | |
| $stmt->bindValue(':name', $_POST['name'], SQLITE3_TEXT); | |
| $stmt->bindValue(':phone', $_POST['phone'], SQLITE3_TEXT); | |
| $stmt->bindValue(':email', $_POST['email'], SQLITE3_TEXT); |