Jump to content

Submit refresh Problem


pick the fights

Recommended Posts

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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'];

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.