dulais Posted September 13, 2009 Author Report Share Posted September 13, 2009 Kas tur tāds ir?? Es to skriptu netaisīju tā kā neko nezinu būtu labāk palīdzējis nevis iepostojis šito sūdu. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted September 14, 2009 Report Share Posted September 14, 2009 Būtu labāk apguvis pamatus, nevis kopējis bez poņas sev nesaprotamus skriptus! Kas nedarbojas? Kā izpaužas nedarbošanās? Ko esi darījis, lai darbotos? Kā jāizskatās tad, kad darbojas? Quote Link to comment Share on other sites More sharing options...
dulais Posted September 14, 2009 Author Report Share Posted September 14, 2009 OMG viss darbojas video ieliek iekš db, bet kā man izvadīt tos visus video uz lapu? Quote Link to comment Share on other sites More sharing options...
briedis Posted September 14, 2009 Report Share Posted September 14, 2009 OMG viss darbojas video ieliek iekš db, bet kā man izvadīt tos visus video uz lapu? OMGLOLWTFBBQ, ievadi gūglē php mysql SELECT un palasi. Quote Link to comment Share on other sites More sharing options...
dulais Posted September 14, 2009 Author Report Share Posted September 14, 2009 (edited) Ok tik tālu tiku, bet nu ir atkal viena problēma kā skripts var saprast kurš id ir izvēlēts?? video.php uztaisīju šādu: <? error_reporting(E_ALL); ini_set("display_errors", 1); $con = mysql_connect("localhost","",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("", $con); $result = mysql_query("SELECT * FROM video"); while($row = mysql_fetch_array($result)) { } mysql_close($con); echo'</tr></table>'; ?> <div id="vf"> <div id="videoframe"> <b><?$nosaukums;?></b> <div id="vidurl"><a href="videos.php?video=<?$video_id;?>" title=""> <img src="http://i.ytimg.com/vi/<?$embed;?>/default.jpg" width="80" height="80" border="0"> </a></div> <div id="vidtit2"><a href="videos.php?video=<?$video_id;?>" title="<?$nosaukums;?>"></a></div> Pievienoja: <b><?$autors;?></b><br> <a href="videos.php?video=<?$video_id;?>">Apskatīt</a><br /> </div> </div> videos.php <? error_reporting(E_ALL); ini_set("display_errors", 1); $con = mysql_connect("localhost","",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("", $con); $result = mysql_query("SELECT * FROM video"); while($row = mysql_fetch_array($result)) { } echo <<< HTML <tr> <td> <center> <b>$nosaukums</b><br> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/$embed&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/$video_id&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br><br> Adrese: <input type=text style="width: 290px;" readonly value="http://revenge.lv/videos.php?video=$video_id" /><br> Pievienoja: <b>$autors</b><br> </center> </td> </tr> HTML; echo'</tr></table>'; ?> datubāze izskatās šāda Edited September 14, 2009 by dulais Quote Link to comment Share on other sites More sharing options...
briedis Posted September 14, 2009 Report Share Posted September 14, 2009 tagad tjipa padod caur linku id un skaties konkrēto video. $video_id = mysql_real_escape_string($_GET['video_id']); $result = mysql_query("SELECT * FROM video WHERE video_id = '$video_id'"); while($row = mysql_fetch_array($result)){ echo "Video id:" . $row['video_id']; echo "Embded:" . $row['embed']; echo "autors:" . $row['autors']; //utt... } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.