Here I want to get the first three string characters from the username input field & generate a random number first 3 characters of the username & random see output to get the expected output
<input type="text" id="firstname" name="firstname" onBlur="?"><br>
<?php $ran = rand(1000, 9999); ?>
<input type="text" value="<?php echo $ran; ?>" placeholder="username">
My Expected Output
KSA3215