Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Twango

  1. @Birbal that doesn't help me at all. I know what I need to do, but don't know how to go about doing it.
  2. I also can't figure out how to change the source of HTML5 audio with JS. Help?
  3. @boen_robot, I know that, but I'm saying how do I get it so every listener's on the same track?
  4. Ok, so I REALLY want to make an internet radio thing. I want there to be like a MySQL table with the file names for each audio file, and PHP echos the SRC of an HTML5 Audio Tag to that file. I have NO idea how to do that.The only thing I could think, would be like a table like follows:id: SRC: length:1 audio.mp3 30 And then another table that has the current song, like follows: currentsong: SRC: timestart: length:1 audio.mp3 14:25:20 30 And then a Cron Job that runs a file like CheckUpdate.php, that basically checks to see if the time is equal to the length + timestart, and if it is, set the currentsong to the next?For the Cycling on the webpage, I know I could use Dynamic Ajax, but would this work for the cycling? Thanks.If you have any other ideas, please tell me!
  5. I didn't write this code... so what do you mean by If you don't see anything then you might need to add error checking to your mysql object. ?
  6. Hey, I need this program in the Ubuntu terminal to connect to MySQL.When I use $this->writeOutput("Connecting too MySQL database...", "INFO"); $this->mysql->connect("-----", "-----", "----"); $this->writeOutput("PAUSE"); $this->writeOutput("PAUSE"); $this->writeOutput("PAUSE"); It doesn't work, it echos "Connecting too MySQL database..." and then nothing else, it just goes back to wanting me to enter a command.Any ideas?Using XAMPP (LAMPP)
  7. This keeps generating a 504 error. while ($row = mysql_fetch_array(mysql_query("SELECT * FROM classes WHERE toclassid = '$classid'"))){echo "Yes";}The table "classes" has 8 columns, toclassid postbyuser postdate numstars reviewstructure unid isan teacherid It always gives the error: Gateway Time-outThe gateway did not receive a timely response from the upstream server or application.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. With that code, but when I remove it, it works fine. I can't figure out for the life of me why this isn't working. Thanks a bunch
  8. And the parent thing didn't work, when I'm using it asdocument.getElementById('parent.document.bindex').rows="*,%20";I tried changing it to CSS3... with 2 second transition on rows, still not working.It says that document.getElementById('parent.document.bindex') is null.
  9. So far I have the following, as well as a button.<script type="text/javascript" src="jquery.js"></script><script type="text/javascript">$(document).ready(function(){$(".flip").click(function(){ $("parent.document.body.rows").slideToggle("slow"); });});</script>Still not working...
  10. Gah, I hate typos... sorry to bother you.
  11. I have a page with a frameset, let's say its frameholder.php, It has a frameset with Row1 at %100 and Row2 at %0.I want the frame at Row1 to have a button on it, that when you click it, in the parent, it slides frame 2 up to %50.I can't get this to work for the life of me. Please help!
  12. I want to have 2 buttons (One would be better, truthfully)One that turns on song 1, the other song 2. The code I have now: <embed id="musics" src="music.swf?auid=2" width="0px" height="0px"/><script type="text/javascript">function chagemusic(){document.getElementById('musics').src="music.swf?auid=2";}function chagemusic2(){document.getElementById('musics').src="music.swf?auid=3";}</script> <input type="button" value="Song 1" onclick="changemusic()"/><input type="button" value="Song 2" onclick="changemusic2()"/> It's not the swf, that's working fine.
  13. Twango

    5 Tds Then Tr?

    I have absoloutely no Idea what you mean. can't get it to work. please help. :3
  14. I actually removed it, I think I added var scdn=Math.floor(Math.random()*1000);if (scdn == 250){var specleaf = new Image();specleafe.src="SpeacLeaf.gif";rndPic=specleaf;}
  15. Hi, I want to make a script that has raining "Leaves" (Or any image...), but randomly it's a Special leave.When you click on that leaf it takes you to a URL. I want it to be like 1 in 100 leaves or so.I can't figure this out;Here's the script I have; I want to modify it to work. <h1>How to play? Look for a special Green leave, then click on it!</h1><!--Copy and Paste into <BODY> Just above the </BODY> tag. --><script type="text/javascript" language="JavaScript1.2"> //Pre-loads your images below//Configure below - change URL path to your imagesgrphcs=new Array(8)Image0=new Image();Image0.src=grphcs[0]="alv.gif";Image1=new Image();Image1.src=grphcs[1]="clv.gif"Image2=new Image();Image2.src=grphcs[2]="dlv.gif"Image3=new Image();Image3.src=grphcs[3]="elv.gif"Image4=new Image();Image4.src=grphcs[4]="oak1.gif"Image5=new Image();Image5.src=grphcs[5]="oak2.gif"Image6=new Image();Image6.src=grphcs[6]="oak4.gif"Image7=new Image();Image7.src=grphcs[7]="oak6.gif"Spec= new Image();Spec.src="specleave.gif"//Smoothness depends on image file size,//the smaller the size the more you can use!// Configure below - change number of images to renderAmount=15;Ypos=new Array();Xpos=new Array();Speed=new Array();Step=new Array();Cstep=new Array();ns=(document.layers)?1:0;ns6=(document.getElementById&&!document.all)?1:0;var Stop = false;if (ns){for (i = 0; i < Amount; i++){var sbsu=Math.floor(Math.random()*2);var P=Math.floor(Math.random()*grphcs.length);rndPic=grphcs[P];document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");}}else{document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');for (i = 0; i < Amount; i++){var P=Math.floor(Math.random()*grphcs.length);rndPic=grphcs[P];document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');}document.write('</div></div>');}WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;for (i=0; i < Amount; i++){Ypos[i] = Math.round(Math.random()*WinHeight);Xpos[i] = Math.round(Math.random()*WinWidth);Speed[i]= Math.random()*5+3;Cstep[i]=0;Step[i]=Math.random()*0.1+0.05;}function fall(){if (Stop) { clearLeaves(); return; }var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;for (i=0; i < Amount; i++){sy = Speed[i]*Math.sin(90*Math.PI/180);sx = Speed[i]*Math.cos(Cstep[i]);Ypos[i]+=sy;Xpos[i]+=sx;if (Ypos[i] > WinHeight){Ypos[i]=-60;Xpos[i]=Math.round(Math.random()*WinWidth);Speed[i]=Math.random()*5+3;}if (ns){document.layers['sn'+i].left=Xpos[i];document.layers['sn'+i].top=Ypos[i]+hscrll;}else if (ns6){document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);document.getElementById("si"+i).style.top=Ypos[i]+hscrll;}else{eval("document.all.si"+i).style.left=Xpos[i];eval("document.all.si"+i).style.top=Ypos[i]+hscrll;}Cstep[i]+=Step[i];}setTimeout('fall()',120);}window.onload=fall;// ***** Delay FUNCTION HERE *****setTimeout("Stop=false", 20000); // ***** Delay 1000 = 1 second *****function clearLeaves(){for (i=0; i < Amount; i++){if (ns){document.layers['sn'+i].display='none';}else if (ns6){document.getElementById("si"+i).style.display='none';}else{eval("document.all.si"+i).style.display='none';}}}//--></SCRIPT>
  16. Twango

    5 Tds Then Tr?

    Hi, I want to have something that basically generates 5 items in a table, then closes the TR and re-opens.Here's what I have: $cxnms = 1;function addtd($inc){if ($cxnms == 1){echo "<tr>";$cxnms++;}if ($cxnms > 1 && $cxnms < 5){$cxnms++;}echo "<td><b class='lt'>" . $inc['name'] . "</b><br/><div class='bgi'><img src=" . $inc['tnloc'] . " width='90px' height='90px'/></div><br/><p><a href=game.php?gid=" . $inc['gid'] . ">" . $inc['sdesc'] . "</a></p></td>";if ($cxnms == 5){echo "</tr>";$cxnms = 1;} It just puts it all on one line.Help?
  17. I want to be able to go in my browser, I test PHP files... I did this a while ago, before a fresh windows installation, forgot how.I installed XAMPP for Windows and PHP, doesn't work.Any help?
  18. Ok, I've been working on this for ever, I can't get it to work.I've successfully created an IPN, that once it gets the payment, it does a MySQL query. My problem is, I need to store the username.So the way I did this, is on the page button.html, I have a small Ajax script that submits to addSession.php,addSession.php's source: <?phpsession_start();$_SESSION['valus'] = $_REQUEST['uid'];echo "Username currently set to <b>" . $_SESSION['valus'] . "</b>.<br/><br/>";?> AJAX Code: <script type="text/javascript">function showHint(){var xmlhttp;var str = document.getElementById('txt1').value;if (str.length==0) { }if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById('txtHint').innerHTML=xmlhttp.responseText; } }xmlhttp.open("GET","addSession.php?uid="+str,true);xmlhttp.send();}</script> and finally, a simple code I used to test to see if the value is set: <?phpsession_start();$bmx = $_SESSION['valus'];echo $bmx;?> It returns the session data just fine, but when I submit it to MySQL thru the IPN Auto-Script: session_start();$bmx = $_SESSION['valus'];mysql_query("INSERT INTO members (descr, usr) VALUES ('Good MTX','$bmx')"); It simply shows up in the database as Good MTX and then blank for usr.Help!
  19. function hasP($idx, $u){$dhas = mysql_query("SELECT * FROM hpowerups WHERE id = '$idx'");$dhas = mysql_fetch_array($dhas);$dhas = $dhas['has'];if ($dhas == "yes"){return $dhas;}else{return "no";}} Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/appattac/public_html/aadimensions/homepage.php on line 21
  20. I want ANY kind of PHP Barcode decoder.QR would be the preferred option. But any would be appreciated. I've searched high and low...
  21. the code require("attacklib.php?uta=" . $uta . "&lvl=" . $myudat['level'] . "&hgl=" . $myudat['gold']);is returning Warning: require(attacklib.php?uta=King Shadower&lvl=100&hgl=250) [function.require]: failed to open stream: No such file or directory in /home/appattac/public_html/aadimensions/attackmenu.php on line 19Fatal error: require() [function.require]: Failed opening required 'attacklib.php?uta=King Shadower&lvl=100&hgl=250' (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/appattac/public_html/aadimensions/attackmenu.php on line 19 help!
  22. Twango

    Query not working?

    Hi, the code$result = mysql_query("SELECT usr, xp, hp, level, faction FROM aad WHERE usr LIKE %$rcu%");$row = mysql_fetch_array($result);returnsWarning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/appattac/public_html/aadimensions/rsq.php on line 15Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/appattac/public_html/aadimensions/rsq.php on line 27Help!
  23. Twango

    MySQL LIKE failing?

    I want a Simple user search for my game.So far I have:$result = mysql_query("SELECT usr, hp, xp FROM aad WHERE usr LIKE '%$rcu%'");then I use W3school's echo to table.So I have two users, both starting with "King"but it only returns one.And when i search the full user, neither do.Help!
  24. Is there any way so only the server can view files.For example, a Library of functions only accessible if my server uses Require and loads it?Like if a user typed in http://www.whatever.com/lib.php it would deny access?
  • Create New...