K
K
Kyuk2017-07-20 20:21:08
PHP
Kyuk, 2017-07-20 20:21:08

How to display an image on a page from Contact Form DB?

1) The visitor fills out and sends a feedback form with a picture.
2) Using the Contact Form DB add-on, the data from the form is stored in the database.
3) Displayed on the site page
But the picture is not displayed, how to write it correctly so that it is displayed
Code:
<?php if(isset($_REQUEST['add'])) {
echo do_shortcode('[contact-form-7 id=" 332" title="Reviews"]');
} else { ?>
add feedback
<?php
require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBFormIterator.php');
$exp = new CFDBFormIterator();
$exp->export('Reviews');
$i = 1;
$paged = ( get_query_var('paged' ) ) ? get_query_var('paged') : 1;
//echo "".print_r($exp->dataIterator, true)."";
while ($row = $exp->nextRow()) { ?>
<?php if ($i>=10*($paged-1)+1 and $i<=$paged*10) { ?>

<? php echo $row['your-name']; ?>
<?php echo $row['your-message']; ?>
<?php } ?>
<?php
$i++;
} // end while
} // end else if
?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question