Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please, I have this code below, I need to add the input data to the SQL table by using (PDO) when click on submit, I
Please, I have this code below, I need to add the input data to the SQL table by using (PDO) when click on submit, I want to get a message "your data added successfully" and another button to show all saved data :
*** You have errors in your data ***
"; } print " Book Summary
"; print " Book Title :".preg_replace("/[^a-z0-9]/i","",$_GET['bookTitle'])."
"; if($_GET['price'] <= 0) { $priceError = "Price should be a positive number please, " . $price . ", is not valid."; $okay = FALSE; }else print " Price : ".filter_var( $_GET['price'], FILTER_SANITIZE_NUMBER_INT)."
"; print " Describtion :".preg_replace("/[^a-z0-9]/i","",$_GET['describtion'])."
"; print " Category : $category "; } ?>
use PDO SQL to save FORM data and show the tabel
so, I have to create SQL table "book title, description, price, category, then when the user input data in that html form that will save in sql tabel by using PDO connections php with SQL and message will appear (your data added successfully) and another button to print the SQL table.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started