anonīms Posted February 24, 2008 Report Share Posted February 24, 2008 if($_GET['video']) { $vidurla = '<a href="http://gaming.wc3.lv/video">Video</a>'; $vid = mysql_query("SELECT id, video_nosaukums, video_adrese, video_komentars from video WHERE id=$video"); while($video = mysql_fetch_array($vid, MYSQL_NUM)) echo "@"; { echo "<h2>".$vidurla." > ".$video['1']."</h2><p></p>$video[2] "; ?> <center> <div id="video_players">Neredzi video atskaņotāju?<a href="http://www.macromedia.com/go/getflashplayer">Dodies šeit!</a></div> <script type="text/javascript" src="http://gaming.wc3.lv/videoplayer/swfobject.js"></script> <script type="text/javascript"> var s1 = new SWFObject("http://gaming.wc3.lv/videoplayer/mediaplayer.swf","mediaplayer","400","320","7"); s1.addParam("allowfullscreen","true"); s1.addVariable("width","400"); s1.addVariable("height","320"); s1.addVariable("file","..."); s1.write("video_players"); </script></center> <?php } } else { .. } Lieta tāda, ka iekšs while viņš neizvelk $video, kā piemēram: ".$video['1']." / tur vajadzētu būt Video nosaukumam, bet viņš tur neparādas.error reporting all šoreiz nevaru veikt, jo hostētājam error_reportin ir OFF. Varbūt kāds jau ir saskāries ar šādu problēmu? Un vēl viens jautājums, vai iekšs <script> drīkst ievietot php kodu? Link to comment Share on other sites More sharing options...
andrisp Posted February 24, 2008 Report Share Posted February 24, 2008 while($video = mysql_fetch_array($vid, MYSQL_NUM))echo "@"; { Kas tas par echo tur starpā ? Sobriid sanaak, ka while izpilda echo "@", bet nevis to, kas starp {}. un php kodu vari likt jebkur. Galvenais, ka pats fails tiek padots php paarserim. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted February 24, 2008 Report Share Posted February 24, 2008 (edited) izmanto paste.php.lv ... savadak siet taadu blakji ir gruti parskatiit.... Un vēl viens jautājums, vai iekšs <script> drīkst ievietot php kodu? Jaa driiks ... <script> alert(<?php echo 'shish ir alerts'; ?>) </script> Buus korekts... tikai jauzmanas ar pedinjam --> viegli ielasit kljudas.... Edited February 24, 2008 by Grey_Wolf Link to comment Share on other sites More sharing options...
anonīms Posted February 24, 2008 Author Report Share Posted February 24, 2008 ups :D Ļoti atvainojos, tik šķību kodu vel nebiju redzējis sarakstītu by me :) $vid = mysql_query("SELECT id, video_nosaukums, video_adrese, video_komentars from video WHERE id= {$_GET['video']} "); get video bija nepieciešams un while vispār nevajadzēja, jo vajag man tikai vienu īsto ierakstu Link to comment Share on other sites More sharing options...
Recommended Posts