retrieve last stored value when game starts.

Discussion and feedback on Construct 2

Post » Mon Nov 05, 2012 11:09 am

i have to store the last value modified in a variable, when next time the application is loaded the last modified and stored value should be retrieved. how can i achieve this in construct2.??
i mean i have to count the click of a button and have to display the count when application is loaded in next time..please help me with this..
B
5
Posts: 24
Reputation: 498

Post » Mon Nov 05, 2012 11:45 am

Try using the WebStorage object.
Scirra Founder
B
362
S
216
G
75
Posts: 23,064
Reputation: 180,315

Post » Tue Nov 06, 2012 10:20 am

@ Ashley : will u provide me the example(capx file) for how to use WebStorage object.??
B
5
Posts: 24
Reputation: 498

Post » Tue Nov 06, 2012 10:50 am

Go and look in the how do I FAQ (link in my signature), that's where examples lies.
Check the section "Webstorage" there.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
252
S
86
G
42
Posts: 7,035
Reputation: 59,160

Post » Tue Nov 06, 2012 12:07 pm

@ Kyatric : thanks it was useful.
B
5
Posts: 24
Reputation: 498

Post » Thu Nov 08, 2012 7:22 am

@ kyatric : i made a form using construct connected to MySql Database and i m using AJAX to connect to database (php code)..connection is done successfully but i don't know how to retrieve the values of construct form text fields to store in query database.
i mean we use following query in php to insert in databse.

$sql="insert into reg_tbl (uid,fname_tb,lname_tb,uname_tb,psw_tb,gen_tb,cntry_tb)
     values('$num_rows','".$_POST['fname']."','".$_POST['lname']."','".$_POST['uname']."','".$_POST['pw']."','".$_POST['gen']."','".$_POST['cntry']."')";

My question is that how can i we get the values $_post[textBoxname]from construct to use its name in above query...?
please help..
thanks .
B
5
Posts: 24
Reputation: 498


Return to Construct 2 General

Who is online

Users browsing this forum: Baidu [Spider], megga and 8 guests