Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "emildeveloping2";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $call = $_POST['call'];
- $sql = "UPDATE users SET assigned_call=$call WHERE name=".$_GET['name'];
- if ($conn->query($sql) === TRUE) {
- echo "Record updated successfully";
- header( "refresh:3;url=purchases.php" );
- } else {
- echo "Error updating record: " . $conn->error;
- }
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement