Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SQL Server Details
- $servername = "localhost";
- $username = "root";
- $password = "password";
- $dbname = "database1";
- // Create connection
- $conn= new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $CustID = $_POST['CustID'];
- // prepare and bind
- $stmt = $conn->prepare("UPDATE customers (CustName, Phone, Address, City,
- State, PCode, link, Region, ShowOnWebsite) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)WHERE CustID=$CustID");
- $stmt->bind_param("ssssssssi",$Customer, $Phone, $Address, $City, $State,
- $PCode, $link, $Region, $ShowOnWebsite);`
Add Comment
Please, Sign In to add comment