query($sql)) { echo "Successfully created new $type!"; } else { echo $conn->lastErrorMsg(); } ?>