Solved

Dreamweaver won't cooperate

Posted on 2009-03-31
7
904 Views
Last Modified: 2012-05-06
I am creating a website using Dreamweaver CS4 and mySQL and several of the pages will have repeating regions that input data from the tables created in mySQL.  My first problem is that whewn I create the repeating region and test it, it does repeat the table BUT, it repeats the same record 20 times instead of displaying the records sequentially.
My second problem involves a column of graphics that won't display as graphics.
To see what I'm talking about, you can go to www.aspectsandissues.com and on the index page, click on the top navigation button on the right side of the page,  This is a temporary link created to the selectequip.php page which is the source of all my misery.
Can anyone provide any guidance.  (By the way, I wrapped the graphic in an src code and added the location of the directory where these graphics are stored.  It won't work.

Dick Barrett
<div id="content">
    <?php do { ?>
      <table width="725" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="155" rowspan="4" valign="top"><img src="vehpics/<?php echo $row_Recordset1['photograph']; ?>" lowsrc="" />
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
          <p>&nbsp;</p></td>
          <td width="570"><h2><?php echo $row_Recordset1['item']; ?></h2></td>
        </tr>
        <tr>
          <td align="center" nowrap="nowrap"><?php echo $row_Recordset1['Desccription']; ?> manufactured by <?php echo $row_Recordset1['Manufacturer']; ?></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center">&nbsp;</td>
        </tr>
      </table>
      <?php } while ($row_rsEquipment = mysql_fetch_assoc($rsEquipment)); ?>
<h6>&nbsp;</h6>
  </div>
  <!-- TemplateEndEditable -->

Open in new window

0
Comment
Question by:Dick_A_Barrett
  • 4
  • 3
7 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24035029
Hi Dick,

Two issues with the above:

1) You are wrapping the entire table with the repeat region tag and that's unnecessary.  See below for a better example.

2) Images.  Here is how your image resolves after the HTML is rendered from the PHP:

<img src="vehpics/vehpics\ab46.jpg" />

So it appears from the above that you don't need the path to the folder:

<img src="vehpics/<?php echo $row_Recordset1['photograph']; ?>" lowsrc="" />

should just be:

<img src="<?php echo $row_Recordset1['photograph']; ?>" />

Also note that all slashes need to be / and not the Windows \ so make sure you correct that in the data.

>> My first problem is that whewn I create the repeating region and test it, it does repeat the table BUT, it repeats
>> the same record 20 times instead of displaying the records sequentially.

That usually indicates a screwed up query or repeated data in the table.  Can you post the SQL?
Corrected repeat region:
 
 
      <table width="725" border="0" cellspacing="0" cellpadding="0">
      <?php do { ?>
        <tr>
          <td width="155" rowspan="4" valign="top"><img src="vehpics/<?php echo $row_Recordset1['photograph']; ?>" lowsrc="" />
            <p> </p>
            <p> </p>
            <p> </p>
            <p> </p>
          <p> </p></td>
          <td width="570"><h2><?php echo $row_Recordset1['item']; ?></h2></td>
        </tr>
        <tr>
          <td align="center" nowrap="nowrap"><?php echo $row_Recordset1['Desccription']; ?> manufactured by <?php echo $row_Recordset1['Manufacturer']; ?></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
        <tr>
          <td align="center"> </td>
        </tr>
      <?php } while ($row_rsEquipment = mysql_fetch_assoc($rsEquipment)); ?>
      </table>

Open in new window

0
 

Author Comment

by:Dick_A_Barrett
ID: 24035122
I just imported the data again from the offending table.  It may or may not be corrected (the double location given).  
Can you see anythjing wrong with the sql table?

Dick
SQL-equip-table.png
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24035178
No, that data looks okay.  What does the SQL query look like?
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:Dick_A_Barrett
ID: 24035408
I have no idea.  How do I find that?  Is it reflected in the code on the page?
By the by, there WAS a problem with the server in Houston and the first 2 times I attempted to upload the data you looked at, it didn't go through.  Third time was the charm.  It now resolves properly to HTML.
Not that it makes any difference.  It still only loads the same record 20 times and the graphics still fail to 0pen.

0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24035621
>>  Is it reflected in the code on the page?

Yes.  Above the <html> tag is all of the PHP code.  Cut and paste it here.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 24035631
The images are not present where you think they are:

http://www.aspectsandissues.com/vehpics/ab46.jpg

gives me a 404 error.  So your path is still wrong.
0
 

Author Closing Comment

by:Dick_A_Barrett
ID: 31565123
Jason1178 has responded to other questions I've asked on EE.  As always, he is able to recognize the problem, express it concisely, and provide an understandable solution.  I couldn't be more satisfied.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dreamweaver CS5.5 Error 5 537
dreamweaver cs6 keep getting error 2 msg 16 393
can't connect to server via ftp from dreamweaver 22 2,441
Element Positioning for Fluid Grid Layout 6 139
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question