Loop through all rows of a single column in php - php

I've got a while loop retrieving the information from this statement
$stmt = $conn->prepare("SELECT images.*, users.profile_image, comments.* FROM
images LEFT JOIN users ON images.user_id = users.user_id LEFT JOIN comments ON
comments.user_id = users.user_id AND images.id = comments.image_id WHERE
images.id = :id");
No problems here, but I need to loop the comments again, otherwise the first loop, loops again because there are two rows in the comments table. This displays everything again but with row 2 of the comments. How can I make it only loop the comments. The first loop will only ever retrieve one result since it is always a unique id.
try {
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
$stmt->bindParam(':id', $id);
$conn->beginTransaction();
$stmt->execute();
$conn->commit();
while ($row = $stmt->fetch())
{
$comment = $row['comment'];
$title = $row['title'];
$image = $row['image'];
$username = $row['username'];
$category = $row['category'];
$description = $row['description'];
$comments = array($row['comment']);
}
?>
<h1><?php echo"$title"; ?></h1>
<img style="max-width: 100%; max-height:100%; margin-left: auto; margin-
right: auto; display:block;" src="<?php echo "$image" ?>"/>
<?php
echo "<h2><span class='by'>By </span><a
href='users.php/$username.html'>$username </a></h2>";
echo "<h2><span class='by'>In the </span><a href='browse.php?
category=space'>$category </a><span class='by'>category</span></h2>";
echo "<h2><span class='by'>About this image:</span></h2>
$description";
?>
<?php
echo "<h2><span class='by'>Comments</span></h2> $comments";
?>
<?php }
else {
if(!isset($row['id'])){
echo "empty";
}
}
?>
Thanks!
Update
while ($crow = $cstmt->fetch())
{
if($crow == false){
echo "nothing here";
}
else {
$comment = $crow['comment'];
echo "$comment"; ?><br /><br /><?php
}
}

You are probably going to need to split this up into a seperate query or use some logic to establish if it is a new Image or not
EG if split :
<?php
$stmt = $conn->prepare("SELECT images.*, users.profile_image FROM
images LEFT JOIN users ON images.user_id = users.user_id WHERE
images.id = :id");
try {
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
$stmt->bindParam(':id', $id);
$conn->beginTransaction();
$stmt->execute();
$conn->commit();
while ($row = $stmt->fetch())
{
$comment = $row['comment'];
$title = $row['title'];
$image = $row['image'];
$username = $row['username'];
$category = $row['category'];
$description = $row['description'];
// $comments = array($row['comment']);
}
?>
<h1><?php echo"$title"; ?></h1>
<img style="max-width: 100%; max-height:100%; margin-left: auto; margin-
right: auto; display:block;" src="<?php echo "$image" ?>"/>
<?php
echo "<h2><span class='by'>By </span><a
href='users.php/$username.html'>$username </a></h2>";
echo "<h2><span class='by'>In the </span><a href='browse.php?
category=space'>$category </a><span class='by'>category</span></h2>";
echo "<h2><span class='by'>About this image:</span></h2>
$description";
?>
<?php
// THIS QUERY WON'T WORK , IT IS FOR CONCEPT ONLY
$CommentsStmt = $conn->prepare("SELECT comments.* FROM comments WHERE comments.user_id = :user_id AND comments.image_id = :image_id");
$CommentsStmt->bindParam(':user_id', $row['user_id'] , ':user_id' , $row['image_id']);
$conn->beginTransaction();
$CommentsStmt->execute();
$CommentsStmt->commit();
// add a check if it is blank
echo "<h2><span class='by'>Comments</span></h2> ";
while ($CommentsRow = $stmt->fetch())
{
echo $CommentsRow['comment'],'<br /><br />';
}
?>
<?php }
else {
if(!isset($row['id'])){
echo "empty";
}
}
?>
a sample for the non-split version
/************
****
******** only output the image details if this is a new image :
****
************/
// NOT SURE WHERE TH IMAGE ID IS COMING FROM SO SUSTITUTE IT HERE:
$current_image_id = $id;
if($previousImageId !== $current_image_id){
?>
<h1><?php echo"$title"; ?></h1>
<img style="max-width: 100%; max-height:100%; margin-left: auto; margin-
right: auto; display:block;" src="<?php echo "$image" ?>"/>
<?php
echo "<h2><span class='by'>By </span><a
href='users.php/$username.html'>$username </a></h2>";
echo "<h2><span class='by'>In the </span><a href='browse.php?
category=space'>$category </a><span class='by'>category</span></h2>";
echo "<h2><span class='by'>About this image:</span></h2>
$description";
}
/************
****
******** END --- only output the image details if this is a new image :
****
************/

Related

BLOB inserts correctly into DB but not showing in HTML

I have a dropdown where i show an image and a name from DB, now i'm saving this image and name back into the the database (phpmyadmin) into another table. My problem is that the image is being saved correctly into the DB since i downloaded the image and converted it to make sure it's working. The problem is that on the PHP page when doing base64_encode the image the value is not the same as that of the database. Could someone help me point out the problem. Thanks
Table showing the image
<tbody>
<?php
while ($row = $sth->fetch(PDO::FETCH_ASSOC))
{
$matchday = $row['matchday'];
$competition = $row['competition'];
$home_logo = $row['home_logo'];
$home_team = $row['home_team'];
$away_logo = $row['away_logo'];
$away_team = $row['away_team'];
$date = $row['date'];
$time = $row['time'];
$stadium = $row['stadium'];
$date_time = $row['date_time'];
echo '<tr>';
echo '<td>'.$date_time.'</td>';
echo '<td>'.$matchday.'</td>';
echo '<td>'.$competition.'</td>';
echo '<td class="imagesize">'."<img src='data:image/png;base64,".base64_encode($home_logo)."'/>".'</td>';
echo '<td>'.$home_team.'</td>';
echo '<td class="imagesize">'."<img src='data:image/png;base64,".base64_encode($away_logo)."'/>".'</td>';
echo '<td>'.$away_team.'</td>';
echo '<td>'.$date.'</td>';
echo '<td>'.$time.'</td>';
echo '<td>'.$stadium.'</td>';
echo '</tr>';
}
?>
Form where i have the Dropdown
<div class="form-group p-3">
<label for="input_hometeam">Home Team</label>
<select class="form-control" id="input_hometeam" name="input_hometeam" onchange="document.getElementById('output_home').src = this.value; document.getElementById('input_stadium').value = $(this).find(':selected').data('stadium')">
<?php
while ($row = $home_team->fetch(PDO::FETCH_ASSOC))
{
$hometeamlogo = $row['logo'];
$hometeamstadium = $row['stadium'];
$hometeamname = $row['team_name'];
echo "<option te_name='$hometeamname' value='data:image/png;base64,".base64_encode($hometeamlogo)."' data-stadium='$hometeamstadium'>" . $row['team_name'] . "</option>";
}
?>
</select>
<input type='hidden' id="home_name" name="home_name" value=""/>
</div>
<img id="output_home" name="output_home" src="#" width="250" height="250" style="padding:25px; margin:0 auto;" alt="Team Logo">
Option value is the one being sent to the database
INSERT statement to Database
if(isset($_POST['submit'])){
try
{
$matchday = $_POST['input_matchday'];
$date = $_POST['input_date'];
$leg = $_POST['input_leg'];
$competition = $_POST['input_competition'];
$stadium = $_POST['input_stadium'];
$hometeam = $_POST['input_hometeam'];
$awayteam = $_POST['input_awayteam'];
$hometeamname = $_POST['home_name'];
$awayteamname = $_POST['away_name'];
$hometeamlogo = $_POST['input_hometeam'];
$awayteamlogo = $_POST['input_awayteam'];
$updateFixtures = $dbh->prepare("INSERT INTO fixtures (matchday, home_logo, home_team, away_logo, away_team, stadium, leg, competition, date_time) VALUES ('$matchday', '$hometeamlogo', '$hometeamname', '$awayteamlogo', '$awayteamname', '$stadium', '$leg', '$competition', '$date')");
$dbh->errorInfo();
$updateFixtures->execute();
header('Location: view_fixtures.php');
}
catch(PDOException $e)
{
'Error : ' .$e->getMessage();
}
}
UPDATE: If i insert a new row directly from phpmyadmin the image would show correctly

How to run a Javascript query on data that is being received from a database

I'm currently working on a very important project and I'm almost done.
But I'm stuck on the final part of the core function of the website... I want to know how to retrieve data from three columns: "Title", "Description", "Link" from my database and print the "Title" and "Description" rows to a <div></div> and i want to use the $("#anchor").attr("href", link) to the link attribute <div></div> my problem is that it only executes the Javascript code on the first row in the database table.
<html>
<head>
<title>test001</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<style>
#load1 {
background-color: green;
height: 100px;
width: 100px;
}
#load2 {
background-color: green;
height: 100px;
width: 100px;
}
</style>
<div id="divone">
<div id="load">
<div id="load1">
</div>
<div id="load2">
</div>
<div>
<a href="" id="load3" target="_ blank">
Test
</a>
</div>
</div>
</div>
<script>
function clone() {
var div = document.getElementById("load");
var cln = div.cloneNode(true);
document.getElementById("divone").appendChild(cln);
}
</script>
<?php
$conn = mysqli_connect("localhost", "id5757217_testsql01", "9977553311", "id5757217_testsql1");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM insertion";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while ( $row = $result->fetch_assoc() ) {
$array[] = $row;
$id = $row['ID'];
$tle = $row['Title'];
$des = $row['Description'];
$lnk = $row['Link'];
echo "<script type = text/javascript>clone()</script>";
}
} else { echo "0 results"; }
$conn->close();
?>
<script>
var id = "<?php echo $id; ?>";
var title = "<?php echo $tle; ?>";
$("#load1").text(title);
var desc = "<?php echo $des; ?>";
$("#load2").text(desc);
var lnk = "<?php echo $lnk; ?>";
$("#load3").attr("href", lnk);
</script>
</body>
</html>
You're echo-ing only one row because your echo is outside your while loop:
You need to move your echo for the data back into the loop IE
echo " <script>";
while ( $row = $result->fetch_assoc() ) {
$array[] = $row;
$id = $row['ID'];
$tle = $row['Title'];
$des = $row['Description'];
$lnk = $row['Link'];
echo "clone();";
echo 'var id = "' . $id . '";';
echo 'var title = "' . $tle . '";';
echo '$("#load1").text(title);';
echo 'var desc = "' . $des . '";';
echo '$("#load2").text(desc);';
echo 'var lnk = "' . $lnk . '";';
echo '$("#load3").attr("href", lnk);';
}
} else { echo "0 results"; }
$conn->close();
echo "</script>";
update
Also as Barmar stated in comment, you'll be overwriting the text for $("#load1") every iteration of the loop. In order to "see" this working .. I'd use $("#load1").append() so you can at least "view" what you are doing and change your code accordingly -- OR -- Create the elements dynamically, and use a key to name them.
You shouldn't be using Javascript to create all the DIVs. Just do it in the PHP script itself.
You also need to change all your duplicate IDs to classes, since IDs are supposed to be unique.
<div id="divone">
<?php
while ($row = $result->fetch_assoc()) {
?>
<div class="load">
<div class="load1"> <?php echo $row['Title']; ?> </div>
<div class="load2"> <?php echo $row['Description']; $> </div>
<div> <a class="load3" href="<?php echo $row['Link']; ?>" target="_blank">Test</a> </div>
</div>
<?php }
?>
</div>

How do I separate the while loop search results from the footer position?

The logical error here is that the footer's margin position is affected by the while loop results.
Here's the logical view of the problem: https://www.dropbox.com/s/oxyt5o4pzmarome/before%20and%20after.png?dl=0
here's my code:
<div id="print_output1">
<?php
$con=mysql_connect("localhost","root","");
mysql_set_charset("UTF8", $con);
if(!$con)
{
die("Could not connect." .mysql_error());
}
mysql_select_db("dictionary_enhanced", $con);
if (isset($_POST['word']))
{
$search = $_POST['word'];
$search1=addslashes($search);
$query = "SELECT *" .
" FROM maranao, maranao_meaning, english, filipino, translate".
" WHERE maranao.mar_id = maranao_meaning.mar_id and maranao.mar_id = translate.mar_id and filipino.fil_id = translate.fil_id and english.eng_id = translate.eng_id and maranao.maranao_word like '$search1%' ORDER BY maranao.maranao_word ASC";
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
if($num_rows==0)
{
echo "No Results Found. Please try again";
}
$previous_word = "";
$row = 0;
while($row = mysql_fetch_array($result))
{
// AM - Show the word only if it's a new one
if ($row["maranao_word"] != $previous_word)
{
echo "<div style='margin-bottom: 3px; color: white;'>.</div>";
// AM - close the previous word definition
if ($row == 0)
{
}
?>
<div style = "font-family:'Times New Roman'; font-size: 17px;">
Maranao word: <b><i><?php echo $row['maranao_word']; ?></i></b><br>
English word: <b><?php echo $row['english_word']; ?></b><br>
Filipino word: <b><?php echo $row['filipino_word']; ?></b><br>
Definition:
<?php
}
?>
<font color="white">:</font>
<div style="width:600px; border:0px solid orange; margin-left: 100px; word-wrap:break-word; margin-top: -17px;"><b><ul><li><?php echo $row['definition'] ?></li></ul></b></div>
<?php
// AM - Update the previous word and the row count
$previous_word = $row["maranao_word"];
$row++;
//echo "<br>";
}
// AM - close the last word definition
if ($row > 0)
{ echo "</div><br>"; }
}
mysql_close($con);
?>
</div><!-----end id="print_output1" ------>
</div><!-----end of id="container" ------>
</div><!-------end border shadow------->
<div id="footer"> <!---footer------>
footer <!---the footer here is affected when displaying all the results from the while loop above--->
</div>
</div> <!---------id="wrap"---->
You have not closed the div inside the while loop. Try with below code
<div id="print_output1">
<?php
$con = mysql_connect("localhost", "root", "");
mysql_set_charset("UTF8", $con);
if (!$con) {
die("Could not connect." . mysql_error());
}
mysql_select_db("dictionary_enhanced", $con);
if (isset($_POST['word'])) {
$search = $_POST['word'];
$search1 = addslashes($search);
$query = "SELECT *" .
" FROM maranao, maranao_meaning, english, filipino, translate" .
" WHERE maranao.mar_id = maranao_meaning.mar_id and maranao.mar_id = translate.mar_id and filipino.fil_id = translate.fil_id and english.eng_id = translate.eng_id and maranao.maranao_word like '$search1%' ORDER BY maranao.maranao_word ASC";
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
if ($num_rows == 0) {
echo "No Results Found. Please try again";
}
$previous_word = "";
$row = 0;
while ($row = mysql_fetch_array($result)) {
// AM - Show the word only if it's a new one
if ($row["maranao_word"] != $previous_word) {
echo "<div style='margin-bottom: 3px; color: white;'>.</div>";
// AM - close the previous word definition
if ($row == 0) {
}
?>
<div style = "font-family:'Times New Roman'; font-size: 17px;">
Maranao word: <b><i><?php echo $row['maranao_word']; ?></i></b><br>
English word: <b><?php echo $row['english_word']; ?></b><br>
Filipino word: <b><?php echo $row['filipino_word']; ?></b><br>
Definition:
<?php
}
?>
<font color="white">:</font>
<div style="width:600px; border:0px solid orange; margin-left: 100px; word-wrap:break-word; margin-top: -17px;"><b><ul><li><?php echo $row['definition'] ?></li></ul></b></div>
<?php
// AM - Update the previous word and the row count
$previous_word = $row["maranao_word"];
$row++;
echo "</div>";
//echo "<br>";
}
// AM - close the last word definition
if ($row > 0) {
echo "</div><br>";
}
}
mysql_close($con);
?>
</div><!-----end id="print_output1" ------>
footer

Mysql query is not running in opencart and not fetching data form database

I have run program in simpal query it is work.
<?php
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if(isset($_POST['search']))
{
$category = $_POST['category_id'];
$country = $_POST['country_id'];
$sql = "SELECT DISTINCT p.name,p.product_id,pr.image
FROM oc_product_description p, oc_product_filter pf ,oc_product_to_category ptc, oc_product pr
WHERE p.product_id=pf.product_id AND p.product_id=ptc.product_id AND p.product_id=pr.product_id
AND ptc.category_id=$category AND pf.filter_id=$country";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
//echo "</br>name: " . $row["name"];
$abc = $row["product_id"];
//echo "</br>id: " . $row["image"];
//echo "</br>id: " . $row["description"];
?>
<div>
<div class="row" style="border: 1px solid;height: 210px;padding: 10px 10px;">
<div class="product-block item-full" itemtype="http://schema.org/Product" itemscope="">
<div class="block-img" style="width: 13%;float: left;margin-right: 10px;" >
<?php
$temp = $row["name"];
$str = explode(" ",$temp);
$pname = implode("",$str);
?>
<div class="image" >
<a class="img" itemprop="url" title="<?php echo $row['name']; ?>" href="http://hrmssystem.com/<?php echo $pname; ?>">
<img class="img-responsive" itemprop="image" src="image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" />
</a>
</div>
</div>
<div class="product-meta" style="height: 30%;width: 85%;float: left;">
<div style="height: 100%; width: 100%; ">
<h3 class="name" itemprop="name">
<a href="http://hrmssystem.com/<?php echo $pname; ?>">
<?php echo $row['name'];
?>
</a>
</h3>
<?php
$sql2 = "SELECT description from oc_product_description where product_id = $abc ";
$res = $conn->query($sql2);
if ($res->num_rows > 0) {
// output data of each row
while($col = $res->fetch_assoc()) {
//echo $col["description"];
if( isset($col['description']) ){
$des = utf8_substr( strip_tags($col['description']),0,220);
?>
<p style="display: block;" class="description" itemprop="description"><?php echo $des; ?>...</p>
<?php }
} } ?>
<div class="cart" style="float: right;margin-top: -30px;">
<a style="color: #3498DB;" class="btn btn-default" href="http://www.hrmssystem.com/Get-Quote">Get Quote</a><?php //echo $button_cart; ?>
</br>
<a style="color: #3498DB;" class="btn btn-default" href="http://www.hrmssystem.com/Request-demo">Request Demo</a><?php //echo $button_cart; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
} else {
echo "0 results";
}
}
$conn->close();
?>
Above Code is running. But I have select only category than no result. But I have Select category and country than i have find result of search.
<?php
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if(isset($_POST['search']))
{
$category = $_POST['category_id'];
$country = $_POST['country_id'];
$sql = "SELECT DISTINCT p.name,p.product_id,pr.image, pf.filter_id
FROM oc_product_description p, oc_product_filter pf ,oc_product_to_category ptc, oc_product pr ";
//$val = array();
if(isset($category) && !empty($category)){
$sql .= ' WHERE p.product_id=pf.product_id AND p.product_id=ptc.product_id AND p.product_id=pr.product_id AND ptc.category_id=$category ';
}else(isset($country) && !empty($country)){
$sql .= ' WHERE p.product_id=pf.product_id AND p.product_id=ptc.product_id AND p.product_id=pr.product_id AND pf.filter_id=$country';
}
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
//echo "</br>name: " . $row["name"];
$abc = $row["product_id"];
//echo "</br>id: " . $row["image"];
//echo "</br>id: " . $row["description"];
?>
<div>
<div class="row" style="border: 1px solid;height: 210px;padding: 10px 10px;">
<div class="product-block item-full" itemtype="http://schema.org/Product" itemscope="">
<div class="block-img" style="width: 13%;float: left;margin-right: 10px;" >
<?php
$temp = $row["name"];
$str = explode(" ",$temp);
$pname = implode("",$str);
?>
<div class="image" >
<a class="img" itemprop="url" title="<?php echo $row['name']; ?>" href="http://hrmssystem.com/<?php echo $pname; ?>">
<img class="img-responsive" itemprop="image" src="image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" />
</a>
</div>
</div>
<div class="product-meta" style="height: 30%;width: 85%;float: left;">
<div style="height: 100%; width: 100%; ">
<h3 class="name" itemprop="name">
<a href="http://hrmssystem.com/<?php echo $pname; ?>">
<?php echo $row['name'];
?>
</a>
</h3>
<?php
$sql2 = "SELECT DISTINCT description from oc_product_description where product_id = $abc ";
$res = $conn->query($sql2);
if ($res->num_rows > 0) {
// output data of each row
while($col = $res->fetch_assoc()) {
//echo $col["description"];
if( isset($col['description']) ){
$content = substr(strip_tags(htmlspecialchars_decode($col['description'])),0,220) . "...";
?>
<p style="display: block;width: 87%;" class="description" itemprop="description"><?php echo $content; ?></p>
<?php }
} } ?>
<div class="cart" style="float: right;margin-top: -90px;">
<a style="color: #3498DB;" class="btn btn-default" href="http://www.hrmssystem.com/Get-Quote">Get Quote</a><?php //echo $button_cart; ?>
</br>
<a style="color: #3498DB;" class="btn btn-default" href="http://www.hrmssystem.com/Request-demo">Request Demo</a><?php //echo $button_cart; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
} else {
echo "No Result Found";
}
}
$conn->close();
?>
Try this:
$string = "";
if(isset($category) && !empty($category))
{
$string .= ' AND ptc.category_id=$category ';
}
if(isset($country) && !empty($country))
{
$string .= ' AND pf.filter_id=$country ';
}
$sql = "SELECT DISTINCT p.name,p.product_id,pr.image, pf.filter_id
FROM oc_product_description p, oc_product_filter pf ,oc_product_to_category ptc, oc_product pr
WHERE p.product_id=pf.product_id AND p.product_id=ptc.product_id AND p.product_id=pr.product_id
$string
";
Please remove if - else condition and use only if condition and use variable to store the condition.

Fetching replace text with image, do not working HTML Prob

This is my code:
echo "<div class=\"panel-body\" style=\"border-top: 1px solid; border-bottom: 1px solid; border-color:#ddd\">";
echo "<div class=\"vidMR\">";
echo"<div><strong>" . $lang['vldMaker'] . "</strong></div>";
echo"<div>";
$maker = "SELECT vidMaker FROM videoinformation WHERE id=".$row['id'];
if ($result1 = mysqli_query($con, $maker)) {
while ($row2 = mysqli_fetch_row($result1)) {
$values = explode(',',$row2[0]);
foreach($values as $v1)
if (!empty($v1)) {
printf ("<img src=\"addVid/maker/%s.jpg\" class=\"makerImg img-circle\" alt=\"%s.jpg\">", $v1, $v1);
}
}
mysqli_free_result($result1);
}
else{
echo $lang['vldErrorMaRo'];
}
echo"</div>";
echo"<div><strong>" . $lang['vldRoles'] . "</strong></div>";
echo"<div>";
$role = "SELECT vidRoles FROM videoinformation WHERE id=".$row['id'];
if ($result2 = mysqli_query($con, $role)) {
while ($row3 = mysqli_fetch_row($result2)) {
$values = explode(',',$row3[0]);
foreach($values as $v2)
if (!empty($v2)) {
printf ("<img src=\"addVid/roles/%s.jpg\" class=\"roleImg img-circle\" alt=\"%s.jpg\">", $v2, $v2);
}
}
mysqli_free_result($result2);
}
else{
echo $lang['vldErrorMaRo'];
}
echo "</div>";
echo"</div></div>";
Problem is that this code working ONLY in chrome and opera, BUT in IE and Mozilla pictures are not displayed...
I tried different ways...like add full path for images and so on... BUT any way it's would not like to work in IE and Mozilla.
This is out put HTML...
<body>
<div class="vidMR">
<div>
<strong>Maker:</strong>
</div>
<div><img alt="Name1.jpg" class="makerImg img-circle" src=
"addVid/maker/Name1.jpg"><img alt="Name2.jpg" class=
"makerImg img-circle" src="addVid/maker/Name2.jpg"></div>
<div>
<strong>Roles:</strong>
</div>
<div><img alt="Name1.jpg" class="roleImg img-circle" src=
"addVid/roles/Name1.jpg"><img alt="Name2.jpg" class=
"roleImg img-circle" src="addVid/roles/Name2.jpg"><img alt="Name3.jpg"
class="roleImg img-circle" src="addVid/roles/Name3.jpg"></div>
</div>
</body>
</html>

Categories