05-09-2003, 04:36 PM
|
#1
|
|
Registered User
Join Date: Jun 2001
Posts: 7
|
Getting Unwanted VARS form Java adds : (
Hi,
My host first of all is tripod lycos and is free. It is the only host that I could find that has support for PHP/SQL and is free. (If any one knows of a better one please let me know)
Ok on to the problem.
I am loading Vars using sendAndLoad to and from a PHP script on lycos site (Same dir of SWF) so when I load some vars into flash I get the first Var then a bunch of crap form Lycos adds Javascript stuff,
Here is a sample.
Sample loadVars text
It takes some time to load there is no preloader sorry, just an example.
Here is the FLA
FLA sample
I am receiveing dates from the PHP. I get the first date but then it gives me this stuff.
Any one have any ideas.
Last edited by Andrue; 05-09-2003 at 04:39 PM.
|
|
|
05-09-2003, 09:53 PM
|
#2
|
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
|
Howdy... What is your monthinfo.php script look like???
|
|
|
05-10-2003, 01:52 AM
|
#3
|
|
Registered User
Join Date: Jun 2001
Posts: 7
|
Hi, Thank you....!
PHP Code:
<?php
$hostname="";
$username="";
$password="";
$dbname="";
$connection = @MYSQL_CONNECT($hostname,$username, $password) OR DIE ("<html>Unable to connect to database. <a href=http://members.lycos.co.uk/robot4hire/>Click here to return.</a><html>");
$db = @mysql_select_db($dbname, $connection) or DIE ("<html>Unable to query to database. <a href=http://members.lycos.co.uk/robot4hire/>Click here to return.</a><html>");
include "functions.php";
#$month_id = "04/03";
$totaldates = "";
$i = 0;
if ($month_id != "") {
list($md,$yd) = explode("/", $month_id);
$query = "select * from sqn_db";
$result = query($query, $connection);
while ($row = mysql_fetch_array($result)) {
$mdate = $row['Date'];
$mid = $row['id'];
list($m,$d,$y) = explode("/", $mdate);
if ($m == $md && $y == $yd) {
$totaldates[] = $d;
#$totaldates .= "&day$i=$d";
$i++;
}
}
for ($i = 0; $i < count($totaldates); ++$i) {
#$output .= "&arrayVariable$i=" . urlencode($arrayName[$i]);
$totaldates .= "&day$i=" . urlencode($totaldates[$i]);
}
}
echo $totaldates;
#echo "totaldates=".$totaldates;
#print_r($totaldates);
?>
|
|
|
05-10-2003, 02:23 AM
|
#4
|
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
|
Um... I'd ask you to post the PHP script so that I could test it on my machine and on my Lycos account... But I see that you are running the MySQL query on that, and I have no way to test it on my end...
I have typed this url on the web browser, http://members.lycos.co.uk/robot4hire/monthinfo.php, and I get nothinig... Why is the echo() function not working??? Hm... Aren't I supposed to see the literals coming out when I type that url on the browser???
|
|
|
05-10-2003, 03:20 AM
|
#5
|
|
Registered User
Join Date: May 2003
Posts: 7
|
Its me Andrue
I couldn't log in as Andrue for some reason, but it is me. Thanks for checking this out.
The PHP script needs a var sent to it to send one back, It needs the var month_id wich is just the month like "05" then it will send back the datys that have events. like so: 10,17,23,ect... but it sends first one then instead of the rest I get those java scripts : (
Have you had this problem before? Any idea as to why?
|
|
|
05-10-2003, 02:08 PM
|
#6
|
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
|
Hm... Now, I have typed this...
http://members.lycos.co.uk/robot4hir...hp?month_id=05
and I get this...
&day0=
Had I have this problem before??? Nope...
You know what??? Save that PHP file, and have PHP echo this directly and see if the same thing occurs... In other words, do not go through the MySQL database... Just do the echo no matter what argument you get... and see if it still does that...
echo("&day0=10");
Probably there isn't much thing I can help you with cuz my knowledge is pretty much limited...
Oh... Email or PM Jesse to remove unnecessary ID or to resolve the problem...
|
|
|
05-10-2003, 05:03 PM
|
#7
|
|
Registered User
Join Date: May 2003
Posts: 7
|
Ooops sorry
There is more to that VAR : month_id=04/03
the Month and year are sent. : )
http://members.lycos.co.uk/robot4hir...month_id=04/03 this should return
04
05
12
13
19
The PHP is not echoing all dates my bad, But this stil shouldn't be loading the java VARs from the host page : (
. It does it to working scripts that I hve done before. I guess I just need to fork over some $$ for a good host without adds. Thank you for all your help
|
|
|
05-10-2003, 11:11 PM
|
#8
|
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
|
Better server??? I agree with you...
However, the script didn't return what you just said... Hm...
I tried... http://members.lycos.co.uk/robot4hi...?month_id=04/03
and I got...
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 09:43 AM.
///
|
|