Jump to content

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.

Edited by scootstah
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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.