-
Posts
522 -
Joined
-
Last visited
Posts posted by budimir
-
-
Thanks litebearer,
You're code worked like a charm, atlhough I would like to know what I messed up with my code. I'm realy curious!!!!
I had to correct one mistake in you're code, but it worked perfectly.
Thanks for you're effort. Thanks. Thanks. Thanks. You made my day. I spent whole day trying to figure out what's wrong with my code, because the same one is working on antoher page I have, so that's why I don't understand!!! If you could clarify that for me I would appreciate I lot. I need to understand.
-
Not working correctly.
Now I have a situation that images are display horizontally, but for indefinite. What ever I do, it will not go to new row after 4 images.
Please help. This is the code.
<table width="100%" border="1" cellspacing="4" cellpadding="4" align="center"> <tr> <?php $slika_velika = "slike_medalja/"; $slika_mala = "slike_medalja/thumbs/"; $upit = "SELECT * FROM medalje_slike ORDER BY datum_dodavanja ASC"; $rezultat = mysql_query($upit,$veza) or die (mysql_error()); while($row = mysql_fetch_array($rezultat)){ $slika_v = $row["slika_velika"]; $slika_m = $row["slika_mala"]; $mjesto = $row["mjesto_osvajanja"]; $naziv = $row["naziv_natjecanja"]; $vrsta = $row["vrsta_medalje"]; if ($vrsta == 1) { $medalja = "Zlato"; } elseif ($vrsta == 2) { $medalja = "Srebro";} elseif ($vrsta == 3) { $medalja = "Bronca"; } $i = 0; if($i % 4 == 0){ echo ' <td width="25%" align="center" valign="top"> <a href= "'.$slika_velika.''.$slika_v.'" rel="lytebox" title="'.$naziv.' - '.$mjesto.' - '.$medalja.'" target="_blank"><img src="'.$slika_mala.''.$slika_m.'" border="0"></a><br /> '.$naziv.' - '.$mjesto.' <strong>'.$medalja.'</strong> </td>'; } #echo '</tr><tr>'; $i++; } ?> </tr> </table>
-
Hey guys,
Thanks for you're effort, but I made it. I tried to play with code and this is what it acctualy made it work.
<table width="100%" border="1" cellspacing="4" cellpadding="4" align="center"> <tr> <?php $slika_velika = "slike_medalja/"; $slika_mala = "slike_medalja/thumbs/"; $upit = "SELECT * FROM medalje_slike ORDER BY datum_dodavanja ASC"; $rezultat = mysql_query($upit,$veza) or die (mysql_error()); while($row = mysql_fetch_array($rezultat)){ $slika_v = $row["slika_velika"]; $slika_m = $row["slika_mala"]; $mjesto = $row["mjesto_osvajanja"]; $naziv = $row["naziv_natjecanja"]; $vrsta = $row["vrsta_medalje"]; if ($vrsta == 1) { $medalja = "Zlato"; } elseif ($vrsta == 2) { $medalja = "Srebro";} elseif ($vrsta == 3) { $medalja = "Bronca"; } $i = 0; if($i % 4 == 0){ echo ' <td width="25%" align="center" valign="top"> <a href= "'.$slika_velika.''.$slika_v.'" rel="lytebox" title="'.$naziv.' - '.$mjesto.' - '.$medalja.'" target="_blank"><img src="'.$slika_mala.''.$slika_m.'" border="0"></a><br /> '.$naziv.' - '.$mjesto.' <strong>'.$medalja.'</strong> </td>'; } $i++; #echo '</tr><tr></tr><tr>'; } ?> </table>
I hope someone will make a use of this.
Again, thanks!!!
-
Hey revraz,
I did it like this, now, but still not working
<?php $slika_velika = "slike_medalja/"; $slika_mala = "slike_medalja/thumbs/"; $upit = "SELECT * FROM medalje_slike ORDER BY datum_dodavanja ASC"; $rezultat = mysql_query($upit,$veza) or die ("Nije uspilo"); while($row = mysql_fetch_array($rezultat)){ $slika_v = $row["slika_velika"]; $slika_m = $row["slika_mala"]; $mjesto = $row["mjesto_osvajanja"]; $naziv = $row["naziv_natjecanja"]; $vrsta = $row["vrsta_medalje"]; if ($vrsta == 1) { $medalja = "Zlato"; } elseif ($vrsta == 2) { $medalja = "Srebro";} elseif ($vrsta == 3) { $medalja = "Bronca"; } $i = 0; if($i % 4 == 0){ echo '<tr> <td width="25%" align="center" valign="top"> <a href= "'.$slika_velika.''.$slika_v.'" rel="lytebox" title="'.$naziv.' - '.$mjesto.' - '.$medalja.'" target="_blank"><img src="'.$slika_mala.''.$slika_m.'" border="0"></a><br> </td> <td width="25%" align="center" valign="top"> '.$naziv.' - '.$mjesto.' </td> <td width="25%" align="center" valign="top"> '.$medalja.' </td><br /> '; echo '</tr>'; } $i++; } ?>
I would like to display the images horizontaly in columns, but I'm getting them verticly in rows??? What am I doing wrong?
-
This is the complete code I'm using
<?php $slika_velika = "slike_medalja/"; $slika_mala = "slike_medalja/thumbs/"; $upit = "SELECT * FROM medalje_slike ORDER BY datum_dodavanja ASC"; $rezultat = mysql_query($upit,$veza) or die ("Nije uspilo"); while($row = mysql_fetch_array($rezultat)){ $slika_v = $row["slika_velika"]; $slika_m = $row["slika_mala"]; $mjesto = $row["mjesto_osvajanja"]; $naziv = $row["naziv_natjecanja"]; $vrsta = $row["vrsta_medalje"]; if ($vrsta == 1) { $medalja = "Zlato"; } elseif ($vrsta == 2) { $medalja = "Srebro";} elseif ($vrsta == 3) { $medalja = "Bronca"; } $i = 0; if($i % 4 == 0){ echo ' <td width="25%" align="center" valign="top"> <a href= "'.$slika_velika.''.$slika_v.'" rel="lytebox" title="'.$naziv.' - '.$mjesto.' - '.$medalja.'" target="_blank"><img src="'.$slika_mala.''.$slika_m.'" border="0"></a><br> </td> <td width="25%" align="center" valign="top"> '.$naziv.' - '.$mjesto.' </td> <td width="25%" align="center" valign="top"> '.$medalja.' </td><br /> '; echo '</tr><tr>'; } $i++; } ?>
-
Hey guys,
I wrote a code for displaying images in columns, but for some reason it's not working. Can you take a look and tell me what I'm doing wrong?
$i = 0; if($i % 4 == 0){ echo ' <td width="25%" align="center" valign="top"> <a href= "'.$slika_velika.''.$slika_v.'" rel="lytebox" title="'.$naziv.' - '.$mjesto.' - '.$medalja.'" target="_blank"><img src="'.$slika_mala.''.$slika_m.'"width="200" height="150" border="0"></a><br> </td> <td width="25%" align="center" valign="top"> '.$naziv.' - '.$mjesto.' </td> <td width="25%" align="center" valign="top"> '.$medalja.' </td><br /> '; echo '</tr><tr>'; } $i++; }
The output I'm getting now is one image below another. I would like to display them one next to another.
Please help!!!
-
OK, I solved it!
I have used TinyMCE to insert the code to database and probably TinyMCE ut something inside the code. I just copied the code as plain text and now it's OK.
Thanks for the effort!
-
No, I didn't get any error messages. That's why I'm confused. As I understand I just get displayed what is stored in the variable, but the map won't run. Is there anything else I need to do to run the map?
-
Hey guys,
I have stored a google map link into a database. When I try to display it from database using the command below
<?php echo $google_map; ?>
I get this output, but I can't display a map.
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=hr&geocode=&q=smi%C4%8Diklasova+3,+karlovac,+croatia&sll=37.0625,-95.677068&sspn=50.910968,135.263672&ie=UTF8&hq=&hnear=Tadije+Smi%C4%8Diklasa,+Karlovac,+Republika+Hrvatska&t=h&ll=45.487155,15.55089&spn=0.028883,0.054932&z=14&iwloc=A&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=hr&geocode=&q=smi%C4%8Diklasova+3,+karlovac,+croatia&sll=37.0625,-95.677068&sspn=50.910968,135.263672&ie=UTF8&hq=&hnear=Tadije+Smi%C4%8Diklasa,+Karlovac,+Republika+Hrvatska&t=h&ll=45.487155,15.55089&spn=0.028883,0.054932&z=14&iwloc=A" style="color:#0000FF;text-align:left">Prikaz veće karte</a></small>
Can you tell me why?? When try to copy that directly to HTML it works perfectly!!! I'm confused!
-
Hey guys,
I'm trying to run two javascripts on same page. One javascript is for the dropdown menu and second one is for the image gallery. I can't get them both to work in the same time. Only one of them is working. Either a dropdown menu or image gallery. Is it possible to have both javascripts on the same page???
Dropdown Navigation Menu code is:
<script type="text/javascript" src="js/mootools-for-dropdown.js"> </script> <script type="text/javascript" src="js/UvumiDropdown-compressed.js"> </script> <link rel="stylesheet" type="text/css" media="screen" href="css/uvumi-dropdown.css" />
Image gallery code is:
<script type="text/javascript" src="/high/highslide/highslide.js"></script> <link rel="stylesheet" type="text/css" href="/high/highslide/highslide.css" />
I'm not so good with javascript. I'm just following the instructions from the website.
Thanks in advance!!!
-
That was the problem, haku!
Thank you very much!
-
OK, so,
When I click view source, this is what I get, but when I try to click on it, nothing happens.
<p align="center"> <a href="korisnici.php"><img src="images/korisnici.gif" width="118" height="13" alt="korisnici"></a><a href='clanovi.php'><img src='images/clanovi.gif' width='118' height='13' alt='clanovi'></a><a href='upload.php'><img src='images/upload.gif' width='118' height='13' alt='upload'></a><a href='vijesti.php'><img src='images/vijest.gif' width='118' height='13' alt='vijest'></a><a href='natjecanja.php'><img src='images/natje.gif' width='118' height='13' alt='natjecanja'></a><a href='newsletter.php'><img src='images/newsletter.gif' width='118' height='13' alt='newsletter'></a> </p>
Any ideas?
-
Because I'm using a href link inside PHP tags and they are not working in some browsers! When I'm using a href as plain HTML everything is OK. That's why I'm showing the PHP peace of code. That peace of code is failing for some reason. I can see the pictures, but there is no link when you try to click on them...
-
Hi thorpe,
Ihave went through it once again, but I don't understand. The compelt code is below...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <?php include("include/session.php");?> <title>Werdum Combat Team Karlovac</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link type="text/css" rel="stylesheet" href="style.css" /> <script type="text/javascript" src="js/mootools-for-dropdown.js"> </script> <script type="text/javascript" src="js/UvumiDropdown-compressed.js"> </script> <link rel="stylesheet" type="text/css" media="screen" href="css/uvumi-dropdown.css" /> <style type="text/css"> body1,html1{ background-color:#333; margin:0; padding:0; font-family: "Times New Roman", Times, serif; } #main{ margin:0% auto; width:824px; height:500px; position:relative; overflow:auto; color:#aaa; padding:20px; border:0px solid #888; } </style> <script type="text/javascript"> var menu = new UvumiDropdown('dropdown-demo'); </script> </head> <body> <div id="top"> <div id="main"> <ul id="dropdown-demo" class="dropdown"> <li><a href="index.html">Home</a></li> <li><a >BJJ</a> <ul> <li><a href="bjj.html">O BJJ</a></li> <li><a href="oklubu.html">O Klubu</a></li> <li><a href="treninzi.html">Treninzi</a></li> <li><a href="kimono.html">Kimono</a></li> <li><a href="pravila.html">Pravila</a></li> <li><a href="natjecanja.html">Natjecanja</a></li> </ul> </li> <li><a href="index2.html">Galerija</a></li> <li><a href="index2.html">Vijesti</a></li> <li><a href="index2.html">Forum</a></li> <li><a href="index2.html">Kontakt</a></li> <li><a href="index2.html">Ostalo</a></li> </ul> </div> </div> <div id="header" class="home"> </div> <div id="wrapper" class="style1"> <div id="content"> <table border="1" width="100%"> <td> <p><?php echo "Dobrodošao $ime $prezime, <br /> Ovdje se nalaze informacije samo za članove WTC Karlovac. Sve informacije vezane za tebe, kao korisnika ove stranice su vidljive samo tebi i administratoru ove stranice. Sve osobne informacije neće biti vidljive ostalim članovima ili posjetiteljima ove stranice. Ukoliko imate pitanja ili želite da se neke informacije ne prikazuju, slobodno obavijestite administratora."; ?></p> </td> </table> <p> </p> <p align="center"> <?php if ($a_korisnici == 1) { echo '<a href="korisnici.php"><img src="images/korisnici.gif" width="118" height="13" alt="korisnici"></a>'; } else { echo "";} if ($a_clanovi == 1) { echo "<a href='clanovi.php'><img src='images/clanovi.gif' width='118' height='13' alt='clanovi'></a>"; } else { echo ""; } if ($a_slike == 1) { echo "<a href='upload.php'><img src='images/upload.gif' width='118' height='13' alt='upload'></a>"; } else { echo ""; } if ($a_vijesti == 1) { echo "<a href='vijesti.php'><img src='images/vijest.gif' width='118' height='13' alt='vijest'></a>"; } else { echo ""; } if ($a_natjecanja == 1) { echo "<a href='natjecanja.php'><img src='images/natje.gif' width='118' height='13' alt='natjecanja'></a>"; } else { echo ""; } if ($a_newsletter == 1) { echo "<a href='newsletter.php'><img src='images/newsletter.gif' width='118' height='13' alt='newsletter'></a>"; } else { echo ""; } ?> </p> <p align="center"> </p> <div id="left"> <a href="b.php"><img src="images/big_pic.jpg" alt="" width="442" height="200" /></a><br /> <div> <img src="images/title3.gif" alt="" width="81" height="16" /><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper.Tellus er sodales enim, in tincidunt mauris in odio. Massa ac laoreet iaculipede nisl ullamcorper- massa, ac consectetuer feipsum eget pede. Proin nunc. </p> <a href="#" class="more">more info</a> </div> <div> <img src="images/title4.gif" alt="" width="102" height="16" /><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper.Donec massa. Nulla pulvinar, nisl ac convallis nonummy, tellus eros sodales enim, in tincidunt mauris in omassa ac laoreet iaculipede nisl ullamcorpermassa,consectetuer.</p> <a href="#" class="more">more info</a> </div> </div> <div> <p> </p> <p> </p> <p><img src="images/title5.gif" alt="" width="368" height="37" /><br /> </p> <div class="block"> <img src="images/pic7.jpg" alt="" width="150" height="100" /> <span>17 december</span><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper. <a href="#" class="more">more info</a></p> </div> <div class="block"> <img src="images/pic8.jpg" alt="" width="150" height="100" /> <span>17 december</span><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper.Tellus er sodales enim, in tincidunt mauris in odio. Massa ac laoreet iaculipede nisl ullamcorpermassa, ac consectetuer feipsum eget pede. Proin nunc. Donec massa. Nulla pulvinar, nisl ac convallis nonummy, tellus eros sodales enim, in tincidunt mauris in odio. <a href="#" class="more">more info</a></p> </div> </div> </div> </div> <div id="footer"> <p> </p> <form name="form1" method="post" action=""> <table width="863" border="0"> <tr> <td colspan="8"><div align="center">Ulaz za članove Werdum Combat Team Karlovac</div></td> </tr> <tr> <td width="273"><div align="right">Korisničko ime</div></td> <td width="144"><input type="text" name="ki" id="ki" tabindex="1"></td> <td width="22"> </td> <td width="33"><div align="right">Lozinka</div></td> <td width="144"><input type="password" name="lo" id="lo" tabindex="2"></td> <td width="45"><div align="right"> <input type="submit" name="ulaz" id="ulaz" value="Ulaz" tabindex="3"> </div></td> <td width="83"> </td> <td width="85"> </td> </tr> </table> </form> <p> </p> <p>Werdum Combat Team Karlovac | Dizajn by B&D | Webmaster: bjjkarlovac@gmail.com</p> <p> </p> </div> </body> </html>
-
I can see images, but I can't click on them to get to link they are linked too.
???
-
Guys,
i don't understand why this code is working under IE8, but not under Firefox 3.1 or Chrome 8. Can you please help? I don't see what's wrong.
<?php if ($a_korisnici == 1) { echo '<a href="korisnici.php"><img src="images/korisnici.gif" width="118" height="13" alt="korisnici"></a>'; } else { echo "";} if ($a_clanovi == 1) { echo "<a href='clanovi.php'><img src='images/clanovi.gif' width='118' height='13' alt='clanovi'></a>"; } else { echo ""; } if ($a_slike == 1) { echo "<a href='upload.php'><img src='images/upload.gif' width='118' height='13' alt='upload'></a>"; } else { echo ""; } if ($a_vijesti == 1) { echo "<a href='vijesti.php'><img src='images/vijest.gif' width='118' height='13' alt='vijest'></a>"; } else { echo ""; } if ($a_natjecanja == 1) { echo "<a href='natjecanja.php'><img src='images/natje.gif' width='118' height='13' alt='natjecanja'></a>"; } else { echo ""; } if ($a_newsletter == 1) { echo "<a href='newsletter.php'><img src='images/newsletter.gif' width='118' height='13' alt='newsletter'></a>"; } else { echo ""; } ?>
-
Hi guys,
I'm using phpMailer to send emails. The way of sending pictures with it is that I put a picture somewhere on the net and then just send the link in email. So when someone opens the email it connects to that adress and it shows the picture.
My problem is, I need to embed the picture within the email and I don't know how. Can you help me? How can I embed a picture and send it together with email?
Thanks a lot!
-
OK, I'll try to see this PHPExcel tool and see what I can get.
Thanks for your help.
-
OK, so can you tell me how can I export data from MySQL to Excel in that way that every column is separated in columns in Excel????
-
OK, so here is the code I'm using:
<?php include ("../admin/servis/include/session.php"); $baza = "servis"; $tablica = "kalkulacija"; $upit = "SELECT kataloski_broj, VPC, MPC FROM kalkulacija"; $rezultat = mysql_query($upit,$veza) or die (mysql_error()); $out = ''; //Dohvačanje naziva svih kolona $fields = mysql_list_fields($baza,$tablica); //Brojanje polja tablice i ubacivanje u $columns $columns = mysql_num_fields($fields); //Stavljanje imena svih polja u $out for($i = 0; $i < $columns; $i++) { $l = mysql_field_name($fields,$i); $out .= "".$l."\t"; } $out .= "\n"; //Dodavanje svih vrijednosti iz tablice u $out while($l = mysql_fetch_array($rezultat)) { //for($i = 0; $i < $columns; $i++) { //$out .= '"'.$l["$i"].'"\t'; //} $out .= $row[0] . "\t" . $row[1] . "\t" . $row[2] . "\t"; $out .= "\n"; } //Otvori file export.csv $f = fopen('export.csv','w'); //Stavljanje svih vrijednosti u CSV fputs($f,$out); fclose($f); header('Content-type:application/csv'); header('Content-Disposition:attachment; filename="export.csv"'); readfile('export.csv'); mysql_close($veza); //header("Location:kalkulacija.php"); exit; ?>
But the result is put in one column. I want to separate every column for itself.
-
Something like that, but I'd like to export it to Excel CSV file format.
Every column from MySQL should be in separate column in CSV.
This is the example:
MySQL columns: Part Number Description Location
to | | |
˅ ˅ ˅
Excel columns: Column A Column B Column C
Right now, the code from above is putting everything to Column A.
-
This is the result:
"kalkulacija_id kataloski_broj VPC MPC datum_kalkulacije naziv klasifikacija marza banka spedicija carina tecaj prosjecni_rabat max_rabat nabavana "
But, everything is generated in column A. I would like it to be :
kalkulacija_id - Column A
kataloski_broj - Column B
VPC - Column C
...
-
For some reason it's not working for me. This is the peace of code I'm using.
//Stavljanje imena svih polja u $out for($i = 0; $i < $columns; $i++) { $l = mysql_field_name($fields,$i); $out .= "".$l."\t"; } $out .= "\n";
-
Hey guys,
How can I put 5 columns form MySQL to 5 columns in CSV? Not comma separated, but each every column for itself.
like this:
Column 1 Column 2 Column 3 Column 4 Column 5
Data 1 Data 2 Data 3 Data 4 Data 5
Image upload not working with some files?
in PHP Coding Help
Posted
Hey guys,
I have an image upload script and it's working fine. But for some files it will not work. It says it can't get the filesize and it can't copy that file. I have tried to change the file format of that file, but with no result. So it's not the file format. Is there anything else that could confuse getfilesize and copy commands in PHP? Can you please tell me what is wrong?