Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

cloudll's Achievements

Regular Member

Regular Member (3/5)



  1. Sure. Its for a game, so I have a compass. Say i want to go east. I click east on my compass (the url is : index.php?hiddenbox=compass_east) and my compass_east.php contains. <?php $sql = "UPDATE game_character SET pos_y = (pos_y+25) WHERE id=1"; $statement = $dbh->prepare($sql); $statement->execute(); ?> and a lot of it is like that, when you click an attack you want to perform it loads an attack_name.php page which updates in the same way. I have about 50 pages now which all only have them 3 lines of code in, so wondered if there was another way.
  2. At the moment, if i want to update my database, im using an external page with the sql query, say its called update.php, and im including it in an invisible css box with something like this /index.php?site=homepage&hiddenbox=update. That seems to be working fine, however I have a lot of things which constantly get updated in my database so i have lots of pages to update various things. Is there a way to update from within the index.php page, maybe with an if statement if the update is dependant on say a number being less than 10? Any opinions on the best way to go about updating database would be greatly appreciated thanks.
  • 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.