PDA

View Full Version : HTML and PHP dont mix with the hacks!


10-07-2000, 12:32 PM
I dont understand how everyone else has done it but I cant get anywhere with mixing HTML with PHP in order to display the hacks like:
http://animeboards.com/index2.php3

I tried to put one of those hacks in a table and I get a pharse error.

The way I done it is via:
<html>
<?php
include("something.php");
?>
</html>

for each hack to display.


Adding things on via Frontpage just stops the code from working.

Can anyone help me out?

Current page is at: http://vboard.co.uk/index.php
with no HTML now and looks messy. :(

10-07-2000, 02:05 PM
in the index2.php3 file i have this before the

<html> tag


<?
require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php");
require("/home/usr1/www.animeboards.net/htdocs/phpads/config.inc.php3");
require("/home/usr1/www.animeboards.net/htdocs/phpads/view.inc.php3");
require("/home/usr1/www.animeboards.net/htdocs/phpads/acl.inc.php3");
chdir("/home/usr1/www.animeboards.net/htdocs/forums");
require("/home/usr1/www.animeboards.net/htdocs/forums/global.php");
?>
<html>
<head>
<title>Animeboards Forums</title> not sure if that's your problem - of course you can leave out the ones referring to phpads if you don't use phpads on the index page

10-07-2000, 02:36 PM
Didn't work at all.

Only this works for me:
<?php
include("totalmembers.inc.php");
include("newestmember.inc.php");
include("activetopics.php");
?>

If I add anything on it! It will not work at all. :mad:

10-07-2000, 04:26 PM
im sure this isnt a parse error you are getting. How about giving us the exact error you get.

~Chris

10-07-2000, 05:34 PM
This is a html/php code that is used at: http://www.vboard.co.uk/index.php

<html>

<head>
<title>vBoard</title>
</head>

<?php&nbsp;
<table border="1" width="100%">
<tr>
<td width="50%">
include("totalmembers.inc.php");&nbsp;</td>
<td width="50%">
include("newestmember.inc.php");</td>
</tr>
</table>
<p>&nbsp;include("activetopics.php");
?></p>
<html/>


You will see this error:
Parse error:
parse error in /home/jordan32/web/index.php on line 8

Line 8 happens to be a bit of HTML!

10-07-2000, 06:04 PM
woah dude, helps if you use PHP correctly...

<html>

<head>
<title>vBoard</title>
</head>
&nbsp;
<table border="1" width="100%">
<tr>
<td width="50%">
<?php include("totalmembers.inc.php"); ?>&nbsp;</td>
<td width="50%">
<?php include("newestmember.inc.php"); ?></td>
</tr>
</table>
<p>&nbsp;<?php include("activetopics.php"); ?></p>
<html/>

10-07-2000, 06:26 PM
Thanks Ed

Everything is working!!!
I wonder if i can get by now. :)

10-07-2000, 08:25 PM
Originally posted by vBoard.co.uk


The way I done it is via:
<html>
<?php
include("something.php");
?>
</html>



I knew this wasnt the case because the example here would never throw a parse error.

oh well ;)

~Chris

10-09-2000, 04:06 PM
If your using frontpage, use the tags:

<SCRIPT language="php"> instead of <?php

and </script> instead of ?>

frontpage will recognize the tags and not put the code as HTML.

what you would get would be:

<SCRIPT language="php">
include("something.php");
</script>