Thanks. I'm getting an error when i try and put my code in though.
while ($row = mysql_fetch_array($result))
{
echo "Name :{$row['user_login']} <br>" .
"Email : {$row['user_email']} <br>" .
"User Level : {$row['meta_key']} <br><br>";
"Value of User Level : {$row['meta_value']} <br><br>";
}
works fine.
But when I use
while ($row = mysql_fetch_array($result))
{
//-------- Subscribe --------//
$postdata = http_build_query(
array(
'name' => $row['user_login'],
'email' => $row['user_email'],
'list' => "xoYWaOYnRsu6KPliTC70Gg",
'boolean' => 'true'
)
);
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context = stream_context_create($opts);
$result = file_get_contents($sendy_installation_url.'/subscribe', false, $context);
//-------- Subscribe --------//
}
I get the error
Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in URL on line 19
Line 19 is while ($row = mysql_fetch_array($result))