i have:

function numero() {
 $R .= rand (1,100000000000000);
}

$sql = "INSERT INTO boleto (`numero`)
VALUES ('".numero()."')";
$comsql = mysql_query($sql) or DIE("ERRO Mysql: ".mysql_error());

and why no insert the rand number?

why?

Not sure why you call function. the below script should work.

$R = rand (1,100000000000000);

$sql = "INSERT INTO boleto (numero) VALUES ('$R')";
mysql_query($sql) or DIE("ERRO Mysql: ".mysql_error());

thanks man

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.