Code
Assumption: you finished your calculator test like you all promised, and understood everything you created.
The basis of the calculator task was:
1. Create a form
2. Upon submitting the form, do something with the submitted data (value in text input)
3. Do something based on the calculation result from step 2. (i.e. show result to user)
Silver’s question below asks how to:
1. Create a form (name, email, password)
2. Opon submitting the form, do something with the submitted data.
3. Do something based on the result from step 2. (ie. Show “Account created!” message or “Error!” message)
The Google Docs link I posted last Thursday (http://fkingtiny.com/59) shows how you can save data using the API, given the data from a submitted form.
Step 2 is $save = $API->user_save([DATA FROM _POST])
Step 3 is if ($save[‘status’] == ‘ok’) { OK MSG } else { ERROR MSG }
Joel L 15:37 on May 25, 2011 Permalink | Log in to Reply
It is about time for you to understand that if you want to accomplish something, you have to sit down and really think about the core principles of programming –
there’s a very basic logic behind everything, but most of you seem to want to Start Using Databases, without really understanding why and how.
If you don’t agree, please explain how the above 3-step process is difficult to deduce.
Sander 18:14 on May 25, 2011 Permalink | Log in to Reply
Would the code for saving ratings work pretty much in the same manner? Since its the only place I can actually put the API to use, I’m working on integrating the API with my ratings page, so that I might be able to save ratings. How do I shot web?
Joel L 18:21 on May 25, 2011 Permalink | Log in to Reply
So everything else is ready?
I assume that I can log in, view other users and their fridges, and add stuff to my fridge, and delete things from my fridge.
There are no API methods for rating things yet.
Sander 18:22 on May 25, 2011 Permalink | Log in to Reply
Hmmm…
The design team is working on it.
Brent 18:26 on May 25, 2011 Permalink | Log in to Reply
Joel L 18:35 on May 25, 2011 Permalink | Log in to Reply
Get the new api.php from dropbox.
And then use $API->user_logout(); when needed.
Brent 18:39 on May 25, 2011 Permalink
thnx, I will first try to create my own system and when that fails, then I’ll take yours 😉
Joel L 18:41 on May 25, 2011 Permalink
The task was to add the API to your application.
Brent 18:43 on May 25, 2011 Permalink
okay
Sander 18:53 on May 25, 2011 Permalink
http://www.youtube.com/watch?v=F54rqDh2mWA
Joel L 18:55 on May 25, 2011 Permalink
http://www.youtube.com/watch?v=WbkV9S-Go74
Brent 19:01 on May 25, 2011 Permalink
http://www.youtube.com/watch?v=jW0Vuh3PKUU 0:30 peal hakkab lugu pihta
Sander 19:04 on May 25, 2011 Permalink
@Brent, your site is the emotional equivalent of Tiny Tim?