how to define variable as numeric

Hi, please advise how to resolve. I want to print the receiptno on a receipt and it prints
"receiptno". I don't know how to define "receiptno" to use the value in the table.
I'm working with mysqli and having trouble with this code:

$receiptno='receiptno';  

$sql = "UPDATE numbers SET receiptno = receiptno+1 WHERE id=1";  // ************ updates
if ($conn->query($sql) !== true) { echo "Failed to update receiptno"; }
else { echo " "; }
echo "receipt # is " .$receiptno . "<br>";

“$row = mysqli_fetch_array($result); not working”

<?php
if (isset($_POST['submit'])) {

    session_start();

    include('connection.php');

    $email = mysqli_real_escape_string($conn, $_POST['email']);
    $password = mysqli_real_escape_string($conn, $_POST['password']);

    $hash_password = md5($password);

    $sql = "SELECT * FROM users WHERE email = '$email' AND password = '$hash_password' ";

    $result = mysqli_query($conn, $sql);

    $row = mysqli_fetch_array($result);

    if ($row['email'] == $email && $row['password'] == $hash_password)  {
        echo '<script type="text/javascript">';
        echo 'setTimeout(function () { sweetAlert("<b>Logged In"," You have successfully loged in.</b>","success");';
        echo '}, 500);</script>';
    } else {
        echo '<script type="text/javascript">';
        echo 'setTimeout(function () { sweetAlert("<b>Oops...","Wrong username or Password!...</b>","error");';
        echo '}, 500);</script>';
    }
}

?>

//database

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

/!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/!40101 SET NAMES utf8mb4 /;

--
-- Database: cclv
--
-- Table structure for table users

CREATE TABLE users (
id int(11) NOT NULL,
idnum varchar(11) NOT NULL,
username varchar(50) NOT NULL,
year_course varchar(50) NOT NULL,
mobile varchar(13) NOT NULL,
department varchar(50) NOT NULL,
email varchar(50) NOT NULL,
password varchar(20) NOT NULL,
date timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--

How To Get the Current URL With Javascript

In Javascript, it is sometimes necessary to get the URL of the current web page you are on. There are a few ways to do this.

How to Get the Current URL With Javascript

If we want to get the full URL of the current web page, we simply have to use window.location.href.

Virtual Function Calls in Constructors and Destructors (C++)

In different programming languages, the behavior of virtual functions differs when it comes to constructors and destructors. Incorrect use of virtual functions is a classic mistake. Developers often use virtual functions incorrectly. In this article, we"ll discuss some of these classic mistakes.

Theory    

I suppose the reader is familiar with virtual functions in C++. Let's get straight to the point. When we call a virtual function in a constructor, the function is overridden only within a base class or a currently created class. Constructors in the derived classes have not yet been called. Therefore, the virtual functions implemented in them will not be called.

Alternate Address and Port Support for Couchbase/N1QL Clusters

External applications use this facility to communicate with the cluster, but not directly to the nodes. These settings allow internal access to a router or other networked entity that provides interfaces on the cluster’s behalf.

When setting up alternate addresses, we can also set up alternate port numbers. The best example for the alternate address setup is AWS public and private IP addresses. Each node has a Private IP and DNS but they can also assign a public IP and DNS record. Those public IPs can be either statically or dynamically assigned.