Developer Support »

Would it be possible to add a random number script to the FormToEmail page?  (See more user questions)

My pleasure, !

Thank you for your kind words.

Did you try the code?

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Tuesday, July 08, 2008 8:15 PM
Subject: Re: Random Number


> Hi Charles,
>
> Thank you so much, that was exactly what I was looking for. Of all the
> code I've looked at nothing looked like that.
>
> Since I seem to be getting a lot of clients who want to run mini stores
> and don't like the pre-built shopping carts, I look to take a course in
> PHP.
>
> Again, thank you so much and the best thing I did was find your site.
>
>
> On Jul 8, 2008, at 2:55 PM, FormToEmail.com wrote:
>
>> Hi
>>
>> Where do you want the random number? Do you want it in the email from
>> the script? How long do you want it?
>>
>> I can make the script produce a random number and put it in the email so
>> that it is shown along with the submitted data.
>>
>> I can do this for free, as described above. If you want anything more
>> or anything fancy, I would have to look at it.
>>
>> In fact, here it is. Here's some code that will do as decribed above.
>> Open up my script (formtoemailpro.php) in a text editor and locate this
>> line (towards the bottom):
>>
>> if($show_ip){$_REQUEST["Sender's IP address"] = $_SERVER[REMOTE_ADDR];}
>>
>> Below it, add this line:
>>
>> $_REQUEST["Form ID"] = rand(10000000,99999999);
>>
>> Save the file and upload it.
>>
>> The above will give an eight-figure random number. Change "Form ID" to
>> suit, this is what you will see in the email from the script.
>>
>> Just a point. PHP in itself cannot give you a "unique" number. So
>> potentially (although quite unlikely) it could give the random number
>> 44838572 twice. If you want a unique number you need to use a database
>> or some other way to store the already issued numbers, as PHP doesn't
>> have a clue about that.
>>
>> Please advise.
>>
>> Have a fab day!
>>
>> Charles Sweeney
>> https://formtoemail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Tuesday, July 08, 2008 4:02 PM
>> Subject: Random Number
>>
>>
>>> Good Morning Charles,
>>>
>>> I was wondering if it would be possible to add a random number script
>>> to the FormToEmail page.
>>>
>>> Thanks,