- Code: Select all
$stdin = fopen("php://stdin","r");
fscanf($stdin,"%{$SERVER['CONTENT_LENGTH']}s",$query_string);
parse_str($query_string,$params);
$fname = $params['First'];
// send email
mail('me@address.com','subject',$fname);
This doesn't work
- Code: Select all
$stdin = fopen("php://stdin","r");
fscanf($stdin,"%{$SERVER['CONTENT_LENGTH']}s",$query_string);
parse_str($query_string,$params);
$fname = $params['First'];
// db connection stuff here
$sql = mysql_query("INSERT INTO table (fname) VALUES ('$fname')");
So, if PHP is working enough to send me an email with the SS data, why in the world can't it INSERT to a mysql db? Actually, mail() is the ONLY thing that I've been able to get working. I can't even write to a text file!
Frustrating doesn't even begin to describe it. Is it because I'm using PayPal? Even though I'm testing with an AMEX card and not going to PayPal's site?