Guest User

Untitled

a guest
Dec 25th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. //SQL Server Details
  2. $servername = "localhost";
  3. $username = "root";
  4. $password = "password";
  5. $dbname = "database1";
  6.  
  7. // Create connection
  8. $conn= new mysqli($servername, $username, $password, $dbname);
  9. // Check connection
  10.  
  11. if ($conn->connect_error) {
  12. die("Connection failed: " . $conn->connect_error);
  13. }
  14.  
  15. $CustID = $_POST['CustID'];
  16.  
  17. // prepare and bind
  18. $stmt = $conn->prepare("UPDATE customers (CustName, Phone, Address, City,
  19. State, PCode, link, Region, ShowOnWebsite) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)WHERE CustID=$CustID");
  20. $stmt->bind_param("ssssssssi",$Customer, $Phone, $Address, $City, $State,
  21. $PCode, $link, $Region, $ShowOnWebsite);`
Add Comment
Please, Sign In to add comment