northernmics Posted April 8, 2007 Share Posted April 8, 2007 Flash picks up the first result variable even when php skips and inserts data. When info is is successfully inserted Flash should only see the second echo.... Any Help would be greatly appreciated, I've been bangin my head on this for two days now. Cheers $SQLuser = "SELECT * FROM users WHERE username ='".$username."'"; $rs = mysql_query($SQLuser); $numRows = mysql_num_rows($rs); if($numRows > 0){ echo '&result=userExists'; exit();//abort php script } //--------insert into database------------------------------// $insertSQL = "INSERT INTO users(ID, username, password, bio, pic) VALUES ('NULL', '$username', '$password', '', '')"; $rs = mysql_query($insertSQL); echo '&result=success'; Link to comment https://forums.phpfreaks.com/topic/46149-php-echo-variables-into-flash/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.