Jump to content

ninja

Staff Alumni
  • Posts

    19
  • Joined

  • Last visited

About ninja

Profile Information

  • Gender
    Not Telling

ninja's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. *ninja prefers all black, better to hide in. But ninja can hide no matter what colors are used.
  2. *ninja approves of this
  3. well the $number array I made is a well..it's an array. It's like having 42 unique variables, only since it's an array, it's easy to do things with those 42 unique variables, like loop through them, shuffle them around, not have to write out 42 unique variables, etc..  You can't seriously be wanting to write out 42 individual variables, are you? Especially if they are all pretty much going to represent the same thing, only different "teams" or whatever. 
  4. well it looks like he was just going about a really complicated way of ordering 4 numbers in random order, and even though it "worked" he thought that it would be a lot more work if he had 32 teams.  meh, idk.
  5. so..are you just wanting like, the numbers 1 through 32 in random order? [code] for ($num = 1; $num < 33; $num++) {   $number[] = $num; } shuffle($number); [/code]
  6. whoops.  guess i didn't catch that little } in there.
  7. http://www.private.org.il/IP2geo.html
  8. so what's the problem, other than I think you meant: if($_POST['default'] == 'default'){
  9. the most immediate problem i see is that you already assigned your first query result to $rs and then turn around and assign your 2nd query to the same variable.
  10. exampe: page1.php [code] <?php   // start your session   session_start();   // code to connect to db here   // query string. just an example to pull all info from 'something'   $sql = "select something from table";   // execute the query and put the result SOURCE in $result   $result = mysql_query($sql);   // loop through the result source to pull out the rows 1 at a time   // until there are no more rows to pull out   while ($list = mysql_fetch_assoc($result)) {     // assign each row to a session variable. we're going to make it an array     $_SESSION['blah'][] = $list['something'];   } // end while   // now lets redirect to another page for example of session var usage   header("Location: page2.php"); exit(); ?> [/code] page2.php [code] <?php   //always must use this to tell php you have a session going on   session_start();   // if it exists...   if ($_SESSION['blah']) {       // example of echoing out each 'something'       echo $_SESSION['blah'][0]; // echo out first one       echo $_SESSION['blah'][2]; // echo out third one       echo $_SESSION['blah'][6]; // echo out seventh one       // example of looping through all of them...       foreach($_SESSION['blah'] as $key => $val) {         echo "element: $key  value: $val <br/>";       } // end foreach   // end if exists   // else, if it doesn't exist...   } else {       // do something like tell user it doesn't exist, go back to some page with       // a header call, or whatever you wish to do for error handling   } // end else ?> [/code]
  11. I'm assuming that showHideLayers() is a js function you made? you must call it in the same way as you would call normal js.  Do you have script code tags echoed before and after that echo? etc..
  12. SELECT count(item_name) as c, items.* from items group by item_name
  13. if you are looking for custom content, depending on who goes to your site, you're going to have to at the very least set a cookie to hold the data so that your script can access the cookie and see which team they are on.  Or if you have some kind of login system already in place, it's as simple as adding an extra column  to your table.  Or perhaps you already have that info in your database, and it's just a matter of pulling it out and building your page based on that? Well, that's about as much advice as I can give, without some more info.  Hope that helped.
×
×
  • 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.