View Full Version : Help [PHP] [mySQL]
Assassinator
30-09-2007, 04:52 PM
Basicly i want it so when a certain userlevel refresh's the page a certain iFrame does a sql query.
I dont know how to do the refreshing bit though.
Here's my php i made for a certain level.
<?php if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
echo"I want it here!";} ?>
And the SQL query..
mysql_query("UPDATE users SET health='999' WHERE username='$username'");
Thanks.
Mr Macro
01-10-2007, 05:34 PM
Maybe you could put the function in the iframe, then call it from a different page.Correct me if im wrong, i think thats what you need.
Assassinator
01-10-2007, 05:37 PM
Hmm im confused.
The frame i want it in is mini.php.
Mr Macro
01-10-2007, 05:42 PM
So you want to update one iFrame when you refresh a different one.
Assassinator
01-10-2007, 05:44 PM
Nope, when you refresh the page the whole of the iframe's refresh, thats what i want.
So basicly when mini.php is refreshed.
Mr Macro
01-10-2007, 05:47 PM
Ah i see, you would have to refresh the page that holds all the iFrames.
Dentafrice,
01-10-2007, 07:41 PM
<?php
if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
echo"I want it here!";
}
?>
why are you doing:
if userlevel = 4 OR if userlevel = 4 two times?
Also why do it in an IFRAME, I don't think I am getting what you want to do?
Eccentric
01-10-2007, 07:54 PM
think it was an example? the two fours.
Assassinator
01-10-2007, 08:23 PM
<?php
if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
echo"I want it here!";
}
?>
why are you doing:
if userlevel = 4 OR if userlevel = 4 two times?
Also why do it in an IFRAME, I don't think I am getting what you want to do?
I ment to put
<?php
if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
echo"I want it here!";
}
?>
I just want it so when this frame is reloaded it does the query above if that make's sence?
I fail to see the purpose of having a iframe that refreshes periodically, bogging down the server with useless web requests. Since nothing can happen until someone makes a request somewhere then why not make the check you want to make happen when a page is requested?
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.