zeeshan_haider000 Posted February 8, 2009 Share Posted February 8, 2009 Hi, I am writing a function but for some reasons it's not working, when the 'condition' of 'if' statement is true, the function doesn't do anything.. no error nothing.... here is my function: <?php ###.Play/Show Episodes function PlayEpisodes(){ if (!empty($_GET['id'])){ $query = "SELECT * FROM naruto WHERE Id='".$_GET['Id']."'"; $result = mysql_query($query) or die(mysql_error()); while ($r = mysql_fetch_array($result)){ echo '<div id="column3">'. '<div class="topbox">'. '<b>'.$r['EpisodeName'].'</b>'. '</div>'. '<div class="contentbox">'; echo ('<embed type="application/x-shockwave-flash" src="http://actressgroup.googlegroups.com/web/mediaplayer.swf?gda=S4hVfEEAAABG-_R4hq0Q9qRB2IjW-nqTv_6P4rUf6Qe3GPO7KQWFqFN8I1fVoO69foVMC6QD8MdTCT_pCLcFTwcI3Sro5jAzlXFeCn-cdYleF-vtiGpWAA" style="" id="player2" name="player2" quality="high" wmode="transparent" allowscriptaccess="never" allowfullscreen="true" flashvars="height=296&displayheight=296&file='.$r['Url'].'&showstop=true&volume=100&callback=analytics" width="100%" height="100%"></embed>'); echo ('</div>'.//Contentbox closed '<div class="bottombox">'. '<table border="0" width="100%">'. '<tr><td>'. '<b>Language: </b>'. '</td><td>'. '<b>Episode#: </b>'. '</td><td>'. '<b>Added on: </b>'. '</tr><tr style="border-bottom: thin dotted;"><td>'. $r['Language']. '</td><td>'. $r['EpisodeNumber']. '</td><td>'. $r['DateAdded']. '</td></tr>'. '<tr><td>'. '<!-- AddThis Button BEGIN --> <script type="text/javascript">var addthis_pub="narutotv"; addthis_brank = "NarutoTv.Co.Nr"; </script> <a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, \'\', \'[url]\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script> <!-- AddThis Button END -->'. //Share Button '<a href="#"><img style="border:none"; alt="Report!" src="images/report.gif" /></a>'. '</td></tr>'. '</table>'. 'WORKING!'. '</div>'. //CSS BOTTOM CLOSED '</div>'); //CSS COLUMN3 CLOSED echo 'EVERYTHING IS SET!'; }//WHILE LOOP CLOSED } //IF !ISSET CLOSED else { echo ' TO BE SET SOON!'; } }//function end ?> And here is the page: PAGE Help would be much appreciated... Zee Quote Link to comment https://forums.phpfreaks.com/topic/144280-help-with-a-function/ Share on other sites More sharing options...
premiso Posted February 8, 2009 Share Posted February 8, 2009 Are you calling the function? Quote Link to comment https://forums.phpfreaks.com/topic/144280-help-with-a-function/#findComment-757165 Share on other sites More sharing options...
peranha Posted February 8, 2009 Share Posted February 8, 2009 Everything looks closed to me try putting this at the top of the file and see if anything displays. ini_set ("display_errors", "1"); error_reporting(E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/144280-help-with-a-function/#findComment-757169 Share on other sites More sharing options...
sasa Posted February 8, 2009 Share Posted February 8, 2009 $_GET['id'] and $_GET['Id'] is NOT same Quote Link to comment https://forums.phpfreaks.com/topic/144280-help-with-a-function/#findComment-757206 Share on other sites More sharing options...
zeeshan_haider000 Posted February 8, 2009 Author Share Posted February 8, 2009 $_GET['id'] and $_GET['Id'] is NOT same You are right, haha stupid mistake.. thank you everyone, it was really frustrating figuring out what i had done wrong... Quote Link to comment https://forums.phpfreaks.com/topic/144280-help-with-a-function/#findComment-757256 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.