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
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)