Jump to content

ICubis2

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ICubis2's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. S$%t - I apologize. This problem is being caused by the same HTML code that gave me the other problem. Somehow I reverted back to that other code without the fix. (All those lines of code commented out.) Making the fix again did take care of the problem. Again, sorry for wasting your time on this one.
  2. Here's the section of HTML for the page the presents the results table: <div id="e16" style="position:absolute;left:177;top:147;width:418;height:573;"><script type="text/javascript"> function checkForm16() { return true; } </script> <?php echo "<form action='other_flip.php' method='post'>"; echo "<table border='1'>"; echo "<tr><th colspan='2'>Your competition results.</th></tr>"; echo "<tr> <th bgcolor ='#FFFF00'>Winning Team</th> <th>2nd Place Team</th></tr>"; echo "<tr> <th bgcolor ='#FFFF00'>".$_SESSION['win_num']."</th> <th>".$_SESSION['2nd_num']."</th></tr>"; $count =1; while ($count <= $_SESSION['rows']){ echo "<tr><td valign ='top'>"; echo "<tr><td bgcolor ='#FFFF00'>".$_SESSION['winner'][$count]."</td><td>".$_SESSION['second'][$count]."</td></tr>"; echo "</td><td valign ='top'>"; echo "</td></tr>"; $count++; } echo "<input type='submit' value='What if - opposite flip?'>"; echo "</table>"; echo "</form>"; //reset button echo "<form action='kind-comp_input.php' method='post'>"; echo "<input type='submit' value='Start Over'>"; echo "</form>"; ?> <!--$end exclude$--> </div>
  3. The user selects a radio button in the beginning of the process to set the coin flip - either heads or tails. The initial results table show the result correctly. Also the first time the swap coin flip SUBMIT button is activated it works fine and shows the opposite. The problem is on the next activation of this same button. $_SESSION['Coin_Flip'] becomes the same thing (either heads or tails) because the script is being run through twice. Again, EI works correctly and only runs through the script once, so the user can toggle back and forth between the heads and tails results tables. FF and Safari start double executing the script on on each activation of the button from the 2nd time onward.
  4. I have a problem that is particular to the FF and Safari browsers. I do not see the problem in IE. Again, I am very new to php programming - no formal training - just a hacker. I have a web page that presents a form with a results table and a SUBMIT button. Each time the button is selected I want to present one of two different tables of results. Everything works fine the first time I hit the SUBMIT button. The page updates and shows the second table. But on the next SUBMIT the script that swaps things around is executed twice in FF and Safari vs. one time like in EI. This results in the same result table being displayed over and over vs. the two switching back and forth. Any idea what could be going wrong in these two browsers? Here's my swap script: <?php session_start(); // This script reverses the coin flip to see what would happen the other way if ($_SESSION['Coin_Flip'] == "heads") { //switch to tails $_SESSION['Coin_Flip'] = "tails"; include ('tails_algo.php'); } elseif ($_SESSION['Coin_Flip'] == "tails") { $_SESSION['Coin_Flip'] = "heads"; include ('heads_algo.php'); } include ('kind-comp_result.php'); ?>
  5. I already did and by commenting each of them out is what fixed my session variable problem. When I put just one back in then I lose the session variables again. I saw no formatting issues removing these lines of code. I was hoping someone much more knowledgeable than I would recognize what might be going on, but I'm just happy I can move on past this problem issue now. Thanks all.
  6. The presence of this code in itself does not kill my session variables. I can echo them after the nav bar code is executed and they are fine. They do not get destroyed until the SUBMIT button of this displayed page is activated. This is the action that then destroys the session variables. I believe everything not dependent on these variables is fine.
  7. OK, I have found the line(s) of code that are killing the session variables in my code. It is in the section that builds my navigation menu. Again, understand that I did not explicitly write this code - Yahoo! Sitebuilder did the writing. Each menu option within the table is written like this: <tr><td> <a href="index.html"> <img name="i5" src="sitebuilder/images/navbar-0-inactive-39952.png" border="0" width="163" height="22" alt=""/> </a></td></tr> <tr><td height="17" width="0"> <!--<img src="" height="17" width="1" alt="">--> </td></tr> The line that is commented out is the line causing the problem. I'm no expert on HTML. Anyone see what parameters within this line might be causing the problem?
  8. Oh, it is not solved yet. I will need to study your solution a little closer to understand it all. Then to try to implement it into my own app. Thanks...
  9. BlueSkyIS, That is the syntax I was looking for. Thank you. And I with this code I can harvest the inputs in a while loop that is based on the random number the user inputs to generate the number of different participants: $temp = $_SESSION['Num_Part']; $count = 0; while ($count <= $temp){ $temp3[$count]=$_POST['Participant_P'][$count]; $temp5[$count]=$_POST['Result_P'][$count]; $count++; } Many thanks.
  10. I hear you and may very well need to invest the time and effort into this - as I'm wasting too much time here. BTW - Yahoo! tech support tells me the php is working fine and the errors are being dumped to that file now. I ran my script and I'm seeing no new messages dumped there. So can I assume my script is not creating any errors? Something else must be killing my session variables???
  11. It's the file I posted previously. Also I'm on with Yahoo! tech support and they are telling me that there is php error reporting. They send all error messages to a scripts.log file in a log folder. That folder did not exist, so they are doing some php testing on my account now. Hopefully I will be able to access error messages for you soon.
  12. Yahoo! has error_reporting: no value and display_errors: off
  13. I have isolated the problem to a specific action. When the user selects a SUBMIT button from a 2nd form the session variables are lost then. They are there while the form page is created. They are there if I skip creating this page. The same file I use to test whether the variables are there or not works fine if I skip this file or call it at the end of this file - meaning the session variables are there and OK. But if I call this file from the action of the SUBMIT then the session variables are gone. Does this point to anything specific?
  14. I have isolated the problem to a single file. I'm now trying to associate the code that is causing the problem. Stay tuned...
  15. Thank you for your reply. I thought I understood what you were saying but I cannot get it to work. First, re naming input boxes... You say to name them all as one array name leaving the argument blank. Does php automatically assign and increment the argument with each subsequent input box? So I will have textboxes named: Participant_P[0] Participant_P[1] Participant_P[2] etc etc Then in my routine that harvests the user inputs from these textboxes... I'm confused still about how to access each array value. Is it $_POST['Participant_P[1]'] or $_POST['Participant_P1']? I tried both ways and neither seem to work. Thanks for your time.
×
×
  • 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.