pick the fights Posted November 18, 2011 Share Posted November 18, 2011 Hello All, i could really use some coding help. I have a form that users use and submit. i'd like the page to refresh and show the new data when submit button is pressed however, right now it only shows when i manually refresh the page. here is the code, can someone please tell me what to add or take away to make it work. thanks <iframe src="http://pickthefights.com/smack/?id=<?php echo $idvar; ?>&smack=yes" width="300" height="100">;Your browser does not support iframes.</iframe> <form name="smack" method="post" action="http://pickthefights.com/smack-reg/" target="_blank" name="smack" > <input type="hidden" value="<?php echo $_SESSION[uid] ?>" name="session" > <input type="hidden" value="<?php echo $idvar ?>" name="idvar" > Smack Talk : <input type="text" name="comment" > <input value="Smack" type="submit" name="smack"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/251392-submit-refresh-problem/ Share on other sites More sharing options...
Psycho Posted November 18, 2011 Share Posted November 18, 2011 Well, you have provided absolutely no details of how the content gets displayed currently. You say the submitted content gets displayed if you refresh, but there is nothing in that code that would display any variable content (whether submitted or manually refreshed). The only variable content I see is the session variable and the $idvar, which are both used to populate hidden fields. Quote Link to comment https://forums.phpfreaks.com/topic/251392-submit-refresh-problem/#findComment-1289363 Share on other sites More sharing options...
pick the fights Posted November 18, 2011 Author Share Posted November 18, 2011 does this help at all $_SESSION[uid]=$uid; $pool_id = mysql_insert_id(); $idvar = $_REQUEST["id"]; $smackvar = $_REQUEST["smack"]; $allvar = $_REQUEST["all"]; $event_id = $_POST['event_id']; $fight_id = $_POST['fight_id']; $fighter = $_POST['fighter']; $game_type = $_POST['game_type']; $end_event = $_POST['end_event']; $game_type = $_POST['game_type']; $roundpicks = $_POST['roundpicks']; $methodpicks = $_POST['methodpicks']; Quote Link to comment https://forums.phpfreaks.com/topic/251392-submit-refresh-problem/#findComment-1289365 Share on other sites More sharing options...
Psycho Posted November 18, 2011 Share Posted November 18, 2011 No. Again, you say that when you refresh the page that the submitted content is displayed. Please post the code that actually displays the content. Quote Link to comment https://forums.phpfreaks.com/topic/251392-submit-refresh-problem/#findComment-1289378 Share on other sites More sharing options...
pick the fights Posted November 18, 2011 Author Share Posted November 18, 2011 Sorry, i'm not good enough for know where that is. i didn't write the code. i can give you the whole php file, but it's pretty big. if you feel like looking at it, it's attached now. any help would be appreciated but i understand if it's too big to go through. thanks, [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/251392-submit-refresh-problem/#findComment-1289386 Share on other sites More sharing options...
Psycho Posted November 18, 2011 Share Posted November 18, 2011 Yeah, that file is 1,300+ lines of code! Whoever wrote that should be shot. Sorry, I'd like to help but I'm not going to spend a lot of time trying to review a 1,300+ script that someone with questionable skills wrote. But, I did do a quick search and found that there is nothing in that code to process a "comment" from POST data. The form is POSTing to the page at http://pickthefights.com/smack-reg/ I assume it is a page named index.php or something similar. You could possibly put in a header() redirect to pool.php at the end of that script so it will redirect back to the script above to show the content. Really not sure without understanding all the logic. Quote Link to comment https://forums.phpfreaks.com/topic/251392-submit-refresh-problem/#findComment-1289405 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.