Your Time:
Our Time:
← Back to discussions

recover from that IP sends an email (addnew.php)

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 2 replies, 2 voices, and was last updated 10 years, 4 months ago by hostingames.

  • 2016-05-10 at 6:55 pm
    Support Expired
    #14299
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    Hello,
    it is possible to add a code to retrieve IP of the sender
    a customer review?

    I feel that something is missing in this variable because I am not able to retrieve the IP with my php scripts. For moemnt I:

    PHP code
    $print(“Votre adresse IP est : $_SERVER[‘REMOTE_ADDR’]”);

    before
    // Code for sending email When a new testimonial has-been Added
    after

    		// Code for sending mail when a new testimonial has been Added
    		if ( $rset && mysqli_affected_rows($link)>0 ) {
    			$to     	= $useremail;                    
    			$subject 	= 'Nouveau Témoignage Ajouté';
    			$message 	= "Témoignage Détails". "\r\n" ;
    			$message 	.='Nom du client :'.stripslashes( $client_id ). "\r\n" ;
    			$message 	.='Témoignage :' .stripslashes( $feedback ). "\r\n" ;
    			$headers 	= 'De:' .$to . "\r\n" ;
    			@mail( $to, $subject, $message, $headers );
    			$successmsg	 = 	"Témoignage a été ajouté avec succès.";
                            $print("Votre adresse IP est : $_SERVER['REMOTE_ADDR']");

    issue here
    add the function id #checkbox

    		else if (jQuery("#checkbox").prop("checked")==false) {
    	        alert("Cochez cette case si vous acceptez les termes et conditions.");
    	        frm.checkbox.focus();
    	        return false;			
             }

    add “name” checkbox and “id” checkbox
    code is correct

    								<div class="item">
    									<div class="checkbox">
    										<label>
    										<input type="checkbox" name="checkbox" id="checkbox" > En continuant, vous acceptez les <a href="cgu.php"><span class="skin-color">Conditions générales</span></a>.
    										</label>
    									</div>
    							   </div>

    thank you

    2016-05-10 at 7:38 pm
    #14301
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    I’m not sure about how to retrieve the IP address but something is wrong in the code as its not working for me too. Try posting your question in http://stackoverflow.com/ I think you can get an answer there for sure as there are thousands of developers sitting to help everyone.

    2016-05-10 at 9:36 pm
    Support Expired
    #14306
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    hi, we did a test
    on checkbox,
    it works very well
    also call javascript

    and adding IP
    resolved
    thank you

You must be logged in to reply to this topic.