Results 1 to 4 of 4

Thread: Unexpected T_LNumber

  1. #1

    Thread Starter
    Lively Member tHa-gRiM's Avatar
    Join Date
    Sep 2005
    Posts
    126

    Unexpected T_LNumber

    I don't see whats wrong :-\

    New to Php coding also:

    Code:
    <!------ Start ------> 
    
    <center><h1>Policy Calculator</h1></center><Center>Don't use commas.<a name="mortgage"><table border=1  align=center><tr><td ><table align=center><tr><td valign="middle">
    <form action=<?php echo $_SERVER["PHP_SELF"] ."#mortgage" ?>>
    </td><td> 
    
    <br>
    Amount of Policy : <input  size=10 name="loan_amount" type="text" value=0 ><br>
     
    
    
    <?
    if ($loan_amount &le 99999)
    {
    	$total = ($loan_amount * .0575)
    	}  
    
    $payment = $total  ;
    echo "<br>";
    echo "Total Policy = $";
    echo round($payment);
    echo "<br>";
    
    }
    
    ?><br><center><input  name="calculate" value=Calculate type="submit"></center></form><br>
    </td></tr></table></td></tr></table>
    
    
     <!------ End ------>

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Unexpected T_LNumber

    Whats the "&le"? Are you tring to check if the $loan_amount is smaller than 99999? If so you need to use, <

  3. #3

    Thread Starter
    Lively Member tHa-gRiM's Avatar
    Join Date
    Sep 2005
    Posts
    126

    Re: Unexpected T_LNumber

    I tried <= 99999 and it still didnt read it, so my debugger has a button that did that, and it put in &le for me

  4. #4
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Unexpected T_LNumber

    try this, you were missing a ';' from the end of your statement anyway.
    PHP Code:
    if ($loan_amount <= 99999)
    {
        
    $total = ($loan_amount .0575);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width