1
Matt_T_hat
PHP code broken by xoops!?
  • 2004/11/9 12:39

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


I have a code snipit from another aplication I run.

It worked perfectkly prior to install XOOPS as all iot realy does is grab some numbers

le="color: #000000"><?php <? include("./dweb_club/config.php"); $query="SELECT * FROM $table WHERE apr='y'"; $result=mysql_query($query); $num=mysql_numrows($result); ?> <p>We have a total of <b><?=$num?></b> members! <? $query2="SELECT * FROM $table WHERE apr!='y'"; $result2=mysql_query($query2); $num2=mysql_numrows($result2); ?> <br />(<b><?=$num2?></b> pending <? if ($num2 == "1"){ ?>member<? } else { ?>members<? } ?>)</p> <? $query="SELECT * FROM $table_u"; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $last=mysql_result($result,$i,"date"); ?> <p><small>Member listing last updated on <?=$last?>.</small></p> <? ++$i; } ?>


I removed all the <? tags and converted all the remaining HTMl to Echo statements (not so dis-similar to the ASP I learned at college).

Now it sits there like a lemon and does nothing.

2
dheltzel
Re: PHP code broken by xoops!?
  • 2004/11/9 13:31

  • dheltzel

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/1/8 1


You did leave a "<?php" tag at the beginning and closed it with a "?>", right?

Even included files need these tags, nothing is adding them implicitly.

Dennis

3
Matt_T_hat
Re: PHP code broken by xoops!?
  • 2004/11/9 13:51

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


when I was experimenting with the system I found that a single require statement I had written only worked without the tags.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits