Results 1 to 3 of 3

Thread: [RESOLVED] variables

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Resolved [RESOLVED] variables

    i am using a php script to send emails from a html form, this is all working fine, but i have been asked to add some identification to the email, to check for multiple emails from the same user with different fake return addresses

    here is the part of the script that sends the email
    PHP Code:
    $messageproper =
        
    "This message was sent from:\n" .
        
    "$http_referrer\n" .
        
    "------------------------------------------------------------\n" .
        
    "Name of sender: $name\n" .
        
    "Email of sender: $email\n" .
        
    "------------------------- COMMENTS -------------------------\n\n" .
        
    $comments .
        
    "\n\n------------------------------------------------------------\n" ;
    mail($mailto$subject$messageproper,
        
    "From: \"$name\" <$email>" $headersep "Reply-To: \"$name\" <$email>" $headersep "X-Mailer: chfeedback.php 2.08" );
    header"Location: $thankyouurl);
    exit ; 
    i would like to get some id from the users computer or ip address or whatever is available

    i am a lot more comfortable with vb6 than php....................
    Last edited by westconn1; Oct 2nd, 2008 at 04:53 PM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: variables

    $_SERVER['REMOTE_ADDR'] will give you the client IP address.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: variables

    thnx penagate. i was easily able to update the script with that
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width