help me establishing blocks please. my knowldge in kodular blocks are still thin

So i have here a code for a user profile the problem i really dont know what blocks should use to display the userdetails in my app, can someone help me demonstrate it? please

<?php session_start(); include('connect.php'); if(isset($_SESSION['username']) && isset($_SESSION['resident_id'])) { $resident_id = $_SESSION['resident_id']; $resident_query = "SELECT * FROM residents WHERE id = $resident_id"; $resident_result = $conn->query($resident_query); if ($resident_result->num_rows > 0) { $resident_row = $resident_result->fetch_assoc(); / echo "**First Name:** " . $resident_row['firstname'] . " "; echo "**Middle Name:** " . $resident_row['middlename'] . " "; echo "**Last Name:** " . $resident_row['lastname'] . " "; echo "**Gender:** " . $resident_row['gender'] . " "; echo "**Birthplace:** " . $resident_row['birthplace'] . " "; // Calculate age based on birthdate $birthdate = new DateTime($resident_row['birthdate']); $currentDate = new DateTime(); $age = $birthdate->diff($currentDate)->y; echo "**Age:** " . $age . " "; // Display civil status, purok, or any other fields you have echo "**Civil Status:** " . $resident_row['civil_status'] . " "; echo "**Purok:** " . $resident_row['purok'] . " "; } else { echo "No resident details found for this user."; } } else { header("Location: login.php"); exit(); } $conn->close(); ?>

Magically the answer has been posted 4 days ago here

Sure, here’s a step-by-step process to implement the Kodular blocks for the provided PHP code:

Retrieve Data from TextBoxes:
    When the user clicks the registration button (ButtonRegister.Click), use the "TextBox.Text" blocks to retrieve the text entered by the user in each TextBox (TextBoxFirstname.Text, TextBoxMiddlename.Text, TextBoxLastname.Text, TextBoxUsername.Text, TextBoxPassword.Text).

Build URL:
    Use the "text" blocks to concatenate the retrieved values into a single string, forming the URL query parameters.
    Use the "join" block to concatenate these parameters into the complete URL string. This URL will point to your PHP script.

Make Web Request:
    Use the "Web1.PostText" block to send a POST request to the PHP script.
    In the "Web1.PostText" block, provide the constructed URL as the URL parameter.
    In the "Web1.PostText" block, provide the concatenated string of user data as the Text parameter.

Handle Response:
    Use the "Web1.GotText" event handler to handle the response from the PHP script.
    Inside this event handler, use an "if" block to check the response text for different scenarios (e.g., "User registered successfully", "You are already registered with a different username", "You are not registered as a resident").
    Based on the response, display an appropriate message to the user using the "Notifier" component.

Here’s the exact step-by-step process:

Step 1: Retrieve Data from TextBoxes

Use the "TextBox.Text" blocks to retrieve the text entered by the user in each TextBox (TextBoxFirstname.Text, TextBoxMiddlename.Text, TextBoxLastname.Text, TextBoxUsername.Text, TextBoxPassword.Text).

Step 2: Build URL

Use the "text" blocks to concatenate the retrieved values into a single string, forming the URL query parameters.
Use the "join" block to concatenate these parameters into the complete URL string. This URL will point to your PHP script.

Step 3: Make Web Request

Use the "Web1.PostText" block to send a POST request to the PHP script.
Provide the constructed URL as the URL parameter.
Provide the concatenated string of user data as the Text parameter.

Step 4: Handle Response

Use the "Web1.GotText" event handler to handle the response from the PHP script.
Inside this event handler, use an "if" block to check the response text for different scenarios.
Based on the response, display an appropriate message to the user using the "Notifier" component.

Taifun

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

I totally understand that your knowlegde is still thin. If you just read 1 post so far with a readtime of <1 min​:wink: