与CURLOPT_POSTFIELDS不工作/没有工作

this code seems to work, because the webpage responds "thank you for submission"

$url = "http://www.mamamia.gr/diag_v/index.php?name=James&eponimo=Vasdanoi&age=34&email=ddd401@gmail.com&thl=4747428928"
$ch = curl_init();   
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$output=curl_exec($ch); 
curl_close($ch);
echo $output;

but the following code i think does not work because web page does not respond anything

$url = "http://www.mamamia.gr/diag_v/index.php"    
$fields_string = 'name=James&eponimo=Vasdanoi&age=34&email=ddd401@gmail.com&thl=4747428928'; 
$ch = curl_init();   
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
$output=curl_exec($ch); 
curl_close($ch);
echo $output;

can you advice?

<form name="formcheck" action="index.php" onsubmit="return formCheck(this);">

Because the form does not have a method="post" it does a GET rather than a POST

The method specifies how the web server will receive the submitted data.


Possibly the age should be age=31-45 rather than 'age=34' Possible you should add:

'&diaf=Mamamia' to the url

...thl=4747428928&diaf=Mamamia&diagon=&diaff=

But both routines returned a page:

First Routine:
enter image description here

Second Routine:
enter image description here