Jump to content

Corona4456

Members
  • Posts

    244
  • Joined

  • Last visited

    Never

Everything posted by Corona4456

  1. the only way I can think of is if the form you are submitting has the item's fields in it and I'm assuming item is an object or array? right? function myFunc(item){ cbsel(item); document.test.field = item.field // or item[0] ... document.test.submit(); }
  2. hmm... try this in a php file: <?php phpinfo(); ?> Does that show anything? If so is that similar to what you see on your remote server?
  3. I think you are going to have to give more information. I'm not familiar with any plug-in named "sysinfo". I'm unsure as to what system information it is grabbing.
  4. You'll have to use Javascript for that.
  5. I'm sure you can just modify the scripts to NOT go in random order .
  6. Yes. According to the documentation: http://pear.php.net/package/DB/docs/1.7.11/DB/DB_result.html#methodfetchInto
  7. <?php $navigationSql = "SELECT * FROM nav"; $navResult =& $db->query($navigationSql); while ($navResult->fetchInto($nav)){ $navigation .= "<a href=\"$nav[2]\" target=\"$nav[3]\" title=\"$nav[1]\">$nav[1]</a><br />"; } echo $navigation; ?>
  8. Their API doc is an excellent resource. As for development I recommend Eclipse. That's all I use . The Java forums are excellent for finding solutions to your problems or you can go to Google groups and find a Java group there to help you out with any problem you may have. For any Swing type stuff feel free to send me a message (GUI's are my specialty... well kinda... if I don't know it then I'll find someone who does ).
  9. Ok... so the header and config site name are found here: <h1 id="header" onclick="location.href='<?php echo $mosConfig_live_site;?>/';" style="cursor: pointer;"> <a href="<?php echo $mosConfig_live_site;?>/"><?php echo $mosConfig_sitename; ?></a></h1> and banner is here: <?php if (mosCountModules('banner') >= 1) { ?> <!-- start banner. --> <div id="banner"> <?php mosLoadModules('banner'); ?> </div> <!-- end banner. --> <?php } ?>
  10. what audiokiwi did should work just fine.
  11. Ok... I see the problem now. The problem is you increment $count AFTER you output your option code. Instead of doing that... just do this: echo "<option value='" . $value . "'>" . $value; Since you already have your value just use it.
  12. <?php function c() { global $db_host; global $db_login; global $db_pswd; global $connected; static $db; if(!$connected){ $db = @ mysql_connect($db_host, $db_login, $db_pswd); $connected = true; } return $db; } function q($q_str) { global $db_name; global $connected; global $query_count; global $show_debug_info; global $queries_str; $db = c(); $r = mysql_db_query($db_name, $q_str, $db); echo mysql_error($db); if ((ee() AND $show_debug_info)) { echo '' . ': ' . $q_str; } if (!$query_count) { $query_count = 0; } $queries_str .= '' . $q_str . ' '; ++ $query_count; return $r; } function d ($db) { @mysql_close ($db); } function e ($r) { if (@mysql_numrows ($r)) { return 0; } else { return 1; } } function ee () { global $show_debug_info; $err = mysql_error (); if ($show_debug_info) { echo $err; } return ($err ? true : false); } function f ($r) { return @mysql_fetch_array ($r); } function fr ($r) { return @mysql_fetch_row ($r); } function nr ($r) { return @mysql_num_rows ($r); } ?>
  13. Hmm... that's odd... if you make a field unique then it shouldn't be able to have 2 rows with the same item in it.
  14. Well.. to check to see if there are connection issues do this: $db = mysql_connect("$hostname","$user","$pass") or die("Unable to connect to mysql server: " . mysql_error());
  15. Ah... well then can I see both loops then? Just out of curiosity. Thanks.
  16. Well you have a $value == $row['lob'] in there which skips printing that one element... could it coincidentally be the last item in the array?
  17. Hmm... I'm not sure of how your setup is. Do you test your changes locally (running your own webserver locally) and then upload your changes? If so then there may be some configuration issues unless your server and your local server are configured exactly the same.
  18. You can do several things but the easiest ways would be: Make the rows to be unique by forcing one of fields to be unique, in this case 'item'. This will produce an error when you try to insert two items of the same name and then you can handle it that way. Do a quick SELECT check on the database for the specific item before you add it to the database. If it exists then just update the quantity Do a delete query on the specific item where the quantity is 0? This one is iffy since I don't know if you insert other items with a quantity of 0, if so then this method wouldn't work.
  19. Ok... so is this assuming a user will take only 1 quiz? Or if the user takes another quiz the old result will be erased and a new one will put in there? If so, then all you have to do is this: $query = "UPDATE `users` SET quiz='" . $score . "' WHERE id=" . $userid; mysql_query($query); This is assuming you have the user's id stored in the $userid variable. You can replace it with whatever variable holds that value.
×
×
  • 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.