Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 20th, 2008, 08:03 PM
Shipwreck Shipwreck is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 5 Shipwreck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 m 32 sec
Reputation Power: 0
Profile problem (PHP, mySQL, Javascript)

Hey everyone,

I've run into an issue on my most recent project; shantiyoga.ca, the instructors page glitches out maybe 1/10 times - I can't see the problem, but a refresh always seems to sort things out.

PHP Code:
<?php 
    $query 
"SELECT *
              FROM instructors
              ORDER BY instructor_name ASC"
;
              
    
$result mysql_query($query) or die (mysql_error());          
    
    while (
$row mysql_fetch_array($result)){
?>


    <div class="instructors">
    
        <!-- normal state -->
        
                <a class="instructor" href="javascript:;" onmousedown="toggleSlide(<?php echo $row['instructor_id'];?>);">
                
                    <p class="instructor_name">
                        <?php echo $row['instructor_name'];?>
                    </p>    
                        
                    <div id="instructor_thumb">
                    
                        <?php
                            
echo "<img src=\"$path_instructor_img".$row['instructor_smallimg']."\"/>";     
                        
?>
                    
                    </div><!--/instructor_thumb-->
                    
                 </a>
                
                
            <?php if(isset($_SESSION['admin'])){?>    
            
                <p class="manage_instructors">
                    <a href="index.php?id=admin_instructor_delete&postid=<?php echo $row['instructor_id'];?>">Delete</a>
                </p>
                
            <?php //session ?>                                    
                        

        <!-- expanded state -->    
                    
                <div id="<?php echo $row['instructor_id'];?>
                     style="display:none; 
                     overflow:hidden;
                                         
                     border-right: solid black 1px;
                     border-bottom: solid black 1px;
                     border-left: solid black 1px;
                                        
                     width: 535px; 
                     height: 335px;
                                                
                     margin: 0 auto;">
                
                                        
                        <div class="instructor_profile">
                                <?php echo $row['instructor_profile'];?>    
                        </div><!--/instructor_profile-->
                                
                                                
                        <div id="instructor_photo">
                            <?php
                                
echo "<img src=\"$path_instructor_img".$row['instructor_largeimg']."\"/>";     
                            
?>
                        </div><!--/instructor_photo-->
                
                </div><!--/dynamic-->

    </div><!--/instructors-->  
     

  <?php }//while ?>


I'm pretty new to working with multiple languages, and as a result my standards have gotten sloppy. I'd like to get this validating, but I'm running into two main issues: The div's are named after primary keys in the database, and i've got <p> and <div> within <a>.

Any guidance would be greatly appreciated, I'm at a loss as to why the page is randomly flailing - I figured I would start with validation

Reply With Quote
  #2  
Old June 21st, 2008, 02:16 AM
MrFujin's Avatar
MrFujin MrFujin is offline
Lord of the Dance
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Oct 2003
Posts: 1,273 MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level)MrFujin User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 h 59 m 56 sec
Reputation Power: 342
Quote:
Originally Posted by Shipwreck
I've run into an issue on my most recent project; shantiyoga.ca, the instructors page glitches out maybe 1/10 times - I can't see the problem, but a refresh always seems to sort things out.


sounds strange, I had a look with FF2 and IE7, there was no glitches.


Quote:
Originally Posted by Shipwreck
I'm pretty new to working with multiple languages, and as a result my standards have gotten sloppy. I'd like to get this validating, but I'm running into two main issues: The div's are named after primary keys in the database, and i've got <p> and <div> within <a>.

Any guidance would be greatly appreciated, I'm at a loss as to why the page is randomly flailing - I figured I would start with validation


that <a> should be a <DIV>.

but if you want to have code that follow the standard, I will suggest you validate your site at W3C Markup Validation Service

Reply With Quote
  #3  
Old June 21st, 2008, 12:44 PM
Shipwreck Shipwreck is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 5 Shipwreck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 m 32 sec
Reputation Power: 0
Well, my reasoning for using an <a> rather than <div> is because I want the whole box to be clickable, as opposed to just the name. <span> may be an alternative.

W3C validation is what I've been using, but I also find the built in validation through Dreamweaver to work in a pinch.

Thanks for the reply!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Profile problem (PHP, mySQL, Javascript)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT