Well the problem is this I am making a simple query with a where in php, and throw some more with this type of syntax and I have done well, especially in the logging and inserting data, the problem is this. Working with three javascript and iframes when loguearme control a variable of the class php iframe number 0 because that never moves and always store that variable code here.
<Script>
window.parent.frames [2] .location = "../inicio.php";
window.parent.frames [0] .location = "../menu2.php?nick=<?php echo $ name;?>";
</ Script>
There send my php variable my number iframe 0, well then now print it and that if in that place, then in my class profile, I need that variable because depending on the nick of user profile information will be displayed and this is the code
$ Nick = "<script> document.write (window.parent.frames [0] .prueba) </ script>";
echo $ nick;
$ Sql = "SELECT * FROM users WHERE nick = '$ nick'";
$ Result = mysqli_query ($ conn, $ sql);
if (mysqli_num_rows ($ result)> 0) {
// Output data of each row
while ($ row = mysqli_fetch_assoc ($ result)) {
echo "nick". $ Row [ "nick"]. "<br>";
}
}
Then as you can see I do a cast within the nick variable in the code above and I print the variable depending on the user income, that means that brings me what I require, but when you put the variable $ nick within my query php does not bring me any record, but if I do it through the id, if I tare the row that I need or even if I put the nick directly brings back row, my problem is that putting the variable that stores the user income through iframe number zero, not bring me any mistakes or anything just stays at zero. any way to fix this slight error, in advance thanks for reading the Post.