Home     |     Java    |     Php General    |     Oracle Database    |     Oracle Server  

MS Dynamics CRM 3.0

  •  Setting up and Configuring Microsoft Dynamics CRM 3.0
  •  Managing Security and Information Access
  •  Entity Customization: Concepts and Attributes
  •  Entity Customization: Forms and Views
  •  Entity Customization: Relationships, Custom Entities, and Site Map
  •  Reporting and Analysis
  •  Workflow
  •  Server-Side SDK
  •  Client-Side SDK
  •  Integration with External Applications
  • Cervo Technologies
    The Right Source to Outsource

    Sharepoint Portal Server KB

    Microsoft CRM Info

    WPF Interview Questions

    SilverLight Interview Qs

    Asp.Net 2.0 Interview Qs

    Asp.NET 1.1 FAQs

    Oracle Interview Questions

    SAP Interview Questions

    PHP Programming

    How do I tell my form to include the IP address of the sender?


    Hello Friends

    How do I tell my form to include the IP address of the person who
    submits the form?

    Thank you very much!

    <?php
    if ($_SERVER['REQUEST_METHOD']=="POST"){
    // In testing, if you get an Bad referer error
    // comment out or remove the next three lines
    if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 ||
    !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']))
    die("Bad referer");
    $msg="Values submitted by the user:\n";
    foreach($_POST as $key => $val){
    if (is_array($val)){
    $msg.="Item: $key\n";
    foreach($val as $v){
    $v = stripslashes($v);
    $msg.=" $v\n";

    }
    } else {

    $val = stripslashes($val);
    $msg.="$key: $val\n";
    }
    }

    $recipient="m@email.add";
    $subject="My subject";
    error_reporting(0);
    if (mail($recipient, $subject, $msg)){
    echo "<h1>Thank you!</h1><p>Your message was successfully sent!</p>
    \n";
    echo nl2br($input);
    } else

    echo "Sorry, an error occurred and the message could not be sent.
    Please try again";
    } else

    echo "Bad request method - please try again or use a different web
    browser";
    ?>
    Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc