Jump to content

Can't see the error


snowdog

Recommended Posts

I cannot see the error for the life of me. I know it is going to be a simple one. Always is when I cant see it. Here is the error

 

Parse error: syntax error, unexpected $end in /var/www/vhosts/bookawrs.com/httpdocs/lot.php on line 138

 

and the code

 

<?

include("include/db_connect.php");
session_start();

include("header.php");
include("search.php");
include("top_menu.php");
include("left_menu.php");

?>
<div class="maincontent">
   <div class="breadcrumbs">
    <a href="dashboard.html">Dashboard</a>
       <span>Table Styling</span>
   </div><!-- breadcrumbs -->
   <div class="left">
       <h1 class="pageTitle">Table Styling</h1>
<?
if($_SESSION['dealer_id'] != 0)
{
if(isset($_SESSION['dealer_id'])){
{
 echo(" I AM HERE IN DEALER SECTION");
 $dealer_id = $_SESSION['dealer_id'];
}


}
else
{
// This is an Franchise, get the list of dealers


$franchise_id = $_SESSION['franchise_id'];


$SQL = "SELECT * FROM dealers WHERE franchise_id = $franchise_id ORDER BY name ASC";
$result = mysql_query($SQL) or die(mysql_error());


?>
 <select>
  <option>Select Dealer</option>
<?	  

while($run = mysql_fetch_array($result))
{


?>

  <option value = "<?php echo $run['id'];?>"><?php echo $run['name'];?></option>	



<?
}
?> </select>  <?
}
?>

       <div class="sTableOptions">
        <h4>Cars on Lot</h4>             
       </div><!--sTableOptions-->
       <table cellpadding="0" cellspacing="0" class="sTableHead" width="100%">
        <colgroup>
               <col class="head1" width="25%" />
               <col class="head0" width="25%" />
               <col class="head1" width="15%" />
               <col class="head0" width="10%" />
               <col class="head1" width="10%" />
               <col class="head0" width="15%" />
           </colgroup>
           <tr>
               <td>Vin Numner</td>
               <td>Year Model</td>
               <td>Left Front</td>
               <td>Right Front</td>
               <td>Left Rear</td>
               <td>Righ Rear</td>
           </tr>
       </table>

       <div class="sTableWrapper">
           <table cellpadding="0" cellspacing="0" class="sTable" width="100%">
               <colgroup>
                   <col class="con1" width="25%" />
                   <col class="con0" width="25%" />
                   <col class="con1" width="15%" />
                   <col class="con0" width="10%" />
                   <col class="con1" width="10%" />
                   <col class="con0" width="15%" />
               </colgroup>
<?


// Get the cars that are on the lot from the dealer being called


$SQL = "SELECT * FROM lot WHERE franchise_id = $franchise_id and dealer_id = $dealer_id ORDER BY date ASC";
$result = mysql_query($SQL) or die(mysql_error());


while($run = mysql_fetch_array($result))
{
?>
 <tr><td><?php echo $run['vinNumber'];?></td><td><?php echo $run['carYear'];?> $nbsp;<?php echo $run['carModel'];?></td><td><img src="">pic 1</td><td><img src="">pic 2</td><td><img src="">pic 3</td><td><img src="">pic 4</td></tr>
<?
}
?>

           </table>
     </div><!--sTableWrapper-->

        <br />








   </div><!--left-->

   <br clear="all" />

</div><!--maincontent-->



<?


include("footer.php");


?>

Link to comment
https://forums.phpfreaks.com/topic/274423-cant-see-the-error/
Share on other sites

You use an FTP application as a text editor? Huh?

 

I use PHPStorm for projects and Sublime Text 2 for small stuff or quick edits. Neither are free, both are well worth the money.

 

If you want free, Eclipse with PHP Developer Tools is a good IDE, and Notepad++ (on Windows) is a decent text editor. If you're on a Mac or Linux you could try Emacs.

 

EDIT: By the way, most decent text editors have built in FTP support. But, working directly on the live server like that is not the best of ideas.

Link to comment
https://forums.phpfreaks.com/topic/274423-cant-see-the-error/#findComment-1412141
Share on other sites

I don't mind paying if it is good. I see it has a 30 day trial, will give it a shot thanks. I am self taught and need to update my coding skills now with the new release of php for sure. Thanks for all of your help. I will be posting another problem I am having as I cannot find the proper way to do this so check it out :)

Link to comment
https://forums.phpfreaks.com/topic/274423-cant-see-the-error/#findComment-1412142
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.