ag3nt42 Posted June 13, 2008 Share Posted June 13, 2008 hello again all, I'm trying to pull data from my database and plug the result into a variable but it doesn't seem to want me to do it.. here my snatching code: $AdminSql = "SELECT [username] FROM [".$tblpre."users] WHERE Ident='1'"; $result = mssql_query($AdminSql)or die(mssql_error()); while($row = mssql_fetch_row($result)) { $row[0]=$Zadmin; } here my plugging code: echo(" <input type='text' value='".$Zadmin."' /> "); keep in mind that I'm echoing out ALL of my HTML in one huge echo. I can not figure out why it won't let me plug that variable in. results in blank nothing.. no errors Quote Link to comment https://forums.phpfreaks.com/topic/110098-solved-result-query-to-pluggable-variable/ Share on other sites More sharing options...
wildteen88 Posted June 13, 2008 Share Posted June 13, 2008 Your variables are the wrong way around $row[0]=$Zadmin; It should be $Zadmin = $row[0]; Quote Link to comment https://forums.phpfreaks.com/topic/110098-solved-result-query-to-pluggable-variable/#findComment-565037 Share on other sites More sharing options...
ag3nt42 Posted June 13, 2008 Author Share Posted June 13, 2008 omfg lol *palm*face* thanks man lol ps. its been a loong day i'ma chalk that one up to the heat Quote Link to comment https://forums.phpfreaks.com/topic/110098-solved-result-query-to-pluggable-variable/#findComment-565043 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.