I have the following form :
<div class="ss-form">
<form onsubmit = "return validateForm();" action="https://spreadsheets.google.com/formResponse?hl=en&formkey=dHXVVeEUybk9UNEVYdEdrNlVOSTZMbFE6MA&
theme=0AX42CRXMsmRFxMDNhN2Y&ifq'" method="POST" id="ss-form" name="data"\>
This works well, and submits the data to Google Docs.
My question is, how can I submit this form to google docs AND submit it to a PHP file at the same time?
I have tried using php include, but it does not work as the google docs link is not a php file.
Also tries using cURL but not sure what Im doing wrong :
//set options
$curl_connection = curl_init('https://spreadsheets.google.com/');
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
$post_string = "formResponse?hl=en&formkey=dHXVVeEUybk9UNEVYdEdrNlVOSTZMbFE6MA&
theme=0AX42CRXMsmRFxMDNhN2Y&ifq";
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
$result = curl_exec($curl_connection);
//show information regarding the request
print_r(curl_getinfo($curl_connection));
echo curl_errno($curl_connection) . '-' .
curl_error($curl_connection);
//close the connection
curl_close($curl_connection);