Jump to content

help


blankextacy

Recommended Posts

could some one tell me why this isnt working

[code]<?php
if (!$view) {
print "Fight movie selection<br><br>
<table>
<tr><td width=100><b><u>Name</td><td width=100><b><u>Picture</td><td

width=50><b><u>Description</td><td><b><u>Submitted</td><td><b><u>Options</td></tr>";

$videos = mysql_query("select * from videos where type='fight' order by id");
while ($video = mysql_fetch_array($videos)) {
print "<tr><td>$video[name]</td><td><p><img src=$video[pic]
width="62" height="62"</p></td><td>$video[desc]</td><td>$video[submitted]</td><td>- <A

href=fights.php?view=$video[id]>Play</a></td></tr>";
}
print "</table>";
}

if ($view) {
$video = mysql_fetch_array(mysql_query("select * from videos where id=$view"));
if (empty ($video[id])) {
print "No such video. Go back to the <a href=videos.php>videos</a>.";

exit;
}
if ($video[type] != pranks || funny || stupid || animated) {
print "That's not a fight video. Go back to the <a href=videos.php>videos</a>.";

exit;
}
print "<embed src='$video[link]' type='application/x-mplayer2' width='300' height='300' ShowControls='1'

ShowStatusBar='0' loop='true' EnableContextMenu='0' autostart='true' DisplaySize='0'

pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/'></embed></div>";
mysql_query("update players set credits=credits-$arm[cost] where id=$stat[id]");
}
?>[/code]

im not sure but the image part isnt working [code]<td><p><img src=$video[pic]
width="62" height="62"</p></td>[/code]

and the view part isnt working
Link to comment
Share on other sites

[code]if ($view) {
$video = mysql_fetch_array(mysql_query("select * from videos where id=$view"));
if (empty ($video[id])) {
print "No such video. Go back to the <a href=videos.php>videos</a>.";

exit;
}
if ($video[type] != pranks || funny || stupid || animated) {
print "That's not a fight video. Go back to the <a href=videos.php>videos</a>.";

exit;
}
print "<embed src='$video[link]' type='application/x-mplayer2' width='300' height='300' ShowControls='1'

ShowStatusBar='0' loop='true' EnableContextMenu='0' autostart='true' DisplaySize='0'

pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/'></embed></div>";
mysql_query("update players set credits=credits-$arm[cost] where id=$stat[id]");
}
?>[/code]
that part also doesnt work the site is http://revo-online.net/gdmovies/fights.php as u can see when u click play ?view=1 comes up blank
Link to comment
Share on other sites

[quote author=blankextacy link=topic=111847.msg453486#msg453486 date=1161131925]
[code]if ($view) {
$video = mysql_fetch_array(mysql_query("select * from videos where id=$view"));
if (empty ($video[id])) {
print "No such video. Go back to the <a href=videos.php>videos</a>.";

exit;
}
if ($video[type] != pranks || funny || stupid || animated) {
print "That's not a fight video. Go back to the <a href=videos.php>videos</a>.";

exit;
}
print "<embed src='$video[link]' type='application/x-mplayer2' width='300' height='300' ShowControls='1'

ShowStatusBar='0' loop='true' EnableContextMenu='0' autostart='true' DisplaySize='0'

pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/'></embed></div>";
mysql_query("update players set credits=credits-$arm[cost] where id=$stat[id]");
}
?>[/code]
that part also doesnt work the site is http://revo-online.net/gdmovies/fights.php as u can see when u click play ?view=1 comes up blank
[/quote]

First off, your not supposed to run a function within another function example: mysql_fetch_array(mysql_query());. Your MySQL query is vulnerable to SQL injections, please secure your $_GET variables.  Also with your array it should be $array['item'] or $array[3] not $array[video], And your if() statement is wrong. 

That was just after a glance at your code.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.