# Saving information into the database

**URL:** <https://community.thunkable.com/t/saving-information-into-the-database/1587204>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, cloudinary, beginner\
**Created:** [October 29, 2021, 3:46am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204 "2021-10-29T03:46:04Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![flansoda](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/flansoda/32/118777_2.png) [@flansoda](https://community.thunkable.com/u/flansoda)\
**Post date:** [October 30, 2021, 6:36am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/21 "2021-10-30T06:36:36Z")

</div>

Oh… That’s true. This is very tricky. Do you think there’s a way I can call the user ID while doing the sign up procedure?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 30, 2021, 6:49am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/22 "2021-10-30T06:49:08Z")

</div>

I make my users sign in before they can access any of the features of the app. That way I already have their userId.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 30, 2021, 7:08am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/23 "2021-10-30T07:08:16Z")

</div>

> [@flansoda](#):
>
> Do you think there’s a way I can call the user ID while doing the sign up procedure?

Why there is only a `Sign Up` without a `Sign In`?

A `Sign up` is to create the account in `Firebase` the first time. When you create it you should then use `Sign In` instead.

Using `Sign Up` every time should actually gives error.

---

<div class="post-metadata">

**Author:** ![flansoda](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/flansoda/32/118777_2.png) [@flansoda](https://community.thunkable.com/u/flansoda)\
**Post date:** [October 30, 2021, 7:27am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/24 "2021-10-30T07:27:53Z")

</div>

I do have a sign up and sign in system. It’s just that when the user is signing up, I’m having them choose a profile picture. Since I can’t really store that profile picture under the User ID when the user signs up, I’m going to store it under a secure password. The secure password is going to require specific details to reduce the chances of a user picking the same password as someone else.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 30, 2021, 7:39am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/25 "2021-10-30T07:39:40Z")

</div>

In Firebase there are 2 `Sign Up` methods for email.

You have a sign up **without** email verification and the other **with** verification.

If you used the one with verification then Firebase will only provide `UserID` when using `Sign In` block.

So use the `Sign In` block to get the `UserID` and save the profile picture under it

---

<div class="post-metadata">

**Author:** ![flansoda](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/flansoda/32/118777_2.png) [@flansoda](https://community.thunkable.com/u/flansoda)\
**Post date:** [October 30, 2021, 8:01am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/26 "2021-10-30T08:01:27Z")

</div>

I’m not really sure how I can use the User ID when I store the Image URL when the user signs up because the user has to sign up first _and then_ User ID is retrieved after the user signs in

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 30, 2021, 10:25am UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/27 "2021-10-30T10:25:17Z")

</div>

The way Firebase works is:

- `Sign Up` is to register the user credential in the database. If email verification is selected in the Firebase Authentication module setup then an email will be sent and the user need to activate the signing.
- `Sign I`n is the one that provides you access to the database and will provide a `UserID`.

The `Sign Up` block should not be used to access the data.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 30, 2021, 4:51pm UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/28 "2021-10-30T16:51:55Z")

</div>

You’re combining several steps. When you upload a photo to Cloudinary, you can just assign the mediaURL value to a variable. And then after the user signs in, save that variable value to Firebase.

---

<div class="post-metadata">

**Author:** ![flansoda](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/flansoda/32/118777_2.png) [@flansoda](https://community.thunkable.com/u/flansoda)\
**Post date:** [October 30, 2021, 6:44pm UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/29 "2021-10-30T18:44:52Z")

</div>

Oooh!! Ok, thank you again!! I got to save the image URL under the User ID by doing that. Thanks for all the help.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:14pm UTC](https://community.thunkable.com/t/saving-information-into-the-database/1587204/30 "2024-11-08T13:14:33Z")

</div>

Closed on November 8, 2024, 1:14pm UTC



[Previous page](https://community.thunkable.com/t/saving-information-into-the-database/1587204.md?page=1)
