+44 (0)1223 659363 contact@acep.org.uk

delresult

[insert_php]
global $wpdb;
$current_user = wp_get_current_user();
//print_r($current_user);
$formid=$current_user->description;
echo “Form ID is”.$formid.PHP_EOL;
$fordb=$current_user->user_login;
//$uem=$current_user->user_email;
//echo “Logged in is”.$fordb;
$uem=$_POST[’emailid’];
$uem=$_GET[’emailid’];
//echo “Posted User Email.”.$uem.PHP_EOL;
//echo $uem.PHP_EOL;

$sql=”SELECT date,id FROM 4zgc14mywebsitetransfercom_1667397749.wp_fsq_data WHERE email=’$uem'”;
$fname= $wpdb->get_var($sql);
//echo $fname.PHP_EOL;

$result=$wpdb->get_results($sql);

$realArray = object_to_array($result);

//print_r($realArray);

function object_to_array($data)
{
if(is_array($data) || is_object($data))
{
$result = array();
foreach($data as $key => $value)
{
$result[$key] = object_to_array($value);
}
return $result;
}
return $data;
}

[/insert_php]

[content_band style=”color: #333;” bg_color=”#ffddea” border=”all” inner_container=”true”] [custom_headline style=”margin-top: 0;” level=”h3″ looks_like=”h3″]Control Panel[/custom_headline]

[/content_band]

[insert_php]
echo “

[highlight type =’dark’]Viewing results for: “.$uem.”[/highlight]

“.PHP_EOL;
echo “

“;
echo “

“;
foreach ($realArray as $key) {
echo “

“;
}
echo “
Result ID

Date

“.$key[id].”

“.$key[date];echo “

“;
echo “

“;
echo ““;
echo ““;
echo ““;
echo “

“;

[/insert_php]