Alrighty,

Ten eerste ik ben er weer is! Ik heb het ontzettend druk gehad om me eigenlijk serieus bezig te kunnen houden met php dat ik er niet veel tijd in heb gestoken.

Nu komt mijn vraag, in mijn script kan ik om een of andere reden helemaal niets meer includen of php stylig aanmaken $_POST['name'] of wat dan ook creƫren gaarna hulp gezocht want ik zit er wel goed vast mee!

mijn script:

<?
print "<html>
<head>
<title>interflex</title>
<STYLE TYPE=\"text/css\">
BODY {background-image: url(images/bgpattern.gif);
background-repeat: repeat-x;
background-color: #252525
}
</STYLE>
</head>
<body bgcolor=\"\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><center>

<table border=\"0\" height=\"100%\" width=\"798\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspan=\"2\" background=\"images/index_01.gif\" width=\"210\" height=\"53\" alt=\"\"></td>
<td colspan=\"2\" rowspan=\"3\" background=\"images/index_02.gif\" width=\"572\" height=\"164\" alt=\"\"></td >
<td rowspan=\"5\" background=\"images/index_03.gif\" width=\"18\" height=\"212\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"53\" alt=\"\"></td>
</tr>
<tr>
<td rowspan=\"4\" background=\"images/index_04.gif\" width=\"18\" height=\"159\" alt=\"\"></td>
<td background=\"images/index_05.gif\" width=\"192\" height=\"110\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"110\" alt=\"\"></td>
</tr>
<tr>
<td rowspan=\"2\" background=\"images/index_06.gif\" width=\"192\" height=\"22\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\"></td>
</tr>
<tr>
<td rowspan=\"3\">
<img src=\"images/index_07.gif\" width=\"116\" height=\"100%\" alt=\"\"></td>
<td rowspan=\"3\" background=\"images/index_08.gif\" width=\"456\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"21\" alt=\"\"></td>
</tr>
<tr>
<td rowspan=\"2\" background=\"images/index_09.gif\" width=\"192\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"27\" alt=\"\"></td>
</tr>
<tr>
<td>
<img src=\"images/index_10.gif\" width=\"18\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/index_11.gif\" width=\"18\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"324\" alt=\"\"></td>
</tr>
<tr>
<td colspan=\"5\" background=\"images/index_12.gif\" width=\"800\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"28\" alt=\"\"></td>
</tr>
<tr>
<td rowspan=\"2\">
<img src=\"images/index_13.gif\" width=\"18\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/index_14.gif\" width=\"192\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/index_15.gif\" width=\"116\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/index_16.gif\" width=\"456\" height=\"100%\" alt=\"\"></td>
<td rowspan=\"2\">
<img src=\"images/index_17.gif\" width=\"18\" height=\"100%\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"20\" alt=\"\"></td>
</tr>
<tr>
<td colspan=\"3\" background=\"images/index_18.gif\" width=\"764\" height=\"16\" alt=\"\"></td>
<td>
<img src=\"images/spacer.gif\" width=\"1\" height=\"16\" alt=\"\"></td>
</tr>
</table>
</center>
</body>
</html>
";
?>


Ik heb mijn html layout in php omgezet maar goed waarom kan ik niets includen? Dan krijg ik de foutmelding error on line.. well you know the deal :)

thanks voor iedereen die hier op repleyd!

Gr,

Sebas
Ten eerste :
Kies een DUIDELIJKE topic titel.

Ten tweede:
We weten wat de melding is (ik altans)
maar voor een snelle oplossing mischien toch handig dat je even zecht op welke regel
Een duidelijke topic titel alstublieft.

Ik snap je probleem niet echt, je moet html, zeker als het grote stukken html zijn buiten je php houden.

En je kan binnen de print functies niet inlcuden dat is logisch dan moet je het zo doen:


<?php   // geen shorttags
print "<html><head><title>een title</title></head><body>";
include('bestand.php');
print "</body></html>";
?>


Verder gebruiken de meeste mensen voor de print functie de echo functie, ik weet niet wat het verschil is maar er zal waarschijnlijk wel een verschil zijn als zoveel mensen de echo gebruiken

[edit]
Typo
[/edit]
Parse error: parse error, unexpected T_STRING in C:\Program Files\xampp\htdocs\iNterflex\index.php on line 15

als ik include op deze manier:

print "<table border=\"0\" height=\"100%\" width=\"798\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspan=\"2\" background=\"images/index_01.gif\" width=\"210\" height=\"53\" alt=\"\">
include ("databasses/index.php"); </td>";
Allereerst raad ik je aan om de basis cursus php nog eens goed door te lezen,

dit werkt wel:

<?php
print "<table border=\"0\" height=\"100%\" width=\"798\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspan=\"2\" background=\"images/index_01.gif\" width=\"210\" height=\"53\" alt=\"\">";
include ("databasses/index.php");
print "</td>";
?>


Je kunt trouwens beter single quotes (') gebruiken want dan hoef je de dubble quotes(") niet te escapen,

dan wordt het:

<?php
print '<table border="0" height="100%" width="798" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="2" background="images/index_01.gif\" width="210" height="53" alt="">';
		  
include ('databasses/index.php');

print '</td>';
?>
Je print statement eindigt niet op een puntkomma. En je springt wel op een heel gekke manier in.
't bood een gedeeltelijke oplossing maar zodra ik het toewijs op een andere tabel een stuk naar beneden dan krijg ik weer een error.. :/
trouwens, het is databases en niet databasses...

Reageren