We help IT Professionals succeed at work.

the table change it when i add a dynamic code with PHP

altariamx2003
on
Medium Priority
239 Views
Last Modified: 2012-05-11
OK

I have this page: http://www.sitemx.mx/studies.php.

The main data of this page is loaded from another page using ckeditor. This content is saved in a database and when studies.php is loaded the content is loaded from the database.

One of the part of the site, is the glossary of terms. (this terms are saved in a database).
My user wants that when studies.php is loaded the page make a dynamic links when a word of studies.php matches with the data saved on the glossary.

The problem is when the page do the dynamics links
THIS CODE:  
$temporal = '<a onclick="abrir(\'terms.php?recordID='.$row['clave'].'\',\'279\',\'701\',2,\''.$row['clave'].'_terms\')" href="#">'.$palabras[$i].'</a>';			$imprime = $imprime. " ".$temporal;

Open in new window

.

The format of the page change a lot, for example: http://www.sitemx.mx/test1.php.

I think the problem is on the last part of the code, because this table when the page do dynamic links is printed onside the main table, when his real position is outside the main table.
 
echo '<table border="0" width="950" cellspacing="0" cellpadding="0" id="table714">';
             echo ' <tr>';
             echo '  <td width="475">';
             echo '   <font class="menu_titulo"><br></font>';
             echo '  </td>';
             echo '  <td width="475" align="right">';
             echo '   <font class="menu_titulo"><br>';
             echo '      ';
             echo '   </font>';
             echo '  </td>';
             echo ' </tr>';
             echo '</table>';

Open in new window

.

This is the code all the code where I check is there is a match with the words on the glossary:
 code1.txt


If you need this is the all code of studies.php
 page.txt
Comment
Watch Question

Frank ContrepoisVP Technical Sales
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Most Valuable Expert 2011
Author of the Year 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Hi Ray

Why when the page add the dynamic links the format of table change it???

this is the link that I add for this issue (exampe: http://www.sitemx.mx/test1.php

Author

Commented:
hi fcontrepois

at the end of the page I add this code:
 
echo '<table border="0" width="950" cellspacing="0" cellpadding="0" id="table714">';
             echo ' <tr>';
             echo '  <td width="475">';
             echo '   <font class="menu_titulo"><br></font>';
             echo '  </td>';
             echo '  <td width="475" align="right">';
             echo '   <font class="menu_titulo"><br>';
             echo '      ';
             echo '   </font>';
             echo '  </td>';
             echo ' </tr>';
             echo '</table>';

Open in new window


If I remove this code this is how the page looks: http://www.sitemx.mx/test2.php

As you can see  the format looks fine and everything works great

I would like to know why no matter what kind of table I add add the end of the page the format change.

Most Valuable Expert 2011
Author of the Year 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thx for your help

I found the solution by myself
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.