# Php wont change variable... help!

**URL:** <https://forum.kirupa.com/t/php-wont-change-variable-help/210290>\
**Category:** Uncategorized\
**Created:** [December 17, 2006, 10:43am UTC](https://forum.kirupa.com/t/php-wont-change-variable-help/210290 "2006-12-17T10:43:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![omnislant](https://avatars.discourse-cdn.com/v4/letter/o/a88e57/32.png) [@omnislant](https://forum.kirupa.com/u/omnislant)\
**Post date:** [December 17, 2006, 10:43am UTC](https://forum.kirupa.com/t/php-wont-change-variable-help/210290/1 "2006-12-17T10:43:28Z")

</div>

here’s the deal… this has frustrated the hell out of me for two days and i’ve searched the forums, google, etc, can’t figure it out… so help, please!!

i have a very simple two frame flash file, frame one:

text input box, Var: memUN  
and a login button, with the following code:

on (release) {  
gotoAndStop(2);  
loadVariablesNum (“path to my flie/login.php?memUN=”+memUN, “0”);  
}

and frame two:  
dynamic text box, Var: memID  
dynamic text box, Var: Status

i have a database with a table, “users”, structured as follows:

memID memUN memPW memEMAIL memAGE  
1 admin password email age

then i have the login.php:

\<?php  
mysql\_connect(‘mySQL’, ‘username’, ‘password’);  
@mysql\_select\_db(“mydatabase”);

$query = “SELECT memID FROM users WHERE memUN = ‘$memUN’”;  
$result = mysql\_query($query);  
$numR = mysql\_num\_rows($result);  
if ($numR == 1) {  
_ **print “Status=logged in&memID=$memID”;** _  
}  
else {  
print “Status=Failure - Username Not Found”;  
}

?\>

what happens when i enter “admin” in memUN and click the button is the Status box changes to “logged in”, but the memID does not change to “1”. that’s all i want. after i can figure out that, everything will come easily, it’s just this one little part that’s stumping me… i put the line that’s the trouble (i think) in bold italics, can somebody please show me how to load the variable memID into flash???

thanks in advance

-omnislant
