Help with php blank page?

前端 未结 10 620
一向
一向 2021-01-15 23:46

I run a fantasy basketball league. My php website/sql database is designed to let the person running the team do everything through the website - they can waive a player, an

相关标签:
10条回答
  • 2021-01-16 00:13

    Added comments to some of the above responses. Please try to dumb down for me as much as possible - I'm extremely new to this. I can't figure out why it would suddenly stop working, though, when I've made no changes at all to the code.

    0 讨论(0)
  • 2021-01-16 00:16

    If you made no changes to any files and it just "broke" then that would indicate that either your webhost went thru a configuration change, your database got hosed somehow, or that someone else may've changed something.

    To help spot the culprit, after every one of these

    if{
    else{
    while{
    

    or/and after every few statements (statements end with a semicolon ;) add this to the next line

    print "<br> made it to this label: some_unique_label_name_here";
    

    Where you should replace the label each time to help you trace the code. This will be your first step into debugging the script to figure out how far the code execution is reaching.

    0 讨论(0)
  • 2021-01-16 00:16

    So an update...nothing. lol

    If you review this code:

    $k=0;
    

    $Salary=0;

    print "
    made it to this label: some_unique_label_name_here";

    while ($k < $Fields_Counter)

    {

    $Type=$_POST['type'.$k];

    $Salary=$_POST['cy'.$k];

    $Index=$_POST['index'.$k];

    $Check=$_POST['check'.$k];

    $queryn="SELECT * FROM nuke_iblplyr WHERE pid = '$Index' "; $resultn=mysql_query($queryn);

    $playername=mysql_result($resultn,0,"name");

    $players_team=mysql_result($resultn,0,"tid");

    If I put the print statement below while, the page goes blank and it doesn't show up. If the print statement is before while, the statement shows up but there's no action made on the page. The end result is that when running this page, the player selected on the previous page should be removed from Free Agents, added to the user's team, and a story should be posted on the front page announcing it. Obviously none of those are happening here.

    0 讨论(0)
  • 2021-01-16 00:20

    After enabling error reporting, make sure to put in else statements that correspond with all of your if-statements so you can determine if those statements are being triggered or not. Throw in some echos.

    0 讨论(0)
提交回复
热议问题