# How to make it in AS?

**URL:** https://forum.kirupa.com/t/how-to-make-it-in-as/188537
**Category:** Uncategorized
**Created:** [May 8, 2006, 8:39pm UTC](https://forum.kirupa.com/t/how-to-make-it-in-as/188537 "2006-05-08T20:39:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Arquenvaron](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@Arquenvaron](https://forum.kirupa.com/u/Arquenvaron)
#### Post date: [May 8, 2006, 8:39pm UTC](https://forum.kirupa.com/t/how-to-make-it-in-as/188537/1 "2006-05-08T20:39:08Z")

</div>

hey guys…

i have one site in PHP with a dynamic menu where i execute some SQL commands to show the number of messages for that user and where the user can change some details in his profile, and send messages to other users.

this is the code in php:

```php

 <?php
                            error_reporting(0);
                            include "conexao.php";
                            $User = $_SESSION["user"];
                            $query_member = "SELECT userid FROM users WHERE users='$User' LIMIT 1";
                            $result_id = mysql_query($query_member) or die (mysql_error());
                            $drow = mysql_fetch_array($result_id);
                            $your_id = $drow[0];
               
                            $query = "SELECT * FROM `p_messages` WHERE `id_user_recebe`='$your_id'";
                            $result = mysql_query($query) or die (mysql_error());
                            $rows = mysql_num_rows($result);
                            $query2 = "SELECT * FROM `p_messages` WHERE `id_user_recebe`='$your_id' AND `status_msg`='N'";
                            $result2 = mysql_query($query2) or die (mysql_error());
                            $rows_new = mysql_num_rows($result2);
                            $msgs = "($rows total|$rows_new new)";                       
                        ?>
                        <?
                            if (isset($_SESSION["logado"]) == true) {
                                echo '<ul> ';
                                echo "<li><a href=\"index.php?act=page\">Index</a><br /></li>";
                                echo "<li><a href=\"index.php?act=edit_profile&id_user=".$_SESSION["userid"]."&user=".$_SESSION["usuario"]."\">Edi Profile</a><br /></li>";
                                echo "<li>$msgs<br /></li>";
                                echo "<li><a href=\"index.php?act=inbox\">Inbox</a><br /></li>";
                                echo "<li><a href=\"index.php?act=send_message\">Send Message</a><br /></li>";
                                echo "<li><a href=\"logout.php\">Logout</a><br /></li></ul>";
                            } else {
                                echo '<form action="valida_user.php" method="post">
                                User:<br>
                                <input name="user" type="text" id="user" size="10">
                                <br>
                                Password:<br>
                                <input name="pass" type="password" id="pass" size="10"> <input type="submit" name="Submit" value="OK">
                                </form>';
                            }
                        ?>

```

i’d like you to help me to make it works in a new menu made in Flash…

Thanks

(sorry for my mistakes with english)
