Change
Code:
$rand(100-9999)

to
Code:
$rand(100,9999)