Jump to content

cyberdie

Members
  • Content Count

    12
  • Joined

  • Last visited

Everything posted by cyberdie

  1. Haha I noticed thanks instead of a txt file is it better just to use HTML, what are the pros and cons?
  2. Appreciate the comments, although maybe not the patronising one, although that may because I'm not much of a fisherman. Appreciate that the PHP is flawed in terms of refresh of same user, although was just looking for a counter that would act as a guide. Worked it out though as needed to set home page as php and use birbal's include feature. Job Done. (stick of dynamite seems to do just as good a job)
  3. Hi guys just wanted a quick fix as I dont know PHP, but all i was looking to do was load the following. I have a file called db.txt which has 0 numeric value and have sourced this code <?php$db = "db.txt"; // The database we created$handle = fopen($db, 'r+') ; // Open the db, read and be able to write to it$data = fread($handle, 512) ; // Get current count from the db$count = $data + 1; // Add in a count since it's being readprint $count; // Display current count on the web pagefseek($handle, 0) ; // Point back to the beginning of the filefwrite($handle, $count) ; // Save the countfclose($handle) ; // Close count?> I can have the counter work if I load counter.php however I want the counter embedded into the index homepage and the number increase on open, like a hit counter should. Please can someone provide the answer.
  4. I Did the changes as you suggested, although im not sure what is missing, I also supplied a function to allow for an onload event, as to my limited understanding anyway. <script type="text/javascript">function init(){var txt1 = "h47fNaOb-JU";document.getElementById("player").src = "[url="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist="]https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist="+txt1+",ma9I9VBKPiw&feature=player_embedded[/url]";}window.onload=init;<object style="height: 390px; width: 640px"><param name="movie" value="[url="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist=h47fNaOb-JU,ma9I9VBKPiw&feature=player_embedded"]https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist=h47fNaOb-JU,ma9I9VBKPiw&feature=player_embedded[/url]"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed id='player' src="[url="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist="]https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist="+txt1+",ma9I9VBKPiw&feature=player_embedded[/url]" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></object></script>
  5. Trying to create a variable, help please. wnat to be able to replace txt1 with the var youtube ID. <body><p><script>var txt1 = "h47fNaOb-JU";</script><object style="height: 390px; width: 640px"><param name="movie" value="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist=h47fNaOb-JU,ma9I9VBKPiw&feature=player_embedded"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&autoplay=1&playlist=<script>txt1</script>,ma9I9VBKPiw&feature=player_embedded" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></var></object></p></body>
  6. Ok thanks scientist. This is the basics of what I am trying to do, but as I am new to this I dont know how to copy the content from the table into another table which I would like to be contained within a seperate html page. Also If possible I would like it if the information could be transferred into individual textboxes instead of another table. But if not possible then a table will do. Thanks <body><div id="JohnsDetails"> <table width="400" border="0" cellspacing="2" cellpadding="2"> <caption align="top"> Johns Details </caption> <tr> <th width="205" class="style1" scope="col"><div align="center">Description</div></th> <th width="181" class="style1" scope="col">Likes</th> </tr> <tr> <td class="style1"><div align="center">11</div></td> <td class="style1"><div align="center">Stamps</div></td> </tr> <tr> <td class="style1"><div align="center">Tall</div></td> <td class="style1"><div align="center">Photos</div></td> </tr> <tr> <td class="style1"><div align="center">GCSE</div></td> <td class="style1"><div align="center">Computers</div></td> </tr> <tr> <td class="style1"><div align="center">Football</div></td> <td class="style1"><div align="center"></div></td> </tr> </table></div><div class="style1" id="JohnDisplayed"> <table width="400" border="0" cellspacing="2" cellpadding="2"> <caption align="top"> John Displayed </caption> <tr> <th scope="col"> </th> <th scope="col"> </th> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table></div><button class="style1" onclick="document.getElementById('JohnDisplayed').value=document.getElementById('JohnsDetails').value">Load Details</button></body></html>
  7. Haha what is it then? And what is best to use for it?
  8. Hi,Is there a way to click a link and have the values transferred into a list of textboxes labelled eg textbox1 through to textbox10?
  9. You make it sound easy lol. How do I go about doing that? I've started going through the JavaScript tutorial on the site which by the way is really well put together.
  10. Thanks, will learn in time however I posted my question to try get a quick fix now as I couldn't find the answer I was looking for in the forumns.
  11. I am using Dreamweaver to design and as I am a novice to web design and currently looking to learn, I am hoping for some assistance. 1. I want to know how you can create a textbox / input box on a webpage that would allow a viewer / user to enter a website and then click submit and then that website would load in a seperate window - similar to your current address bar attached to any browser but only I would need it to load using my created site. 2. How easy is it to enter this code in something like dreamweaver for e.g? 3. Is it better to have a seperate e.g. .php page that has all the coding on, that the submit button would refer to as apposed to using the main index page to code on. Hope this makes sense as im still trying to learn to lingo.
×
×
  • Create New...