I'm building a validator script for barcode ticketing system. Which needs to check the barcode number against database. The thing is the first 7 numbers of the barcode is customer id and the last 4 numbers are the seat id.

For example:

```
12345671234
^^^^^^^--Customer ID
       ^^^^-- Seat ID

```

As I'll scan the barcode using a barcode scanner and it will 
write whole barcode on a single input box I need to seperate these 2 values in that 
1 input in order to get proper data from database.

Its now like:

```
<form action="validator.php" method="post">
Customer ID: <input id="uuid" name="uuid" maxlength="7"><br>
Seat:       <input id="hash" name="hash" maxlength="4">

```

Needs to be like: 

```
Barcode: <input id="barcode" name="barcode" maxlength="11"><input  type="submit">

<input  type="submit">
</form>

```

And the PHP Side

```
<?php

$uuid = $_POST['uuid'];
$hash = $_POST['hash'];

    $con=mysqli_connect("localhost","admin","321","db_name");
    // Check connection
    if (mysqli_connect_errno())
      {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
      }

    $result = mysqli_query($con,"SELECT * FROM seat_booking_bookings
    WHERE uuid ='$uuid'");

    while($row = mysqli_fetch_array($result))
      {
      echo $row['customer_name'] . " " . $row['customer_phone'];
      echo "<br>";
      }

      $result = mysqli_query($con,"SELECT * FROM seat_booking_bookings_seats
    WHERE hash ='$hash'");

      while($row = mysqli_fetch_array($result))
      {
       echo "Seat:";
      echo $row['seat_id'] . " " . $row['price'];

      }
    ?>

```

Thanks for all your help.