tlhoward Posted July 10, 2010 Share Posted July 10, 2010 Ok something is wrong with my code I cant for the life of me figure out how to get the variable first name to pass through to my flash file. I have loaded the php into flash I can pull the date but for the life of me i cant figure out how to make the first name and last name into vars to pull inside the flash file some help would be greatly appreciated. <?php include("dbconnect.php"); include("includes/functions.php"); $query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)) { $myfirstname = $clientsdetails["firstname"]; $date = fromMySQLDate($date); print("&date=$date&annon=$myfirstname"); } ?> 0 Quote Link to comment Share on other sites More sharing options...
tlhoward Posted July 10, 2010 Author Share Posted July 10, 2010 Sorry correct code I am trying <?php include("dbconnect.php"); include("includes/functions.php"); $query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)) { $id = $data["id"]; $date = $data["date"]; $title = $data["title"]; $announcement = $data["announcement"]; $clientdetails = $data["firstname"]; $date = fromMySQLDate($date); print("&date=$date&annon=$announcement&title=$title&id=$id&firstname=$firstname"); } ?> 0 Quote Link to comment Share on other sites More sharing options...
tlhoward Posted July 10, 2010 Author Share Posted July 10, 2010 ok update im using this code but for some reason i dont even have to login and it shows the info any help please would be appreciated. <?php include("dbconnect.php"); include("includes/functions.php"); include("includes/clientareafunctions.php"); $query = "SELECT DISTINCT (tblclients.id) as ID, firstname, lastname , companyname, (SELECT sum( credit ) FROM tblinvoices WHERE userid = tblclients.id) as usedinvoices ,sum( tblclients.credit ) as unused FROM tblclients LEFT JOIN tblcredit ON tblclients.id = tblcredit.clientid GROUP BY id, firstname, lastname, companyname"; $result=mysql_query($query); $data = mysql_fetch_array($result); while ($data = mysql_fetch_assoc($result)) { $clientname = $data['firstname'] . " " . $data['lastname']; $companyname = $data['companyname']; print("&firstname=$clientname&companyname=$companyname&finished=1"); } ?> 0 Quote Link to comment Share on other sites More sharing options...
tlhoward Posted July 12, 2010 Author Share Posted July 12, 2010 Ok figured it out myself please close this thread if you like 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.