Hi,

 

 

 

 

 

 

 

 

 

From:
"Daryl Booth" <[EMAIL PROTECTED]>To:[EMAIL PROTECTED]:Sun, 25 Sep 2005 15:35:40 
+0200Subject:HTML Tables in PHP...
 


How can I give a <table> </table> with all of it's parameters in PHP in eachof 
the cells there is a variable that gives me the data back but I can't getthe 
table to show as it always gives me either this error "Parse error:parse error, 
unexpected T_LNUMBER, expecting ',' or ';' 
inC:\FoxServ\www\Dad\proofing\index.php on line 41" or this one when I don'tput 
in the quotes "Parse error: parse error, unexpected '<', expecting ','or ';' in 
C:\FoxServ\www\Dad\proofing\index.php on line 41". Here is the PHP code I'm 
using: <?php$datei="c:\licence.txt";  if(file_exists($datei)){  $nachricht="The 
licence has been validated thank-you!";  $fp = fopen($datei,"r");  
fpassthru($fp);  fclose($fp);  }else{  $nachricht="The licence doesn't exist 
please contact us!  echo <table width="694" height="501" border="0" 
align="center"cellpadding="0" cellspacing="0">  <tr>    <td height="109" 
colspan="7"><img src="images/1.jpg" width="857"height="109" border="0" 
usemap="#Map"></td>  </tr>  <tr>    <td
 width="39" rowspan="2"><img src="images/lefty.jpg" 
width="39"height="394"></td>    <td width="8" height="369">&nbsp;</td>    <td 
width="240" class="style5"></td>    <td width="12" height="369" 
class="style5">&nbsp;</td>    <td width="407" height="369" 
class="style5"><spanclass="style3"><b>$nachricht</b></span><br></td>    <td 
width="346" rowspan="2"><img src="images/righty.jpg" width="346"height="394" 
border="0" usemap="#Map2"></td>  </tr>  <tr>    <td height="23" 
colspan="5"><img src="images/bottom.jpg" width="472"height="23"></td>  
</tr></table>;} ?>

 

Hi,

Damn your code is VERY MESSY.  No wonder PHP is confused in how the work is 
configured.  You need to do alot of work.

<snip>

  echo <table width...

</snip>

This is not even proper PHP writting.  The server would look at this and say 
"huh?"  Read this:

http://au3.php.net/manual/en/function.echo.php

The second line of the demonstration is easy to read and points out an obvious 
exclusion you don't have in your code.  If you can't find this?  Than you need 
to read alot more on PHP/MYSQL because your obviously not up to the standard 
you need to write PHP on the fly without major help.  I suggest you read the 
online docs.  Answers are much easier to find there than waiting a while for a 
response on here.

Also notice in the demonstration at the end of all code lines there is a ";"?

Where is yours?  PHP gets to the end of your code and does not see a ";" so 
can't understand it.

If you read the error messages outputed it's pretty self-explaintry to the 
error.  Read it, go to that line and think about the error displayed.  Also 
PHP.net and mysql.net have error codes.  So if you get an error and it displays 
an error code id go to the relevant site and check it up for a more detailed 
response and fix.

Does this assist you?

 

J


                
---------------------------------
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search

Reply via email to