CRUD in PHP and MySQL With Prepared Statements

function PreQuery($fname,$lname,$email,$subj) { $conn = OpenCon(); $query = $conn->prepare("INSERT INTO myguests(firstname, lastname, email, subject) VALUES (?,?,?,?)"); $query->bind_param("ssss", $fname,$lname,$email,$subj); if($query->execute()) { CloseCon($conn); return true; } else { return $conn->error; } }
Read more about creating [CRUD in PHP and MySQL]( https://www.cloudways.com/blog/execute-crud-in-mysql-php/)

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.