b781rev's Recent Forum Activity

  • What is it saying when you try to register? I just used it and it worked. I'm also doing a lot of work on my website and the databases so maybe that is a problem.

  • I have been playing around with the AJAX capabilities in Construct 2 and found it very interesting for when it's time to create my game. I've made two programs with it, both don't look that great but do work.

    This one you can register on my site(which I just started making) via AJAX:

    peepelz.com/index.php

    And this one you can load and save variables in a database via AJAX. If you go to this one though, make sure you hit L first. I have to figure out the bug in it.

    peepelz.com/index.php

  • Here is a register example:

    peepelz.com/index.php

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here are some AJAX examples. One is to save and load from a database and if you go to that one, make sure you hit L first to load the data.

    This one:

    peepelz.com/index.php

    will let you register to my site via AJAX.

    It's pretty cool stuff

  • Oh, I know. I just posted it as an example. I won't be running my site with queries like that.

  • Did anyone find these examples useful?

  • Ok, I'm going to post what I have for my .capx for the saving variables to a database and the php for it.

    FILE:

    4shared.com/file/885mRUrE/ajaxsave.html

    PHP:

    <?php

    include('connect.php');

    if ($_GET['mode']=="save") {

    $score = $_GET['score'];

    $level = $_GET['level'];

    mysql_select_db("p668534r_members", $con);

    mysql_query("UPDATE ajax SET ajax_score = '$score', ajax_level = '$level'

    WHERE username = 'b781rev'");

    if (!mysql_query($sql,$con))

    { die('Error: ' . mysql_error()); }

    mysql_close($con);

    }

    if ($_GET['mode']=="load") {

    mysql_select_db("p668534r_members", $con);

    $result = mysql_query("SELECT * FROM ajax WHERE username='b781rev'");

    while($row = mysql_fetch_array($result))

    {

    echo $row['ajax_score']."|".$row['ajax_level']."|";

    }

    mysql_close($con);

    }

    ?>

  • Ok, here is the .capx:

    4shared.com/file/6glBPu19/login.html

    jax.php:

    <?php

    $username=$_GET['username'];

    $password=$_GET['password'];

    echo $username."\n".$password;

    ?>

    Or whatever you need to put in your php page to login. Of course, that is not all of it.

    ?>

  • Ok, I just gone done downloading the newest version and I was playing around with the input boxes and buttons. I made a program where you can login an account via AJAX with the forms on the game. I don't know if it's the most secure way to do it but it's just the point of it. It's awesome.

  • So why would you want it to collapse on a key event? Wouldn't you want them to collapse whenever the player walks over them or something?

  • Online demo working:

    peepelz.com/wish.php

    This is saving and loading from a database using one string.

  • Well, I'm currently working on an AJAX project. On the php side it's nothing but php, no html. The bug thing could be that you are not focused on the canvas when you refresh but it could somehow focus it when you move your mouse.

    If you want, check out this forum topic for AJAX requests:

    scirra.com/forum/how-do-i-pull-variables-from-a-php-page_topic45040.html

    The file I'm currently working on:

    4shared.com/file/lPCGszyi/AJAX.html

    You might need to read the posts to get all the information from it so you can understand the php part.

b781rev's avatar

b781rev

Member since 4 Oct, 2011

None one is following b781rev yet!

Connect with b781rev

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies