Q695 Posted March 30, 2009 Share Posted March 30, 2009 In a page script I am running there's a function that is called before uploading data, then again after the data is updated, how do I call the function to run completely again? Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/ Share on other sites More sharing options...
corbin Posted March 30, 2009 Share Posted March 30, 2009 Huh? Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796566 Share on other sites More sharing options...
Q695 Posted March 30, 2009 Author Share Posted March 30, 2009 I need to call function user_info($id, $con){ $sql="SELECT * FROM players WHERE id='$id';"; $result=@mysql_query($sql, $con) or die(death($sql)); //get the results $u_row=mysql_fetch_array($result); return $u_row; } at the start of the page (updating data), then again after the data is updated for a game. Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796572 Share on other sites More sharing options...
corbin Posted March 30, 2009 Share Posted March 30, 2009 So... I don't get what your problem is.... user_info(); user_info(); Not hard to call a function twice. Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796576 Share on other sites More sharing options...
Q695 Posted March 30, 2009 Author Share Posted March 30, 2009 for some reason it's not working, could it be from calling a global within a function? Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796579 Share on other sites More sharing options...
corbin Posted March 30, 2009 Share Posted March 30, 2009 I don't see you referencing a global within that function. Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796582 Share on other sites More sharing options...
Q695 Posted March 30, 2009 Author Share Posted March 30, 2009 I do with lower functions. Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796590 Share on other sites More sharing options...
corbin Posted March 30, 2009 Share Posted March 30, 2009 So uhh... Do you get an error, or what exactly doesn't work/ Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-796598 Share on other sites More sharing options...
Q695 Posted March 30, 2009 Author Share Posted March 30, 2009 it was a symantic error. Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-797060 Share on other sites More sharing options...
Maq Posted March 30, 2009 Share Posted March 30, 2009 it was a symantic error. So... problem [sOLVED]? Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-797061 Share on other sites More sharing options...
Q695 Posted March 31, 2009 Author Share Posted March 31, 2009 thanks maq Quote Link to comment https://forums.phpfreaks.com/topic/151685-solved-calling-a-function-again-in-the-same-page/#findComment-797448 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.