Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadVars problem!

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
I have a problem with the loadVars.

i am extracting the data out of a MySQL db via php.

my code:

Code:
<?php

include "../../gr/config.php";

$q = mysql_query("SELECT title, news, subDate FROM gr_news WHERE view = 'yes'") or die("news=".mysql_error());
	while(list($t,$n,$sd) = mysql_fetch_row($q)){
		echo "news=<b>$t</b><br>-$sd<br><br>$n<br><br>";
	}

?>

that loads fine, but if i include <font color=#99FF00></font> it won't display on the page?

Code:
<?php

include "../../gr/config.php";

$q = mysql_query("SELECT title, news, subDate FROM gr_news WHERE view = 'yes'") or die("news=".mysql_error());
	while(list($t,$n,$sd) = mysql_fetch_row($q)){
		echo "news=<font color=#99FF00><b>$t</b><br>-$sd</font><br><br>$n<br><br>";
	}

?>

i have set the HTML tab to true!

any ideas?

Regards,

Martin

Gaming Help And Info:
 
Just a guess but try adding the single quotes:

Code:
<font color='#99FF00'>abc</font>

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
yea that worked great ta. now another problem.

when its loaded into the textbox, the top one is ok but then the rest say news=The title etc

e.g.

Welcome back to GameRevolt
-31/05/2004

Welcome back to GameRevolt, we are finally here again after 2 years of waiting with a new, better design, we are currently building the site but we will let you know when more features become available

news=Euro 2004 << why does it say news= ??
-08/06/2004

any ideas?

Regards,

Martin

Gaming Help And Info:
 
Which part of that is coming out of the php page?

Wow JT that almost looked like you knew what you were doing!
 
this is coming from the php page:

Welcome back to GameRevolt
-31/05/2004

Welcome back to GameRevolt, we are finally here again after 2 years of waiting with a new, better design, we are currently building the site but we will let you know when more features become available

news=Euro 2004 << why does it say news= ??
-08/06/2004


Regards,

Martin

Gaming Help And Info:
 
Can you post your Flash code? It looks like you might be sending 2 php variables to the same flash text field. That is not a problem if you are using instanceName.text to populate the text field but will give you fits if you are using the var property.

Wow JT that almost looked like you knew what you were doing!
 
Code:
/*******************************
loading text
*******************************/
lv2 = new LoadVars();
lv2.onLoad = function() {
	_root.home.html = true;
	_root.home.htmlText = lv2.news;
};
lv2.sendAndLoad("newstest.php", lv2, "GET");

stop();

Regards,

Martin

Gaming Help And Info:
 
and another thing, the code is in a home.swf which gets loaded into the main movie!

if i load the home.swf without the loadVars(); i dont get any errors, however if i do i get:

*** Security Sandbox Violation ***
SecurityDomain ' tried to access incompatible context 'file:///C|/Inetpub/
any ideas on that??


Regards,

Martin

Gaming Help And Info:
 
Try putting an & in front of news= in the php line. So it would read:

Code:
while(list($t,$n,$sd) = mysql_fetch_row($q)){
        echo "&news=<font color=#99FF00><b>$t</b><br>-...

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top