Jump to content

Little Goat

  • Posts

  • Joined

  • Last visited

Posts posted by Little Goat

  1. @msd: The problem is, the style tag does not have an ID or a Name or any of that fun stuff. so I have to detect it by the tag name.@aspnetguy: so you're saying it's impossible for me to do this, or this there some workaround I can use? do you have a website or can you show me an example of what this is?ThanksLG

  2. Hey guys,I am trying to style a web page which I have no control over the head of, so naturally I just thought to use Javascript to replace the CSS which is embedded in the head.the code I am using is this exactly:

    document.getElementsByTagName("style")[0].innerHTML=" ";

    it works fine in Opera and FireFox, but for some reason it does nothing in IE but throw an error.it says Unknown Runtime Error, and points to the line where I have that code.does anyone know why it does this?ThanksLG

  3. Actually, Internet Graphics Artists do not use any code (unless you are using SVG or another type I don't know of) And Most Browsers are the same with graphics unless they have a really bad bug, and then they're not worth using. :)So, I don't really think you need to worry about browsers if all you do is graphics.

  4. First of all, is this a Flash game, or is it coded into the PHP?Second of all, if the users input their scores into the form, they most likely won't be accurate, will they?Third of all, if it is an html form, then just make the <form action="yourpage.php" method="POST"> and then access it with the $_POST variable on the next page.And why do you have it stored in an array? if you are already submitting it to a PHP page, just do what you need to do there.Also, as Silver said, your code would really help you get more responsive answers.

  5. I don't think something like this can just be copy-pasted into your page. Well, maybe someone can just give you a whole web page, but it would really help you to learn a least a little about PHP so that you can understand the code and be able to fix it if something goes wrong. what I would do is store the results in a fileand then when you want to see them, you can just open the file and see.

  6. oh, yeah, if you want to put the content for different pages in separate files, you could do that but it also brings up some security issues if someone changed ?page=index to ?page=secretpasswords and you have a file named secretpasswords.html, it would bring it up.

  7. ok, so what you would need to do, is change all your links from stuff like "index.html" or "contact.html" to this: "index.php?page=index" and "index.php?page=contact" then in the php, you would do this:

    <?phpif($_GET['page']='index'){echo "index page content here";}elseif($_GET['page']='contact'){echo "contact page content here";}?>

    and so on...and you put that PHP code in the place where you usually put all the content.later, when you get into MySQL, you can store it in there, but I think this should work for you.

  8. so what you would do on the page you want people to see is this:

    <script type="text/javascript">function changeTime(Span){Content=Span.innerHTML;Content-=1;if(Content<=0){  Content="You may submit again.";  Span.innerHTML=Content;}else{  Span.innerHTML=Content;  setTimeout(changeTime(Span), 1000);  }}</script>

    and put this wherever you want the time to show up:

    <span id="time"><?php echo $fetch->lastmess - time(); ?></span>

    then at the bottom of you page, right before the </body> tag, put this:


    EDIT: oh, I guess I type too slow. :)

  9. here is how I would do it:java script:

    Date = new Date();Hours = Date.getHours();document.getElementById('formid').hiddeninputelement.value=Hours;document.getElementById('formid').submit();

    then of course you need a form:

    <form id="formid" action="dayornight.php" method="post"><input type="hidden" name="hiddeninputelement" value="" /></form>

    and then on the PHP page you check if $_POST['hiddeninputelement'] is set then if it isn't, redirect to the JS page. if it is, set $theme_switch_hour to $_POST['hiddeninputelement'].

  10. mysql_fetch_assoc() and mysql_fetch_array() are almost the same thing.what you need to do is replace this:

    while($r = mysql_fetch_array($result)) { echo '<h1>'.$r['header'].'</h1>'; echo $r['content']; echo "<br />"; echo "<title>The Shattered Realms ~ Siymeha: $r[header]</title>"; }
    with this:
    echo '<h1>'.$r['header'].'</h1>';   echo $r['content'];   echo "<br />";   echo "<title>The Shattered Realms ~ Siymeha: $r[header]</title>";

    putting mysql_fetch_array() in there is selecting the second line instead of the first, as you already used mysql_fetch_assoc().

  11. you would have to use Javascript to update the page, you could use setTimeout(functiontochangetime(), 1000);that would execute the function after that amount of time (in milliseconds), and you would put that in the end of functiontochangetime() so that it would do it every second. then you could either use ajax to get the time from a php page, or you could just set a span's innerHTML to spansid.innerHTML-1 and if it was zero, redirect to a different page.of course you might have to log their IP and put a time on that so they won't just press back and do it over again.

  12. you must supply a username and password to connect to the MySQL server. You should have been asked for these when you set up the server.and $user = ($_POST['user']); should be $user = $_POST['user']; without the parentheses.and one more thing. do you even have your login info in the DB? make sure you do.

  13. that's because there's nothing in the email. try this:

    <a href='http:\\www.wasper-rocker.co.uk/activate.php?act_num={$random}'>http:\\www.wasper-rocker.co.uk/activate.php?act_num={$random}</a>.

    notice that instead of putting the url in title, I put it inbetween the tags.

  • Create New...