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? 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? 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. 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. 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? 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. 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. 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/ 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. 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]? 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 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
Archived
This topic is now archived and is closed to further replies.