Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form and env. variable

Status
Not open for further replies.

lgnihlman

MIS
Dec 5, 2002
89
SE
Hi !
I have a form that users use to e-mail me a problem report.
I would like to have the environment variable COMPUTERNAME included in the e-mail.
The variable should not be visible to users, only to me.

How can I do this ?

Any tips are appreciated,thanks.

Regards
Lars-Gunnar
 
Hi,

Try a hidden field.

<input type=&quot;hidden&quot; name=&quot;COMPUTER NAME&quot; value=&quot;&quot;>

How do you determine the computer's name?
 
In your mail form script you should be able to define this no problem.

One form I have in PHP does the following:

##send mail
if ($subject==&quot;&quot;) $subject=&quot;Form&quot;;
mail(&quot;$recipient&quot;,&quot;$subject Submission&quot;,
&quot;$subject Submission:

$results
Sender's IP: SERVER_NAME,$REMOTE_USER,$REMOTE_ADDR&quot;);


I can't remember what is the environmental variable for the computer name, I don't have a clue about this server side stuff.


É ::
 
I should clarify my question.
I want the Windows environment variable COMPUTERNAME to be automaticly included in the e-mail.

In a command prompt you can type SET and then all
the environment variables can be seen.

It's the variable COMPUTERNAME from this list that I want
to be sent to me.

Regards
Lars-Gunnar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top