I did a View->Source on the generated code and got this for the Friday Feb 28 entry:
<table width='95%'>
    <tr bgColor=#990000><td>
                   <center>
          <font face='arial' size='3' color='ffffff'>Friday February 28th 8 AM to Noon
          </td></tr>
          
<tr><td><center>John</tr></td><tr><td><center></tr></td><tr><td><center></tr></td>
 </table>

Look at the last <tr><TD>... line.  Fix that, and your problems may go away.
----- Original Message ----- 
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 7:24 AM
Subject: [PHP] why won't this work?


Why won't this work? I have a form that people enter in a time to volunteer,
when the submit it, I call the same page and want the time to then show on
the page but I have to refresh it to see the time and sometimes it just
doesn't show up.  It is like the page loads before all the sql statements
are run because if I print them and run them in mysql, I get results.

the test page is here...I know it is ugly...
http:\\peloke.webhop.org\mom\bikers.php

Thanks,
Eddie


<?
if ($bikers){$SQL = "insert into bbreak(name,time) values ('$name','$time')
";
             $result = mysql_db_query($db,"$SQL",$connection);
            }


?>
<center>
    Please sign up for the hours that you can work.  We need a minimum of 3
men there for each shift. They will be doing the tire pressure checks and
any other minor maintenance that might be required. Ladies are also urged to
come as we are hoping there will be women bikers that we can minister to in
whatever way is needed.  Anyone can come anytime but we need to have enough
commitments that we know the break will be staffed adequately every shift.
    We cannot give away anything that would compete with the drinks and
snacks that are sold at the rest stop but we can give away ice water and
possibly coffee. Thanks for your help!
 <br>
 <br>
 SIGN Up
 <FORM name="bikers" action="bikers.php" method=post>
 Name <input type='text' name='name' maxlength='25'>
Time <SELECT name="time">
                    <OPTION value=288 selected>Friday, February 28, 8
a.m.-12 p.m.</OPTION>
                    <OPTION value=2812>Friday, February 28, 12 p.m.-4
p.m.</OPTION>
                    <OPTION value=284>Friday, February 28, 4 p.m.-8
p.m.</OPTION>
                    <OPTION value=18>Saturday, March 1, 8 a.m.-12
p.m.</OPTION>
                    <OPTION value=112>Saturday, March 1, 12 p.m.-4
p.m.</OPTION>
                    <OPTION value=14>Saturday, March 1, 4 p.m.-8
p.m.</OPTION>
                    <OPTION value=28>Sunday, March 2, 8 a.m.-12
p.m.</OPTION>
                    <OPTION value=212>Sunday, March 2, 12 p.m.-4
p.m.</OPTION>
                    <OPTION value=24>Sunday, March 2, 4 p.m.-8 p.m.</OPTION>
                    </SELECT>
<INPUT type=submit value=SignUp name=bikers>
<br>
<br>
<center>

<table width='95%'>
    <tr bgColor=#990000><td>
         <?
             $SQL = "select * from bbreak where time=288 ";
             $result = mysql_db_query($db,"$SQL",$connection);
             $myrow = mysql_fetch_array($result);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Friday February 28th 8
AM to Noon
          </td></tr>
          <? while ($myrow = mysql_fetch_array($result)){
             print "<tr><td><center>";
             print $myrow["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>
<table width='95%'>
    <tr bgColor=#999999><td>
         <?
             $SQL1 = "select * from bbreak where time=2812 ";
             $result1 = mysql_db_query($db,"$SQL1",$connection);
             $myrow1 = mysql_fetch_array($result1);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Friday February 28th 12
p.m  to 4 p.m.
          </td></tr>
          <? while ($myrow1 = mysql_fetch_array($result1)){
             print "<tr><td><center>";
             print $myrow1["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>

 <table width='95%'>
    <tr bgColor=#000066><td>
         <?
             $SQL2 = "select * from bbreak where time=284";
             $result2 = mysql_db_query($db,"$SQL2",$connection);
             $myrow2 = mysql_fetch_array($result2);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Friday February 28th 4
p.m. to 8 p.m.
          </td></tr>
          <? while ($myrow2 = mysql_fetch_array($result2)){
             print "<tr><td><center>";
             print $myrow2["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>

<table width='95%'>
    <tr bgColor=#990000><td>
         <?
             $SQL3 = "select * from bbreak where time=18";
             $result3 = mysql_db_query($db,"$SQL3",$connection);
             $myrow3 = mysql_fetch_array($result3);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Saturday March 1st 8 AM
to Noon
          </td></tr>
          <? while ($myrow3 = mysql_fetch_array($result3)){
             print "<tr><td><center>";
             print $myrow3["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>
<table width='95%'>
    <tr bgColor=#999999><td>
         <?
             $SQL4 = "select * from bbreak where time=112";
             $result4 = mysql_db_query($db,"$SQL4",$connection);
             $myrow4 = mysql_fetch_array($result4);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Saturday March 1st 12
p.m  to 4 p.m.
          </td></tr>
          <? while ($myrow4 = mysql_fetch_array($result4)){
             print "<tr><td><center>";
             print $myrow4["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>

 <table width='95%'>
    <tr bgColor=#000066><td>
         <?
             $SQL5 = "select * from bbreak where time=14";
             $result5 = mysql_db_query($db,"$SQL5",$connection);
             $myrow5 = mysql_fetch_array($result5);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Saturday March 1st 4
p.m. to 8 p.m.
          </td></tr>
          <? while ($myrow5 = mysql_fetch_array($result5)){
             print "<tr><td><center>";
             print $myrow5["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>
<table width='95%'>
    <tr bgColor=#990000><td>
         <?
             $SQL6 = "select * from bbreak where time=28";
             $result6 = mysql_db_query($db,"$SQL6",$connection);
             $myrow6 = mysql_fetch_array($result6);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Sunday March 2nd 8 AM
to Noon
          </td></tr>
          <? while ($myrow6 = mysql_fetch_array($result6)){
             print "<tr><td><center>";
             print $myrow6["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>
<table width='95%'>
    <tr bgColor=#999999><td>
         <?
             $SQL7 = "select * from bbreak where time=212";
             $result7 = mysql_db_query($db,"$SQL7",$connection);
             $myrow7 = mysql_fetch_array($result7);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Sunday March 2nd 12 p.m
to 4 p.m.
          </td></tr>
          <? while ($myrow7 = mysql_fetch_array($result7)){
             print "<tr><td><center>";
             print $myrow7["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>

 <table width='95%'>
    <tr bgColor=#000066><td>
         <?
             $SQL8 = "select * from bbreak where time=24 ";
             $result8 = mysql_db_query($db,"$SQL8",$connection);
             $myrow8 = mysql_fetch_array($result8);
         ?>
          <center>
          <font face='arial' size='3' color='ffffff'>Sunday March 2nd 4 p.m.
to 8 p.m.
          </td></tr>
          <? while ($myrow8 = mysql_fetch_array($result8)){
             print "<tr><td><center>";
             print $myrow8["name"];
             print "</tr></td>";
                                                         }
          ?>

 </table>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to