Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

124
Visualizações
PHP 7.2 Apache not executing all php code

Really confusd here. PHP is working until it gets to an IF statement any suggestions / help greatly appreciated.

$sql2=("SELECT * FROM temporders WHERE cusid='$myid'");
$result2=mysqli_query($connP,$sql2);
$count2=mysqli_num_rows($result2);
$total=0;
$itemNum=0;
if ($count2>0) {
    while($row2 = mysqli_fetch_array($result2, mysqli_ASSOC)) {
    $total=($total+($row2['price']*$row2['qty']));
    $itemNum=$itemNum+$row2['qty'];
    }
}
if ($total<1) {
$total=0;
} else {
$total=number_format($total, 2, '.', '');
}
?>
 <div class="basket">

All of the bove works perfect until it gets to here which is the next stage it produces this when i view the page source code. All php is showing from this stage onwards

<div class="basket">
<?
if ($total==0) {
?>
<form action="../customer-page.html" method="get" name="cart" id="cart">
<?
    } else {
?>
    <form>
<?
}
?>
      <input type="hidden" name="page" id="page" value="southern-spas-saunas.html" />
      <input type="hidden" name="delitem" value="0" />
      <input type="hidden" name="myid" value="202003220001" />
 <table width="250" border="0">
 <tr>
  <td width="45"><input name="image2" type="image" value="Process" src="../1basket.gif" /></td>
  <td width="120">Total &pound; 0</td>
  <td>Items 0</td>
</tr>
</table>
    </form>
  </div>
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda