Jump to content

apw

Members
  • Posts

    96
  • Joined

  • Last visited

Posts posted by apw

  1. When using php to select information whats the differences in these two lines..

     

    $userstat="select * from pfile where playername='$player'"; and the line $userstats=$db->execute("select * from $dbtables[pfile] where playername='$player'");

     

    whats the difference and which would be safer to use

  2.  

    hello

     

      hello, Im trying to do a break in my code that allows the seperation of table elements such as:

     

    print "<table class='maintable'><tr class='headline'><td><center>Main Menu</center></td></tr>";
          print "<tr class='mainrow'><td>Civil</a></td></tr>";
          print "<tr class='mainrow'><td><A href='economics.php'>Economics</a></td></tr>";
          print "<tr class='mainrow'><td><A href='buildings.php'>Buildings</a></td></tr>";
          print "<tr class='mainrow'><td><A href='landuse.php'>Land Use</a></td></tr>";
          print "<tr class='mainrow'><td><A href='society.php'>Society</a></td></tr>";
          print "<tr class='mainrow'><td><A href='resources.php'>Resource Management</td></tr><br>";    
    
    -- break here for seperation--
    
    print "<tr class='mainrow'><td>Military</a></td></tr>";
          print "<tr class='mainrow'><td><A href='attack.php'>Attack</a></td></tr>";
          print "<tr class='mainrow'><td><A href='Espionage.php'>Espionage</a></td></tr>";
          print "<tr class='mainrow'><td><A href='units.php'>Units</a></td></tr>";
          print "<tr class='mainrow'><td><A href='officers.php'>Officers</a></td></tr>";
          print "<tr class='mainrow'><td><A href='history.php'>Attack History</a></td></tr>";
          print "</td></tr>";
    
    

     

    There should be a break between the resource management and the military section.  I've tried to do a print "<br>"; and it pulls the entire table down.

     

    Thanks for your help

  3. Hello

     

    im working with php and the print ""; to display text  such as the following:

    print "welcome warrior, $player to the game!";

     

    that displays fine, however when i post the contents into my html editor the output screen displays the print "";

     

    could i get away with just straight text doing away with the print and the necessary content show correctly or does php must use the print ""; to display the text

  4. Thank you for your suggestions.  There are still many changes that i am working on to organize and possibly remove/replace content on the website.  I hope the website didnt overwhelm you and you were able to easily navigate and was able to use each portion of the website with little to no trouble.

  5. Hello

     

    I am opening a new social-networking website located at

     

     

     

     

    htt://social.lmninfo.com

     

    I have completed most of the new layout for the website, added new features and fixed many bugs found and would like your feedback on other improvements that could be made.

     

    Thanks in advance for your comments and suggestions.

  6. Im looking for testers to give me feedback on my social-community website. The source used is gpl  however ive been working to fix bugs, clean-up code, add new features as well as give the site a more personal touch.  Please tryout everything and either post comments and suggestions here or on the built-in forums om website.  Thanks in advance.

     

    http://social.lmninfo.com

  7. Hello, ive ran into a problem with sql insert.  My register.php file contains playername, password, email, empirename and title along with those when player submits the info the player provided gets pas sed to another php file called reguser.php in this file the info the player provided is checked and inserted into a table called pfile.  The insert into pfile works fine but when i tried placing a similar insert below the insert into pfile, after the ; at the end the information doesnt get inserted it doesnt generate an error and the pfile insert above the new insert also doesnt work.

     

    my question is how do i go about adding multiple inserts within that php file

  8.  

    Hello

     

      Hello, Im looking for suggestions to create database tables that will keep the

    following information clean and organized:

     

    9 worker units

    9 buildings

    5 resources

    26 army units

    50+ technologies

     

    I was thinking first to create one table that had all this information in it, however

    thats ALOT of fields and I don't know if the table would be able to handle all

    this information.  Instead, breaking each element into its own individual table

    and 'tag' each table with the players either empire name OR username to keep

    each table field together ...

     

    Your suggestions please?

     

    Thanks again

  9.  

    I use a paid hosting account that doesn't allow the use of cron.  I've seen a few

    php scripts like black nova traders have a javascript that uses a counter to update

    their database like this:

     

    ?><br>
    <center>
    <?
    // Update counter
    
    $res = $db->Execute("SELECT last_run FROM $dbtables[scheduler] LIMIT 1");
    $result = $res->fields;
    $mySEC = ($sched_ticks * 60) - (TIME()-$result[last_run]);
    ?>
      <script language="javascript" type="text/javascript">
       var myi = <?=$mySEC?>;
       setTimeout("rmyx();",1000);
    
       function rmyx()
        {
         myi = myi - 1;
         if (myi <= 0)
          {
          myi = <? echo ($sched_ticks * 60); echo "\n";?>
          }
         document.getElementById("myx").innerHTML = myi;
         setTimeout("rmyx();",1000);
        }
      </script>
    <?
    echo "  <b><span id=myx>$mySEC</span></b> $l_footer_until_update <br>\n";
    // End update counter
    

     

    now if I could reword this to update my database pfile for the players turns

    that would be great ..

     

    Thanks

  10. My question this time is about updating my database every two hours on the odd hour. The reason for this is for my turned-based game each odd hour the sql database needs to update the pfile portion pturns amd give each player a turn.  Im thinking javascript what do you think to make this simple?

  11. My question is about .. When player hits the next-turn button the players pfile in the sql-database should stamp the time the player hit the button, which it does however along that line i also need an additional 20-minutes or so added to the stamped time then when the real-time reaches the time that was an additional 20-minutes my script tells player that their army has returned! Is that possible?

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