Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2005, 09:15 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache PHP problem

Hi. I think I sent this one in the wrong forum. So I am trying this one.

I have a Apache, PHP problem. I bought a book
"Beginning PHP, Apache, MySQL Web development."
I have been using the code-examples from the book and modified them, so the program will work the way I need it to. I am making a web site where employees may register the hours they have worked. This makes some of my pages containing pretty many form objects,textfields. When I am testing my file, it wont upload 100%. The page will only upload 100% when I have "refreshed" (F5 button in IE) the site many times. This causes a bit frustration, if you now what I mean. The place where it stops are different for each time, and it does not stop in a PHP tag. I tested that. It suddenly stops in the html code. Can it be a size limit in Apache? Hope someone out there can help me.
I am using:
Apache HTTP Server 2.0.52
PHP version 4.3.9 -Win 32
MySQL

To make it easier I can send my files to your e-mail adresses, when you apply.

Cheers
Kenneth Fr?iland
Norway
PS: Please help me

 
Old January 22nd, 2005, 11:17 AM
Authorized User
 
Join Date: Jan 2005
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default

run this in a test page,

<?php
phpinfo();

?>

If it shows a page full of names and values, then your server setup is correct.
Which means, you have got some issues with your coding, so post them here and we'll take a look.

If you don't see anything on that test page with phpinfo, you need to work on your apache/php installation.

 
Old January 22nd, 2005, 02:12 PM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello, thanks for replying.
This is the result when I did what you wrote(Gotaka4):

PHP Logo
PHP Version 4.3.9

System Windows NT KENNETH-3EZ1JDP 5.1 build 2600
Build Date Sep 21 2004 14:03:10
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

PHP Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting no value no value
expose_php On On
extension_dir c:\php4 c:\php4
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .;c:\php4\pear .;c:\php4\pear
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time -1 -1
open_basedir no value no value
output_buffering 0 0
output_handler no value3yªÚóÄ

 
Old January 22nd, 2005, 02:15 PM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My files are containing 600 - 1500 lines with code. Are they not to big to put on this forum?


 
Old January 24th, 2005, 07:56 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<?php
session_start();
include "conn.inc.php";

?>
<html>
<head>
<title>MD Timeregistrering</title>
</head>

<body bgcolor="#FFFFFF">

<form action="mdsiste.php" method="POST">
  <table width="789" height="559" border="0" bgcolor="#7AA0AF" style="border-collapse: collapse" cellpadding="0" cellspacing="0">
    <tr valign="top" bgcolor="#7AA0AF">
      <td width="787" height="189" bgcolor="#6D97B0" style="border-style:inset; border-width:1px; ">
        <table width="778" border="0" style="border-bottom-width: 0" height="143">
          <tr>
            <td height="91" colspan="5" bgcolor="#FFFFFF"> <table width="780" height="86" border="0" background="mdlogo.png" bgcolor="#FFFFFF">
                <tr>
                  <?php
          $result = mysql_query("SELECT ansatt_navn, ansatt_id FROM ansatt WHERE ansatt_brukernavn = '" .$_SESSION['user_logged']. "' AND ansatt_passord = '" .$_SESSION['user_password']. "'");
          $row=mysql_fetch_row($result);
           ?>
                  <td height="22" align="left" valign="top"> <div align="right"><b>Navn:</b>
                      <input type="text" name="ansattnavn" value="<?php echo "$row[0]";?>" readonly>
                    </div></td>
                </tr>
                <tr>
                  <td height="24" align="right" valign="top"><b>Ansattnummer:
                      <input name="ansattnummer" type="text" value="<?php echo "$row[1]";?>" size="10" maxlength="3" readonly>
                      </b></div></td>
                </tr>
                <tr>
                  <td height="30" align="left" valign="top"> <table width="774" height="28" border="0">
                      <tr>
                        <td width="432" height="24">&nbsp;</td>
                        <td width="90" align="right"><b>Ukenr:
                            <input name="ukefelt" type="text" id="ukefelt" value="<?php echo date("W"); ?>" size="2" maxlength="2" readonly>
                            </b></div></td>
                        <td width="156"><div align="right"><b>M&aring;ned:
                            </b>
                            <?php
                            $maaned=date("F");
                            $ts = strtotime("+1 month");
                            $nestemaaned=date("F", $ts);
                            ?>
                            <select name="maaned" id="maaned">
                              <option value="<?php echo $maaned;?>"><?php echo $maaned;?></option>
                              <option value="<?php echo $nestemaaned;?>"><?php echo $nestemaaned;?></option>
                            </select>
                            <b> </b></div></td>
                        <td width="78"><div align="right"><b>
                            &Aring;r:
                            <input name="aarfelt" type="text" id="aarfelt" value="<?php echo date("Y"); ?>" size="4" maxlength="4" readonly>
                            </b></div></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td height="22"></td>
            <td height="22" colspan="4" bordercolor="#003366"><table width="773" border="0">
                <tr>
                  <td width="142" bordercolor="#B6C0C9" bgcolor="#003366"><div align="center"><strong>Legg
                      til timer</strong></div></td>
                  <td width="81">&nbsp;</td>
                  <td width="213">&nbsp;</td>
                  <td width="84" height="22" align="right" valign="top" bgcolor="#DEE3DF">
                    <div align="center"><strong><a href="user_endre.php">Endre
                      timer</a> </strong></div></td>
                  <td width="92" align="right" valign="top" bgcolor="#DEE3DF"><div align="center"><strong><a href="maanedsrapport.php">M&aring;nedsrapport</a></strong></div></td>
                  <td width="75" align="right" valign="top" bgcolor="#DEE3DF"><div align="center"><strong><a href="aarsrapport.php">&Aring;rsrapport</a></strong></div></td>
                  <td width="56" height="22" align="right" valign="top" bgcolor="#DEE3DF">
                    <div align="center"><strong><a href="user_login.php">Logg
                      ut </a></strong></div></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td width="2" height="22"></td>
            <td width="146" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: none; border-bottom-width: medium; border-top-style:solid; border-top-width:1" bgcolor="#B6C0C9" height="22" bordercolor="#003366">
            <strong>PROSJEKT</strong></td>
            <td width="394" height="22"></td>
            <td width="119" height="22">&nbsp;</td>
            <td width="103" height="22" align="right" valign="top">&nbsp;</td>
          </tr>
        </table>
        <table width="562" border="0" style="border-top-width: 0">
          <tr>
            <td width="10">&nbsp;</td>
            <td width="90" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Prosjektnavn</b></td>
            <td width="57" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Mandag</b></td>
            <td width="52" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Tirsdag</b></td>
            <td width="52" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Onsdag</b></td>
            <td width="56" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Torsdag</b></td>
            <td width="48" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Fredag</b></td>
            <td width="49" align="center" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Lørdag</b></td>
            <td width="50" align="center" style="border-left: 1px solid #003366; border-right: medium none #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Søndag</b></td>
            <td width="56" align="center" style="border-left: 1px solid #003366; border-right: medium none #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Overtid</b></td>
          </tr>
          <tr>
            <td width="10" height="26">&nbsp;</td>
            <?php
$query_sql1 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql1 = mysql_query($query_sql1) or die(mysql_error());
$row_sql1 = mysql_fetch_assoc($sql1);
$totalRows_sql1 = mysql_num_rows($sql1);
?>
            <td bgcolor="#CAE1E9" class="medium"><select name="velgprosjekt" size="1">
                <?php
                do {
                ?>
                <option value="<?php echo $row_sql1['prosjekt_id'];?>"><?php echo $row_sql1['prosjekt_navn']?></option>
                <?php
                }
                while ($row_sql1 = mysql_fetch_assoc($sql1));
                  $rows1 = mysql_num_rows($sql1);
                  if($rows1 > 0)
                {
                  mysql_data_seek($sql1, 0);
                   $row_sql1 = mysql_fetch_assoc($sql1);
                 }
            ?>
              </select> </td>
            <td width="57" align="center"><input name="arbeid_man" type="text" size="6" maxlength="6"></td>
            <td width="52" align="center"><input name="arbeid_tir" type="text" size="6" maxlength="6"></td>
            <td width="52" align="center"><input name="arbeid_ons" type="text" size="6" maxlength="6"></td>
            <td width="56" align="center"><input name="arbeid_tor" type="text" size="6" maxlength="6"></td>
            <td width="48" align="center"><input name="arbeid_fre" type="text" size="6" maxlength="6"></td>
            <td width="49" align="center"><input name="arbeid_lor" type="text" size="6" maxlength="6"></td>
            <td width="50" align="center"><input name="arbeid_son" type="text" size="6" maxlength="6"></td>
            <td width="56" align="center"><input name="arbeid_overtid" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td height="26">&nbsp;</td>
                                      <?php
$query_sql2 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql2 = mysql_query($query_sql2) or die(mysql_error());
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);
?>
            <td bgcolor="#CAE1E9" class="medium"><select name="velgprosjekt2" size="1">

                <?php
                do
                {
                ?>
                <option value="<?php echo $row_sql2['prosjekt_id'];?>"><?php echo $row_sql2['prosjekt_navn']?></option>
                <?php
                }
                while ($row_sql2 = mysql_fetch_assoc($sql2));
                  $rows2 = mysql_num_rows($sql2);
                  if($rows2 > 0)
                {
                  mysql_data_seek($sql2, 0);
                   $row_sql2 = mysql_fetch_assoc($sql2);
                  }
                ?>
                  </select></td>
            <td align="center"><input name="arbeid_man2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tir2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_ons2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tor2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_fre2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_lor2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_son2" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_overtid2" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td height="26">&nbsp;</td>
                        <?php
$query_sql3 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql3 = mysql_query($query_sql3) or die(mysql_error());
$row_sql3 = mysql_fetch_assoc($sql3);
$totalRows_sql3 = mysql_num_rows($sql3);
?>
            <td bgcolor="#CAE1E9" class="medium"><select name="velgprosjekt3" size="1">
                <?php
                    do {
                ?>
                <option value="<?php echo $row_sql3['prosjekt_id'];?>"><?php echo $row_sql3['prosjekt_navn']?></option>
                <?php
                } while ($row_sql3 = mysql_fetch_assoc($sql3));
                  $rows3 = mysql_num_rows($sql3);
                  if($rows3 > 0) {
                  mysql_data_seek($sql3, 0);
                   $row_sql3 = mysql_fetch_assoc($sql3);
                  }
                ?>
              </select></td>
            <td align="center"><input name="arbeid_man3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tir3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_ons3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tor3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_fre3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_lor3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_son3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_overtid3" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td height="28">&nbsp;</td>
                        <?php
$query_sql4 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql4 = mysql_query($query_sql4) or die(mysql_error());
$row_sql4 = mysql_fetch_assoc($sql4);
$totalRows_sql4 = mysql_num_rows($sql4);
?>
            <td bgcolor="#CAE1E9" class="medium"><select name="velgprosjekt4" size="1">
                <?php
                do {
                ?>
                <option value="<?php echo $row_sql4['prosjekt_id'];?>"><?php echo $row_sql4['prosjekt_navn']?></option>
                <?php
                } while ($row_sql4 = mysql_fetch_assoc($sql4));
                  $rows4 = mysql_num_rows($sql4);
                  if($rows4 > 0) {
                  mysql_data_seek($sql4, 0);
                   $row_sql4 = mysql_fetch_assoc($sql4);
                  }
                ?>
              </select></td>
            <td align="center"><input name="arbeid_man4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tir4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_ons4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tor4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_fre4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_lor4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_son4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_overtid4" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td height="26">&nbsp;</td>
                        <?php
$query_sql5 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql5 = mysql_query($query_sql5) or die(mysql_error());
$row_sql5 = mysql_fetch_assoc($sql5);
$totalRows_sql5 = mysql_num_rows($sql5);
?>
            <td bgcolor="#CAE1E9" class="medium"><select name="velgprosjekt5" size="1">
               <?php
                do {
                ?>
                <option value="<?php echo $row_sql5['prosjekt_id'];?>"><?php echo $row_sql5['prosjekt_navn']?></option>
                <?php
                } while ($row_sql5 = mysql_fetch_assoc($sql5));
                  $rows5 = mysql_num_rows($sql5);
                  if($rows5 > 0) {
                  mysql_data_seek($sql5, 0);
                  $row_sql5 = mysql_fetch_assoc($sql5);
                  }
                ?>
              </select>
             </td>
            <td align="center"><input name="arbeid_man5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tir5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_ons5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_tor5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_fre5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_lor5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_son5" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="arbeid_overtid5" type="text" size="6" maxlength="6"></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr valign="top" bgcolor="#7AA0AF">
      <td height="185" style="border-style:inset; border-width:1px; " bgcolor="#6D97B0" width="787">
        <table width="591" border="0" height="10" style="border-bottom-width: 0">
          <tr>
            <td width="11" height="6"></td>
            <td width="136" align="center" height="6" style="border-left-style: solid; border-left-width: 1; border-bottom-style: none; border-bottom-width: medium; border-top-style:solid; border-top-width:1" bgcolor="#B6C0C9" bordercolor="#003366">
            <strong>OFFSHORE</strong></td>
            <td width="51" height="6"></td>
            <td width="58" height="6"></td>
            <td width="58" height="6"></td>
            <td width="58" height="6"></td>
            <td width="58" height="6"></td>
            <td width="58" height="6"></td>
            <td width="66" height="6"></td>
          </tr>
        </table>
        <table width="636" border="0" style="border-top-width: 0">
          <tr>
            <td width="7">&nbsp;</td>
            <td width="92" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Prosjektnavn</b></td>
            <td width="57" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Mandag</b></td>
            <td width="52" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Tirsdag</b></td>
            <td width="52" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Onsdag</b></td>
            <td width="59" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Torsdag</b></td>
            <td width="50" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
              <b>Fredag</b></td>
            <td width="49" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
            <b>Lørdag</b></td>
            <td width="50" align="left" style="border-left: 1px solid #003366; border-right-color: #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
            <b>Søndag</b></td>
            <td width="126" align="left" style="border-left: 1px solid #003366; border-right: medium none #003366; border-top: medium none #003366; border-bottom: 1px solid #003366">
            <b>Tillegg (dager)</b></td>
          </tr>
          <tr>
            <td width="7">&nbsp;</td>
                        <?php
$query_sql6 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql6 = mysql_query($query_sql6) or die(mysql_error());
$row_sql6 = mysql_fetch_assoc($sql6);
$totalRows_sql6 = mysql_num_rows($sql6);
?>
            <td align="left" width="92">

                <select name="velgprosjekt6" size="1">
                      <?php
                    do {
                    ?>
                     <option value="<?php echo $row_sql6['prosjekt_id'];?>"><?php echo $row_sql6['prosjekt_navn']?></option> <?php
                    } while ($row_sql6 = mysql_fetch_assoc($sql6));
                      $rows6 = mysql_num_rows($sql6);
                      if($rows6 > 0) {
                     mysql_data_seek($sql6, 0);
                       $row_sql6 = mysql_fetch_assoc($sql6);
                      }
                    ?>
                </select>
            </td>
            <td align="center" width="57"><input name="offshore_man" type="text" size="6" maxlength="6"></td>
            <td align="center" width="52"><input name="offshore_tir" type="text" size="6" maxlength="6"></td>
            <td align="center" width="52"><input name="offshore_ons" type="text" size="6" maxlength="6"></td>
            <td align="center" width="59"><input name="offshore_tor" type="text" size="6" maxlength="6"></td>
            <td align="center" width="50"><input name="offshore_fre" type="text" size="6" maxlength="6"></td>
            <td align="center" width="49"><input name="offshore_lor" type="text" size="6" maxlength="6"></td>
            <td align="center" width="50"><input name="offshore_son" type="text" size="6" maxlength="6"></td>
            <td align="left" width="126"><input name="offshore_tillegg" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td width="7">&nbsp;</td>
            <td align="left" width="92">
                            <?php
$query_sql7 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql7 = mysql_query($query_sql7) or die(mysql_error());
$row_sql7 = mysql_fetch_assoc($sql7);
$totalRows_sql7 = mysql_num_rows($sql7);
?>
                <select name="velgprosjekt7" size="1">
                      <?php
                    do {
                    ?>
                    <option value="<?php echo $row_sql7['prosjekt_id'];?>"><?php echo $row_sql7['prosjekt_navn']?></option>
                    <?php
                    } while ($row_sql7 = mysql_fetch_assoc($sql7));
                    $rows7 = mysql_num_rows($sql7);
                    if($rows7 > 0) {
                      mysql_data_seek($sql7, 0);
                       $row_sql7 = mysql_fetch_assoc($sql7);
                      }
                    ?>
                </select>
            </td>
            <td align="center" width="57"><input name="offshore_man2" type="text" size="6" maxlength="6"></td>
            <td align="center" width="52"><input name="offshore_tir2" type="text" size="6" maxlength="6"></td>
            <td align="center" width="52"><input name="offshore_ons2" type="text" size="6" maxlength="6"></td>
            <td align="center" width="59"><input name="offshore_tor2" type="text" size="6" maxlength="6"></td>
            <td align="center" width="50"><input name="offshore_fre2" type="text" size="6" maxlength="6"></td>
            <td align="center" width="49"><input name="offshore_lor2" type="text" size="6" maxlength="6"></td>
            <td align="center" width="50"><input name="offshore_son2" type="text" size="6" maxlength="6"></td>
            <td align="left" width="126"><input name="offshore_tillegg2" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="left">
                            <?php
$query_sql8 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql8 = mysql_query($query_sql8) or die(mysql_error());
$row_sql8 = mysql_fetch_assoc($sql8);
$totalRows_sql8 = mysql_num_rows($sql8);
?>
                <select name="velgprosjekt8" size="1">
                      <?php
                    do {
                    ?>
                     <option value="<?php echo $row_sql8['prosjekt_id'];?>"><?php echo $row_sql8['prosjekt_navn']?></option>
                      <?php
                    } while ($row_sql8 = mysql_fetch_assoc($sql8));
                      $rows8 = mysql_num_rows($sql8);
                      if($rows8 > 0) {
                      mysql_data_seek($sql8, 0);
                       $row_sql8 = mysql_fetch_assoc($sql8);
                      }
                    ?>
                </select>
            </td>
            <td align="center"><input name="offshore_man3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_tir3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_ons3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_tor3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_fre3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_lor3" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_son3" type="text" size="6" maxlength="6"></td>
            <td align="left"><input name="offshore_tillegg3" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="left">
                            <?php
$query_sql9 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql9 = mysql_query($query_sql9) or die(mysql_error());
$row_sql9 = mysql_fetch_assoc($sql9);
$totalRows_sql9 = mysql_num_rows($sql9);
?>
                <select name="velgprosjekt9" size="1">
                      <?php
                    do {
                    ?>
                      <option value="<?php echo $row_sql9['prosjekt_id'];?>"><?php echo $row_sql9['prosjekt_navn']?></option>
                      <?php
                    } while ($row_sql9 = mysql_fetch_assoc($sql9));
                      $rows9 = mysql_num_rows($sql9);
                      if($rows9 > 0) {
                      mysql_data_seek($sql9, 0);
                       $row_sql9 = mysql_fetch_assoc($sql9);
                      }
                    ?>
                </select>
            </td>
            <td align="center"><input name="offshore_man4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_tir4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_ons4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_tor4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_fre4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_lor4" type="text" size="6" maxlength="6"></td>
            <td align="center"><input name="offshore_son4" type="text" size="6" maxlength="6"></td>
            <td align="left"><input name="offshore_tillegg4" type="text" size="6" maxlength="6"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="left">
                        <?php
$query_sql10 = "SELECT prosjekt_id, prosjekt_navn FROM prosjekt";
$sql10 = mysql_query($query_sql10) or die(mysql_error());
$row_sql10 = mysql_fetch_assoc($sql10);
$totalRows_sql10 = mysql_num_rows($sql10);
?>
                <select name="velgprosjekt10" size="1">
                      <?php
                    do {
                    ?>
                      <option value="<?php echo $row_sql10['prosjekt_id'];?>"><?php echo $row_sql10['prosjekt_navn']?></option>
                     <?php
                    } while ($row_sql10 = mysql_fetch_assoc($sql10));
                      $rows10 = mysql_num_rows($sql10);
                      if($rows10 > 0) {
                      mysql_data_seek($sql10, 0);
                       $row_sql10 = mysql_fetch_assoc($sql10);
                      }
   &
 
Old January 27th, 2005, 08:02 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SOMEBODY PLEASE!!!!!
HELP ME!

 
Old January 28th, 2005, 03:59 PM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try one of the general debugging strategies:

1) comment (//) out/in various sections of code to see hidden interactions or dependencies.
2) insert echo "...your debug msg ..."; around the area in question - move the echo until it is seen.

More than likely you are missing the ending bracket/delimeter (for example, missing end quote, paren, brace, ending semi-colon, or the ?>) in one of your PHP expressions causing PHP to think the HTML code is a PHP statement. Use an editor that understands PHP syntax and shows you the mating delimiter so you can easily see the problem.


Philibuster
 
Old January 29th, 2005, 12:42 PM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your tips.
I downloaded PHP Expert Editor version 3.2.1

When I tried this editor and tested all my files, there was no problem. It work like it was supposed to. So, if the PHP info that was displayed when I tested my Apache server(I posted this info higher up on this page), is ok. And my code , according to PHP Expert Editor, is ok. What else can it be?

 
Old February 2nd, 2005, 05:26 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello everyone.
With alot of help from a programmer, I found out what was wrong. It was the server. We tested the files on an external server and it worked great. Even though I tested on my server like Gotaka4 said.

Thanks everyone for your help







Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with book Beginning PHP, Apache, Mysql WD elals BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 December 9th, 2005 02:39 AM
which is best :php with iis or php with apache? fromheavenz Beginning PHP 4 September 7th, 2005 01:47 AM
Problem with book Beginning PHP, Apache, Mysql WD elals Beginning PHP 1 March 27th, 2005 10:02 AM
Apache loading problem. PHP kfroiland Pro PHP 0 January 21st, 2005 05:04 AM
Need help with Apache and PHP yaluyahee BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 19 August 31st, 2004 02:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.