Jump to content

fugix

Members
  • Posts

    1,483
  • Joined

  • Last visited

Posts posted by fugix

  1. okay so now you know your problem...i've had issues in the past with default values in tables not appearing...you can change the field to a varchar and manually enter in a 0. but other than that im not sure what causes that to happen

  2. if you require that all three to be set, then you would use

    if ($rsUpdate1 && $rsUpdate2 && $rsUpdate3)
    {
    echo "Update successful.";
    }

    else you can use

    [code]if ($rsUpdate1 || $rsUpdate2 || $rsUpdate3)
    {
    echo "Update successful.";
    }

    [/code]

  3. variable scope is involved here. since you declare both $update and $rsUpdate outside of any statements...when you declare them again in your if statements you are writing over them....the best practice would be to change the variables like you have in your initial question text

  4. Figured it out, for 1 thing, had the stuff backwards, and second should have used !empty instead of isset:

     

    $eventstart = $rown['starttime'];
    if(!empty($eventstart)) {
         echo $rown['starttime'];
    } else {
         echo "All Day";
    }
    

    normally i only use isset() for checking if a submit button has been pressed...it only really checks if the variable exists..not if it contains data

  5. I found a better(?) way to get what I want. Thank God for jquery  :P

     

    In team.php's head-tag there's:

    <script type="text/javascript" src="includes/jquery-1.6.1.min.js"></script>

    <script type="text/javascript" language="javascript">

    function loadContent(elementSelector, sourceURL) {

    $(""+elementSelector+"").load(""+sourceURL+"");

    }

    </script>

     

    and in the player selection menu there's:

    <a href="#" onclick="loadContent('#content', 'team_players.php?id=player1.xml')">

    where the xml filename varies. The whole content of the page is in the team_players.php where I'm supposed to import the xml's data into tables etc.

     

    After some initial testing I'm pretty sure I will be asking for help in a few days on the "import data from xml to tables"-issue... I'll try to figure it out myself first and if I can't manage --> I'll be back.  :D

     

     

    BTW. Which is better (and why?)

    1) <a href="#" onclick="loadContent('#content', 'team_players.php?id=player1.xml')"> 

    or

    2) <a href="javascript:loadContent('#content', 'team_players.php?id=player1.xml');"> ? :confused:

     

    I prefer using the second...just two seperate ways of doing it

  6. it might be something as simple as in your li tags

    <li><a href="register.php"class="current">Register</a></li>

    you need a space between the href closing quotation and you class...e.g

    <li><a href="register.php" class="current">Register</a></li>

×
×
  • 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.