Puika1 Posted March 24, 2009 Report Posted March 24, 2009 šāds script <?php $url = "http://witality.put.lv/forum/index.php?showuser="; $con = mysql_connect($host,$dbuser,$dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 10 "); while($row = mysql_fetch_array($result)) { echo "<b><a href=\"$url".$row['id']."\"></a></b>".$style; echo "<table width=\"163\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"153\" lign=\"left\">".$row['members_display_name']."</td><td width=\"10\" lign=\"left\">(".$row['posts'] .")</td></tr></table></a>"; echo "</b>"; } mysql_close($con); ?> viņš ir šāds es gribētu šādi kāds var man palīdzēt to dabūt gatavu kad es mēģinu man rāda tikai baltu lapu help
kechums Posted March 24, 2009 Report Posted March 24, 2009 Labāk parādi ko tieši Tu mēģini, lai var izspriest, kāpēc neiet.
yeahz Posted March 24, 2009 Report Posted March 24, 2009 (edited) <?php $url = "http://witality.put.lv/forum/index.php?showuser="; $con = mysql_connect($host,$dbuser,$dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 10 "); while($row = mysql_fetch_array($result)) { echo "<img src="LINKS_UZ_BILDI.png" alt="" /><b><a href=\"$url".$row['id']."\"></a></b>".$style; echo "<table width=\"163\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"153\" lign=\"left\">".$row['members_display_name']."</td><td width=\"10\" lign=\"left\">(".$row['posts'] .")</td></tr></table></a>"; echo "</b>"; } mysql_close($con); ?> šo rindu echo "<img src="LINKS_UZ_BILDI.png" alt="" /><b><a href=\"$url".$row['id']."\"></a></b>".$style; labo pēc savām vajadzībām Edited March 24, 2009 by yeahz
Puika1 Posted March 24, 2009 Author Report Posted March 24, 2009 es izdariju ta ka tuteici bet nestrada -rada baltu lapu šādi zskatijāš <?php $url = "http://witality.put.lv/forum/index.php?showuser="; $con = mysql_connect($host,$dbuser,$dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 10 "); while($row = mysql_fetch_array($result)) { echo "<img src="http://www.lonelyplanet.tv/images/icon_user-small.gif" alt="" /><b><a href=\"$url".$row['id']."\"></a></b>".$style; echo "<table width=\"163\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"153\" lign=\"left\">".$row['members_display_name']."</td><td width=\"10\" lign=\"left\">(".$row['posts'] .")</td></tr></table></a>"; echo "</b>"; } mysql_close($con); ?>
kechums Posted March 24, 2009 Report Posted March 24, 2009 Palasi par eskeipošanu. Šo daļu echo "<img src="http://www.lonelyplanet.tv/images/icon_user-small.gif" alt="" /> nomaini uz šādu echo "<img src=\"http://www.lonelyplanet.tv/images/icon_user-small.gif\" alt=\"\" /> ...
Puika1 Posted March 25, 2009 Author Report Posted March 25, 2009 es itkā ieliku bet ari balta lapa un varbut es kko ne ta es īsti nesapratu tās eigas echo "<img src=\"http://www.lonelyplanet.tv/images/icon_user-small.gif\" alt=\"\" /> ... man ar šo aizvietot visu rindu ai beigas atstat to style?
bubu Posted March 25, 2009 Report Posted March 25, 2009 Ja tu dabū baltu lapu, tad ieliec šādas divas rindiņas pašā pašā skripta šākumā (pēc pirmā <?php): error_reporting(E_ALL); ini_set("display_erors", 1); Tad redzēsi visus kļūdas paziņojumus, nevis baltu lapu.
Puika1 Posted March 25, 2009 Author Report Posted March 25, 2009 tikuntā balta :( mēģināju arī šeit ielikt<?php // DATU NORADISANA $platums = "198.5"; // jaunumu platums pikselos $forums = ""; // pilna adrese uz forumu $limits = "13"; // topiku limits $host = ""; // db hosts $dbname = ""; // DB $dbuser = ""; // db useris $dbpass = ""; // db parole ?> error_reporting(E_ALL); ini_set("display_erors", 1); <?php $url = "http://witality.put.lv/forum/index.php?showuser="; $con = mysql_connect($host,$dbuser,$dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 10 "); while($row = mysql_fetch_array($result)) { echo "<img src="http://www.lonelyplanet.tv/images/icon_user-small.gif" alt="" /><b><a href=\"$url".$row['id']."\"></a></b>".$style; echo "<table width=\"163\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"153\" lign=\"left\">".$row['members_display_name']."</td><td width=\"10\" lign=\"left\">(".$row['posts'] .")</td></tr></table></a>"; echo "</b>"; } mysql_close($con); ?>
xPtv45z Posted March 25, 2009 Report Posted March 25, 2009 Tu neesi izlabojis ko jau tev teica. ... echo "<img src="http://www.lonelyplanet.tv/images/icon_user-small.gif" alt="" /><b><a href=\"$url".$row['id']."\"></a></b>".$style; ...
Puika1 Posted March 25, 2009 Author Report Posted March 25, 2009 Es jau sākumā tā dariju neiet p.s izskatijās šādi error_reporting(E_ALL); ini_set("display_erors", 1); <?php $url = "http://witality.put.lv/forum/index.php?showuser="; $con = mysql_connect($host,$dbuser,$dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 10 "); while($row = mysql_fetch_array($result)) { echo "<img src="http://www.lonelyplanet.tv/images/icon_user-small.gif" alt="" /><b><a href=\"$url".$row['id']."\"></a></b>".$style; echo "<table width=\"163\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"153\" lign=\"left\">".$row['members_display_name']."</td><td width=\"10\" lign=\"left\">(".$row['posts'] .")</td></tr></table></a>"; echo "</b>"; } mysql_close($con); ?>
xPtv45z Posted March 25, 2009 Report Posted March 25, 2009 Es tev iekopēju rindiņu kurā ir kļūda, nevis izlaboju viņu. :)
Odyssey Posted March 26, 2009 Report Posted March 26, 2009 (edited) man sanaca shita, bet kaut kadu erroru vel dod ara par [Notice: Undefined variable: style in C:\xampp\htdocs\tposters.php on line 25] <?php // DATU NORADISANA $platums = "198"; // jaunumu platums pikselos $forums = "http://mclaren.oo.lv/f"; // pilna adrese uz forumu $limits = "5"; // topiku limits $host = "localhost"; // db hosts $dbname = "f"; // DB $dbuser = "root"; // db useris $dbpass = "izeed dirsu, kartigi paeed"; // db parole ?> <?php error_reporting(E_ALL); ini_set("display_erors", 1); $url = "http://mclaren.oo.lv/f/index.php?showuser="; $con = mysql_connect($host,$dbuser,$dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 10 "); while($row = mysql_fetch_array($result)) { echo "<table width=\"130\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"153\" lign=\"center\"><img src='http://www.lonelyplanet.tv/images/icon_user-small.gif' alt='face' /> ".$row['members_display_name']."</td><td width=\"10\" lign=\"left\">(".$row['posts'] .")</td></tr></table></a>"; echo "</b>"; } mysql_close($con); ?> Edited March 26, 2009 by Odyssey
mounkuls Posted March 26, 2009 Report Posted March 26, 2009 (edited) echo "<img src="http://www.lonelyplanet.tv/images/icon_user-small.gif" alt="" /> Nu sproti, echo "izvada"skaitās, ka ir izvade beigusies un vēl + error. Sākas izvade ar dubultpēdiņām un ar nākamajām beidzas, ja tās neekranē/neeskepo. Viss kas ir aiz otrajām dubutpēdiņām(vispār man quote tīk labāk, nav kāds normālāks datortermins?), skaitās jau ne izvade, un php sāks psihot, ja nav echo normāli pabeigts. Tātad lai php to neuzskata par izvades beigām, vajag, kā jau minēja eskeipot, jeb ekranēt, kā norādija ketchums(ceru niku uzrakstiju pareizi). $var='bomba'; echo "Man ir paslēpta $var."; //Uzdrukās to (Man ir paslēpta bomba.), neko vairāk. Tas nav nekāds HTML kur drīkst, bet nav labi tagus atvērt un tos aizvērs pats lietotāja pārlūks. echo "izvade"; ir vai echo 'izvade'; vai echo {izvade};. -sintakse tāda ir. Gribi iekļaut $var vērtību izvadei: echo "Man ir paslēpta ".$var."."; ir vai echo 'Man ir paslēpta '.$var.'.'; Tie nav vienīgie varianti, man vairāk tīk echo 'uotput'; , bet tas tā. Edited March 26, 2009 by mounkuls
Recommended Posts