<?php
mysql_connect("x","y","z!") or die("Could not connect");
mysql_select_db("x") or die("Could not connect");
$output = '';
// Collect
if(isset($_POST['search'])) {
$searchq = $_POST['search'];
$query = mysql_query("SELECT * FROM uni_slider WHERE slider_name LIKE '%$searchq%' OR slider_image LIKE '%$searchq%' OR slider_price LIKE '%$searchq%'") or die("Could not search");
$count = mysql_num_rows($query);
if($count == 0){
$output = 'There was no such results';
}else{
while($row = mysql_fetch_array($query)) {
$name = $row['slider_name'];
$image = $row['slider_image'];
$price = $row['slider_price'];
$output .= '<div class="output">'?><img src="/upload/<?php echo $row['slider_image'];?>"><?php <br/> '.$name.' <br/> '.$price.' <font color="#2ecc71">$</font><br/></div>;
}
}
}
?>
This is my code, now the output part doesnt work. If I make the code like this
$output .= '<div class="output> '.$image.' <br/> '.$name.' <br/> '.$price.' <font color="#2ecc71">$</font><br/></div>';
It only shows me the image file name, not the image.
I've tried `"> but it gives me erros, any help ? Thanks