droptank21's Recent Forum Activity

  • I'm using apache server and xampp on my laptop as host. Comes with everything I need including phpmyadmin.

    As far as securing your php code, you seem to know way more about this stuff than I do. I'm a novice. But...the only thing I've learned of is adding the below to your mysql connect coding:

    if(!get_magic_quotes_gpc())

    {

    $_GET = array_map('mysql_real_escape_string', $_GET);

    $_POST = array_map('mysql_real_escape_string', $_POST);

    $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);

    }

    else

    {

       $_GET = array_map('stripslashes', $_GET);

       $_POST = array_map('stripslashes', $_POST);

       $_COOKIE = array_map('stripslashes', $_COOKIE);

       $_GET = array_map('mysql_real_escape_string', $_GET);

       $_POST = array_map('mysql_real_escape_string', $_POST);

       $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);

    }

  • I'll examine your php. In the mean time, here is my newest attempt for the php code:

    <?php

    include 'connect.php';

    session_start();

    ?>

    <center>

    </center><br><br>

    <?php

    if (isset($_SESSION['player']))

    {

        $player=$_SESSION['player'];

        $userstats="SELECT * from km_users where playername='$player'";

        $userstats2=mysql_query($userstats) or die("Could not get user stats");

        $userstats3=mysql_fetch_array($userstats2);

    if (isset($_POST['score'])){   

        

        $score=$_POST['score'];

        }

        $updatestats="update km_users set skillpts=skillpts+$score where ID='$userstats3[ID]'";

                mysql_query($updatestats) or die("Could not update stats");

                

         

    }else{

         echo 'Your score wasnt passed in the request.';

    }

    ?>

    My attempt is to update existing data in the database by having the POST data from AJAX added to the users skillpts in the database. So far nothing has yet worked and I keep getting a lot of "Undefined varibale" errors when trying to do it the way that makes logical sense.

    I must be missing something.

  • I hope not. It's on localhost, using xampp.

  • I am having an issue figuring out AJAX Post. Basically i want the player to be able to click a button, AJAX sends info to a php page which in turn updates a stat in a mysql database.

    So far it isn't working. Can anyone tell me what I may be doing wrong?

    Files: DropBox Files

  • Sorry. Yes, I dropped that url. Will upload to dropbox when I get the opportunity.

  • .csv? or xml?

  • Think King's Quest type games. And, yes, I'm making that style of game...and it is a lot easier than I expected.

  • Goodwill - they will help find employment and train you in new skills to land a job. And focus on employment before you sit down and stress about building a Tycoon game. IMO

  • For the record, I had already voted early yesterday. But I did notice that each time I checked the site I could always vote again. Not change my vote, mind you, but actually vote a second time.

    Since then (yesterday), it appears as if that glitch has been fixed, as I don't have the option of casting a vote anymore.

  • Ditto. Anticipating this highly.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think I may have picked the most challenging type of game to design, lol.

  • I'm no expert. But I would suggest using instance variables to conrol that. Ex- set instance variables for each enemy indicating player spotted, either boolean or numeric with 0 and 1 (open/closed). Then set action/event sequences setting enemy 1's sight to false if enemy 2's sight is true and vice versa.

droptank21's avatar

droptank21

Member since 6 Apr, 2011

None one is following droptank21 yet!

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies