How can I make prewiev of all photos with path in database?
How to set img src=http://www.htmlforums.com/archive/index.php/?
<?php
$conn = mysql_connect("localhost","", "") or
die ("Could not connect to localhost");
mysql_select_db("slike") or
die("Nije moguće pristupiti bazi podataka");
$result = mysql_query("select * from slike") or
die (mysql_error());
$slika1=$row["slika1"];
$slika2=$row["slika2"];
$slika3=$row["slika3"];
$slika4=$row["slika4"];
$slika5=$row["slika5"];
$slika6=$row["slika6"];
while ($row = mysql_fetch_array($result))
{
echo "<b>Sifra: </b>";
echo $row["ID"];
echo "<br>\n";
echo "<b>Slika 1: </b>";
echo $row["slika1"];
//img src=http://www.htmlforums.com/archive/index.php/"$slika1" ;
echo "<br>\n";
echo "<b>Slika 2: </b>";
echo $row["slika2"];
echo "<br>\n";
echo "<b>Slika 3: </b>";
echo $row["slika3"];
echo "<br>\n";
echo "<b>Slika 4: </b>";
echo $row["slika4"];
echo "<br>\n";
echo "<b>Slika 5: </b>";
echo $row["slika5"];
echo "<br>\n";
echo "<b>Slika 6: </b>";
echo $row["slika6"];
echo "<br>\n";
echo "<b>Slika 7: </b>";
echo $row["slika7s"];
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
echo "------------------------------------------------------------------------------------------------------------------------------------------------------------";
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
}
mysql_close($conn);
?>just like this
echo "<img src=http://www.htmlforums.com/archive/index.php/\"$slika1\">";Thank you.
One more question.
I've got form witch is submited. it fils fields in database.
After entering data in database, I want to open another page. How can I do it.
Already tried include('upload_slika.php');
It is working, but no satisfied, becouse session from page with form, sends wrong variable to another page with name 'upload_slika.php'.
What I need is clean opening of page 'upload_slika.php'after the form submits and loads the page you can use the header function.
header("location: upload_slika.php");
but this has to go before you output anything to the brwoser, should be towards the top of the page.thank you
How to set img src=http://www.htmlforums.com/archive/index.php/?
<?php
$conn = mysql_connect("localhost","", "") or
die ("Could not connect to localhost");
mysql_select_db("slike") or
die("Nije moguće pristupiti bazi podataka");
$result = mysql_query("select * from slike") or
die (mysql_error());
$slika1=$row["slika1"];
$slika2=$row["slika2"];
$slika3=$row["slika3"];
$slika4=$row["slika4"];
$slika5=$row["slika5"];
$slika6=$row["slika6"];
while ($row = mysql_fetch_array($result))
{
echo "<b>Sifra: </b>";
echo $row["ID"];
echo "<br>\n";
echo "<b>Slika 1: </b>";
echo $row["slika1"];
//img src=http://www.htmlforums.com/archive/index.php/"$slika1" ;
echo "<br>\n";
echo "<b>Slika 2: </b>";
echo $row["slika2"];
echo "<br>\n";
echo "<b>Slika 3: </b>";
echo $row["slika3"];
echo "<br>\n";
echo "<b>Slika 4: </b>";
echo $row["slika4"];
echo "<br>\n";
echo "<b>Slika 5: </b>";
echo $row["slika5"];
echo "<br>\n";
echo "<b>Slika 6: </b>";
echo $row["slika6"];
echo "<br>\n";
echo "<b>Slika 7: </b>";
echo $row["slika7s"];
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
echo "------------------------------------------------------------------------------------------------------------------------------------------------------------";
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
echo "<br>\n";
}
mysql_close($conn);
?>just like this
echo "<img src=http://www.htmlforums.com/archive/index.php/\"$slika1\">";Thank you.
One more question.
I've got form witch is submited. it fils fields in database.
After entering data in database, I want to open another page. How can I do it.
Already tried include('upload_slika.php');
It is working, but no satisfied, becouse session from page with form, sends wrong variable to another page with name 'upload_slika.php'.
What I need is clean opening of page 'upload_slika.php'after the form submits and loads the page you can use the header function.
header("location: upload_slika.php");
but this has to go before you output anything to the brwoser, should be towards the top of the page.thank you