i am not sure what i did but i messed up my page. take a look at page and you will see the problem. it puting php code in a echo"";. i cant seem to find where the problem.

<!-- Connect -->
<?php
    session_start(); //for errors
    include("../../INCLUDE/header.php");
?>


<!-- top menu and image-->
<div id = 'bg_middle2'>
    <div class = 'apparel_top_title'>
        <h3><a href='../../index.php'>Home</a> > <a href='apparel.php'>Apparel</a></h3> 
    </div>
    <div id = 'male_image_wrapper'>
        <img src='../../IMAGE/menu_graphics/apparel.png'>
    </div>  <hr id='hr'/>
</div>      





    <div id = 'apparel_content_page_wrapper'>
        <div id='apparel_form'><br/>
        <form action='apparel.php' method='POST'>
              <label>Sort By:</label> 
               <select  name="order_by">
                  <option value="">Choose...</option>
                  <option value="title">Title</option>
                  <option value="newest">Newest</option>
                  <option value="oldest">Oldest</option>
                  <option value="most_popular">Most Popular</option>
                  <option value="low_heigh">Price: Low to Heigh</option>
                  <option value="heigh_low">Price: Height to Low</option>
                </select>


                        <button type="submit" id="male_button" class="small_button" name="apparel_button">go</button>

            </form><br/>
        </div><!-- apparel_form -->




       <?
        echo"
    <div id = 'index_content_page_wrapper'>
            <br/> <br/>
            <table>
                <tr'>
        ";

                /*** display images ***/
                //$user_name_c = $_COOKIE['username'];

                 if(isset($_POST['apparel_button'])) //if user hit submit button 
                 {
                     $order_by_p  = $_POST['order_by'];

                     if($order_by_p == 'title')
                     {
                          $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY image_user_name LIMIT 8");
                     }
                     else if($order_by_p == 'newest')
                     {
                        $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY item_add_date DESC LIMIT 8"); 
                     }
                     else if($order_by_p == 'oldest')
                     {
                        $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY item_add_date ASC LIMIT 8"); 
                     }
                      else if($order_by_p == 'most_popular')
                     {
                        $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY sold DESC LIMIT 8"); 
                     }
                     else if($order_by_p == 'low_heigh')
                     {
                         $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY price ASC  LIMIT 8");
                     }
                     else if($order_by_p == 'heigh_low')
                     {
                        $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY price DESC LIMIT 8");
                     }
                     else
                     {
                          $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY id DESC  LIMIT 8");
                     }
                 }
                else
                {
                     $male_query = mysql_query("SELECT * FROM item WHERE main_category='Apparel' ORDER BY id DESC  LIMIT 8");
                }

                $count = 0;
                while($row = mysql_fetch_assoc($male_query))
                {   
                    $image_user_name_db = $row['image_user_name'];
                        $image_user_name_db = ucwords($image_user_name_db);   // upper case begining of every word
                    $image_folder_name_db = $row['image_folder_name'];
                    $price_db = $row['price'];
                        $price_db = number_format($price_db, 2); //2 decimal. ex (1.0, 1)= 1.00


                    echo"<td >";

                        echo"<img src='http://localhost/E_COMMERCE/IMAGE/STORE_ITEMS_DB/$image_folder_name_db' width='150' height='150'/> <br/>";
                        echo"<p id='name'>$image_user_name_db</p>";
                        echo"<p id='price'>Our Price $$price_db</p>";

                    echo "</td>";

                     $count++;
                     if($count == 4)       //3 cols
                     {
                        echo "</tr><tr>"; // Start a new row at 3 cols
                      $count = 0;
                    }
                }//end of while loop


        echo"
            </tr>
        </table></div>
        ";

    ///////////////////////////////
    /****** pagination **********/
    ///////////////////////////////
    echo"
        <br/><br/>
        <div id='load'>
            <button type='submit' id='load_button' class='button'>Load 6 more items</button> 
        </div>
        <br/><br/>
    </div> "; //end of index_content_page_wrapper

?>


    </div>




<?php
//echo nl2br($features_db); //takes \n from textarea
?>


<!-- FOOTER -->
<?php
    include("../../include/footer.php");
?>

Recommended Answers

All 2 Replies

Double check your file extension.. or double check if your server supports short tags..My reasoning behind the short tags may not be allowed in your server is that, the only php codes showing on your screen shots are the part of your codes below the short tags.

awww i have <?...
but i shoul have put
<?php...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.