Thanks for replying Jason
Like I said am a bit lost, actualy feel realy stupid here.....
so that I get this right...
Have edited the ipn form to the following:
<?php
mysql_connect("localhost", "user", "password") or die(mysql_error());
mysql_select_db("users") or die(mysql_error());
$req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
// assign posted variables to local variables
$payer_email = $_POST['payer_email'];
if (!$fp) {
// HTTP ERROR
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
mysql_query("UPDATE users SET groupID = '2' WHERE $_SESSION = ['SecurityAssist_UserID']");
// process payment
}
else if (strcmp ($res, "INVALID") == 0) {
// log for manual investigation
}
}
fclose ($fp);
}
?>
Am guessing this is right for the insert, but then i get lost when "set the key column to the email column " and then use the code you included.....
Maybe its late and my brain is fried already, but still what's the change of finishing it for us so i can get this done, be super grateful am sure its a quick fix for urself also am also sure will understand it alot better if actually complete.
Thanks again