![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 19 Pomógł: 0 Dołączył: 3.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Mam taki kod:
Kod <table border="1" width="100%"> <tr> <td> <p align="center"> <img border="0" [b]src="pic/<? echo $nr; ?>.jpg"[/b] width="500" height="375"></td> </tr> </table> <table border="1" width="100%"> <tr> <td> <p align="center"> <a target="_self" [b]href="index.php?nr=1">[/b] <img border="0" src="pic/1.jpg" width="150" height="112"></a></td> <td> <p align="center"> <a target="_self" [b]href="index.php?nr=2"[/b]> <img border="0" src="pic/2.jpg" width="150" height="112"></a></td> <td> <p align="center"> <a target="_self" [b]href="index.php?nr=3"[/b]> <img border="0" src="pic/3.jpg" width="150" height="112"></a></td> </tr> </table> Po otwarciu strony widze tylko ikonki, nie ma żadnego głownego zdjecia. Jak tu ustawić pierwsze domyślne zdjęcie? Jeszcze jedno z innej półki: po pobraniu danych z bazy danych MySQL, umiem wyświetlić dane w formie tabeli, która składa się z jednej kolumny. Chce by kolumn było 4. Poniżej fragment kodu: Kod <table>
<?php $videolist = @mysql_query($select . $from . $where); if (!$videolist) { echo '</table>'; exit('<p>Video can not be load!!<br />'. 'Error: ' . mysql_error() . '</p>'); } while ($vid = mysql_fetch_array($videolist)) { $data = $vid['data']; $zdjecie = $vid['photo']; $tytul = $vid['titel']; $link = $vid['link']; echo "<tr valign='top'>\n"; echo "<img src='$zdjecie' width='80' height='60' >"; echo "<a href='index.php?videoId=$link' target='_parent'>". "Added: $data" . "<a href='index.php?videoId=$link' target='_parent'>PLAY NOW!</a>\n"; } ?> </table> |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 1 568 Pomógł: 192 Dołączył: 7.03.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Masz tu rozwiązanie z forum, trzeba było tylko poszukać Co do pierwszego pytania nie rozumię o co ci chodzi. |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 19 Pomógł: 0 Dołączył: 3.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Dzieki za kod. Szukalem, ale chyba niewlasciwie.
Co do pierwszego: To po otwarciu strony wyglada ona tak (roboczy wyglad): (IMG:http://www.polkanazakupach.pl/photo/pic/problem.jpg) I chodzi o to, jak uzupełnic ten kod aby wyswietlal się jakis domyslny obrazek (tam gdzie teraz jest znak zapytania) po pierwszym otwarciu strony. Obrazek nie wszedl. Tutaj link do niego: Tutaj obrazek |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 1 568 Pomógł: 192 Dołączył: 7.03.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Podałeś zły link do obrazka :|
|
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 19 Pomógł: 0 Dołączył: 3.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
|
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 1 568 Pomógł: 192 Dołączył: 7.03.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Ze wstawieniem to sobie już poradzisz Ten post edytował potreb 3.01.2008, 20:35:18 |
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 19 Pomógł: 0 Dołączył: 3.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Robiłem podobnie i nic.
Tutaj zobaczysz jak to działa A kod wygląda tak: Kod <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> <table border="1" width="100%"> <tr> <td> <p align="center"> <?php if(!$_GET['nr']) { echo '<img border="0" src="pic/'.$nr.'.jpg" width="500" height="375" alt="">'; } else { echo '<img border="0" src="pic/1.jpg" alt="">'; // jezeli nie pobrano nr obrazka to wyswietli sie ten } ?> </p></td> </tr> </table> <table border="1" width="100%"> <tr> <td> <p align="center"> <a target="_self" href="index.php?nr=1"> <img border="0" src="pic/1.jpg" width="150" height="112"></a></td> <td> <p align="center"> <a target="_self" href="index.php?nr=2"> <img border="0" src="pic/2.jpg" width="150" height="112"></a></td> <td> <p align="center"> <a target="_self" href="index.php?nr=3"> <img border="0" src="pic/3.jpg" width="150" height="112"></a></td> </tr> </table> </body> </html> |
|
|
![]()
Post
#8
|
|
Grupa: Zarejestrowani Postów: 1 568 Pomógł: 192 Dołączył: 7.03.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Sorki, ale przedtem popełniłem mały błąd, teraz kod powyżej jest okey, więc możesz go wstawić. Już go z edytowałem. Tylko wystarczy wkleic (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Ten post edytował potreb 3.01.2008, 20:49:48 |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 19 Pomógł: 0 Dołączył: 3.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Teraz jest OK. Wielkie dzięki!
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 17:25 |