Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

Chernobyl1174 on "[Plugin: Contact Form 7] How to add field?"

$
0
0

Hi, how do i have to proceed to add an field who generates a random code with timestamp (like the code below) who is visible from the user and who is receiving the form data? I don't have much experience with PHP :(

<?php
function make_seed()
{
list($usec, $sec) = explode(‘ ‘, microtime());
return (float) $sec + ((float) $usec * 10000); //este número define o tamanho do código em caracteres
}
mt_srand(make_seed());

$randval = mt_rand(111,999);
$randval2 = mt_rand(999,111);
$hr = date(‘s’);
$cod = “$randval”.”$randval2″.”$hr”;

//Imprime número aleatório na tela
echo make_seed();

?>

Thanks for help!

http://wordpress.org/extend/plugins/contact-form-7/


Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>