ChrisSoutham
Members
-
Joined
-
Last visited
Solutions
-
ChrisSoutham's post in PayPal IPN Going Astray was marked as the answerI've managed to track down my problems - no idea if it's the same for you.
Looking through my IPN log I can see that the response from PayPal when you return data can be either:
HTTP/1.1 100 Continue HTTP/1.1 200 OK or just: HTTP/1.1 200 OK Now if you are using the original (and still in place) basic code example from PayPal themselves then this line won't work:
if (strcmp ($res, "VERIFIED") == 0)
as the response with 100 Continue will result in a -1 rather than a 0. I've swapped the above line out for:
if (preg_match("!(VERIFIED)\s*\Z!",$res) All seems to be well now, but boy did that take some tracking down - and even harder replicating!
-
ChrisSoutham's post in htaccess friendly url problem was marked as the answerYou didn't say there was an error?
Add something like print_r($_GET) or var_dump($_GET) and see if the variable is being passed though. In your original call you say ?oak-furniture= whereas your .htaccess file says ?id=
-
ChrisSoutham's post in MMySQL Erro was marked as the answerIt's mostly likely that $items is coming through as a string - wrap it in a single quotes: WHERE id = '$items' and see what happens.
-
ChrisSoutham's post in Adding to an existing Php script to allow more fields to be added to a contact form was marked as the answer<?php $name = $_POST['name']; // contain name of person $email = $_POST['email']; // Email address of sender $web = $_POST['web']; // Your website URL $body = $_POST['text']; // Your message $institution = $_POST['institution']; $specify = $_POST['specify']; $receiver = "ismaakeel@gmail.com" ; // hardcorde your email address here - This is the email address that all your feedbacks will be sent to if (!empty($name) & !empty($email) && !empty($body)) { $body = "Name:{$name}\n\nWebsite :{$web}\n\nInstitution Type:{$institution}\nInstitution:{$specify}\n\nComments:{$body}"; $send = mail($receiver, 'Contact Form Submission', $body, "From: {$email}"); if ($send) { echo 'true'; //if everything is ok,always return true , else ajax submission won't work } } Something like the above should work just fine - you pull in the variables at the top and then include them in the body of the email.