How to Submit Usersignup & Classifieds on same time?

First a big thank you developers! This is an amazing product and its so smooth how well done wappler is! I know Dreamweaver with the old native extension with direct php code. But using JSON as a „Middleware“ is just fantastic! Im a bit missing that powerful search and replace in wappler, where you were able to replace tags, and could also replace more granular infos.

#Okay lets go with my problem:

I have two tables:

  • User (id, name, mail, etc…)
  • UserClassifieds (id, iduser, text, date, etc)

now for more comfort to my users, i want that the user can create directly a Classified within same page. He will see name, mail, and can enter classifieds text. after submitting it will store user and create a Classified already linked to the proper user. Password will be sent to the user via Mail, so he doesnt need to choose one. As most users are bit confused with that.

so how to create a classified and user entry on same time? For my experience i know that I need to get back the created „id“ from the user before creating the userclassified. So how to get that into one step?

Thanx so much I hope i was clear with my question.

btw: Is that nice Forum also done with wappler?? :grinning:

why are you using 2 table ? 1 table enought … can users have multiple classifield ?

Exactly: 1:n

User can have multiple classifieds. So my setup of db design is proper. Also i thought about using : mysql views, or stored procedures. But I really guess it could be simpler. I only need to get back the id of the created userid…

it is so easy…

please click output option in insert action … thats it :))

identitty : last inserted id

okay amazing, so then i could make a second insert and pass that variable (#identity) I guess?

Ill try that tomorrow! Would be amazing! Ill then generate a default random password for that newly created user and send him an email. Maybe I need to implement some „Change Defaultpassword now“ or similar!

1 Like

This shows how to use password encryption if it helps.

https://wapplerunwrapped.online/videoplayer.php?id=22

@Hyperbytes amazing thanks! I‘ll set that Hash and tell the User, that he needs to change his Password ( like FirstTimeUse or PasswordReset)

PS: Is that nice forum done with wappler?

Wappler unwrapped is 100% wappler

2 Likes

Tried your solution and it works out of the box! Incredbile! Small change but huge result. Now having everything simply on one page: Userregistration and Classifieds together :ok_hand:t5::grinning: