PDA

View Full Version : PHP Parse Error


Chewy954
08-14-2008, 10:44 PM
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$headinclude
<title>$vboptions[CustomPage_title] - $vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">
<tr>
<td class="tcat">$vboptions[CustomPage_title]</td>
</tr>
<tr>
<td class="panelsurround" align="center"><form action="math.php?=submit" method="post">
Ticket Amount: <input type="text" name="tickets" />
<input type="submit" name="Submit" />
</form>


<?php
$total = 0.000983428571428571428571428571428 * $_POST["tickets"];
echo($total);
?></td>
</tr>
</table>
$footer

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_CHARACTER, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\Abyss Web Server\htdocs\includes\adminfunctions_template.php (3716) : eval()'d code on line 28

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Any ideas why it won't work? :X

bobster65
08-14-2008, 10:49 PM
you can't put PHP into a template..

Chewy954
08-14-2008, 10:52 PM
then how would I accomplish having PHP with my vbulletin theme? :X

Opserty
08-14-2008, 11:00 PM
Look in articles section, its a treasure chest of vbulletin information.

[How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009)

Chewy954
08-14-2008, 11:13 PM
Look in articles section, its a treasure chest of vbulletin information.

[How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009)

i don't see where I can put my own PHP in it :X

Opserty
08-14-2008, 11:18 PM
The PHP file maybe?...

After it says START MAIN SCRIPT...

Else: Including External Files (http://www.vbulletin.com/docs/html/main/templates_externalfiles)