View Full Version : Print () function in php - multiple variables
jungalo
August 3rd, 2007, 04:35 PM
does anyone know how to pass multiple variables from say, mysql? to flash using php?
for example my php file only prints one line, not two
print "variable1=".$result1;
print "variable2=".$result2;
--- only variable1 will be parsed
does print require an array to print several values? thanks!
a_e_i_o_u
August 3rd, 2007, 04:39 PM
I think that you have to use an Array, but I'm not sure, and I can't seem to find any tutorials on it. Sorry...
:alien:
Voetsjoeba
August 3rd, 2007, 05:00 PM
Separate your variable=value pairs with a &. Do a google search on LoadVars, you'll find plenty of info.
BradLee
August 3rd, 2007, 05:01 PM
The print function doesn't automatically create a new line. You don't want one anyway.
Look at this tutorial here on kirupa it might help.
http://www.kirupa.com/developer/actionscript/flashphpxml_integration.htm (http://www.kirupa.com/forum/../developer/actionscript/flashphpxml_integration.htm)
a_e_i_o_u
August 6th, 2007, 03:28 PM
:flower: :nose:
Separate your variable=value pairs with a &. Do a google search on LoadVars, you'll find plenty of info.
this is all i've been able to come up with
$row=mysql_fetch_array($query);
print "currentcompany=".$row[company];
print "currentaddress1=".$row[address1];
thank oh so much!!!
a_e_i_o_u
August 6th, 2007, 03:37 PM
nevermind...i fingered it out anyway....!
i used:
print "currentcompany=".$row[company]."&"."currentaddress1=".$row.....etc.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.