 |
 |
Flash/MySQL
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
OK, lets see if I can explain this correctly.
I have a move clip called 101.
I have...
onClipEvent (load) {
loadVariables("you.php", this, "GET");
}
assigned to 101. Inside of 101 I have dynamic text fields with the var names of price, fee, and state.
I have a movieclip 102 that is exactly like 101. What I need to know is, how can differentiate 101 from 102 so that when the db data comes in that 101 and 102 display different info?
Also, I can't change the var names. They must stay as price, fee, and state in both movieclips.
Please give me a hand with this, it is very urgent. If you need more info please ask. Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by MallyMal:
OK, lets see if I can explain this correctly.
I have a move clip called 101.
I have...
onClipEvent (load) {
loadVariables("you.php", this, "GET");
}
assigned to 101. Inside of 101 I have dynamic text fields with the var names of price, fee, and state.
I have a movieclip 102 that is exactly like 101. What I need to know is, how can differentiate 101 from 102 so that when the db data comes in that 101 and 102 display different info?
Also, I can't change the var names. They must stay as price, fee, and state in both movieclips.
Please give me a hand with this, it is very urgent. If you need more info please ask. Thanks!
onClipEvent (load) {
loadVariables("you.php?id="+this._name, this, "GET");
}
This assumes of course that your instance name is 101, 102, etc...
Now your php script can access the GET variable 'id' and retrieve the correct data from the database.
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
My PHP looks like this is this right?
<?php
$conn = mysql_connect("localhost", "root", "");
mysql_select_db("loft588", $conn);
$sql = "SELECT * FROM units";
$result = mysql_query($sql, $conn);
while ($newArray = mysql_fetch_array($result)) {
$id = $newArray['id'];
$unit = $newArray['unit'];
$floor = $newArray['floor'];
$price = $newArray['price'];
$sqft = $newArray['sqft'];
$fee = $newArray['fee'];
$state = $newArray['state'];
echo ("&id=$id&unit=$unit&floor=$floor& price=$price&sqft=$sqft&fee=$fee&state =$state");
}
?>
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
Is there anyway I can IM you? I have battling with this for days.
Also, in my case what should +this._name be?
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

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