auto generated value PHP
<p>I'm trying to generate a value, not on database-side like auto key stuff, but on the front end or on the client side.. Do you have any clever idea to do that? Because Booking ref is not my primary key, it can't be autogenerated. What I want to do is to have an initial value of 10307 then increment it, whenever user/s create/s new record. </p>

<p>But what I've tried so far is this in PHP: </p>

<pre><code>private function inputBookingRef() {
    $value = $this-&gt;bookingRef;
    $html = "";
    $value = 10307;
    $value++;
    $html .= '&lt;label for="ref"&gt;Booking Ref: &lt;/label&gt;';
    $html .= HTML::inputText("ref", 20, $value) . PHP_EOL;
    return $html;
}
</code></pre>

<p><strong>NOTE:</strong>
My initial value is 10307, then I use the increment operator to make it 10308. But every time I create another record it just gives 10308. I think there must be some clever way to make it increment. </p>

<p>Any help is welcome. Thanks.</p>
