Current location: Hot Scripts Forums » Programming Languages » PHP » unexpected T_LNUMBER, expecting T_VARIABLE or '$'


unexpected T_LNUMBER, expecting T_VARIABLE or '$'

Reply
  #1 (permalink)  
Old 07-01-09, 09:24 AM
markbanker markbanker is offline
New Member
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
unexpected T_LNUMBER, expecting T_VARIABLE or '$'

I cannot see anything wrong here. Please take a look and see if you can detect why I am getting this 'Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' ' on line 42

Thank you!

The a section of the submitting form is listed first, then the script that has the error:
PHP Code:

<tr>
    <td>Total Violations:</td>
    <td><input type="text" name="violations" id="violations" tabindex="29"/></td>
    <td colspan="3">&nbsp;</td>
    <td>Critical Violations:</td>
    <td colspan="5"><input type="text" name="criticals" id="criticals" tabindex="30"/></td>
    <td>Criticals Corrected:</td>
    <td colspan="6"><input type="checkbox" name="criticals_corrected" id="criticals_corrected" tabindex="31"/></td>
    </tr>
  <tr>
    <td width="54">2-1</td>
    <td width="54"><input type="checkbox" name="2-1" id="2-1" tabindex="32"/></td>
    <td width="54">2-3</td>
    <td width="54"><input type="checkbox" name="2-3" id="2-3" tabindex="33"/></td>
    <td width="54">2-4</td>
    <td width="54"><input type="checkbox" name="2-4" id="2-4" tabindex="34"/></td>
    <td width="54">3-1</td>
    <td width="54"><input type="checkbox" name="3-1" id="3-1" tabindex="35"/></td>
    <td width="54">3-2</td>
    <td width="54"><input type="checkbox" name="3-2" id="3-2" tabindex="36"/></td>
    <td width="54">3-3</td>
    <td width="54"><input type="checkbox" name="3-3" id="3-3" tabindex="37"/></td>
    <td width="54">3-4</td>
    <td width="54"><input type="checkbox" name="3-4" id="3-4" tabindex="38"/></td>
    <td width="54">3-5</td>
    <td width="54"><input type="checkbox" name="3-5" id="3-5" tabindex="39"/></td>
    <td width="54">3-6</td>
    <td width="54"><input type="checkbox" name="3-6" id="3-6" tabindex="40"/></td>
  </tr>



################################################

<?php
$con 
mysql_connect ("myserver","myuser","mypassword");
if (!
$con)
    {
    die(
'could not connect: ' mysqli_error());
     }
mysqli_select_db("goodFood"$con);
     

$permit_no=$_POST['permit_no'];
$rest_name=$_POST['rest_name'];
$owner=$_POST['owner'];
$street=$_POST['street'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
$day_of_insp=$_POST['day_of_insp'];
$month_of_insp=$_POST['month_of_insp'];
$year_of_insp=$_POST['year_of_insp'];
$fiscal_year=$_POST['fiscal_year'];
$quarter=$_POST['quarter'];
$re_insp_date=$_POST['re_insp_date'];
$sanitarian=$_POST['sanitarian'];
$level=$_POST['level'];
$area=$_POST['area'];
$lc=$_POST['lc'];
$temp=$_POST['temp'];
$notice=$_POST['notice'];
$closure=$_POST['closure'];
$reg_insp=$_POST['reg_insp'];
$follow_up=$_POST['follow_up'];
$invoice_mailed=$_POST['invoice_mailed'];
$mailed_date=$_POST['mailed_date'];
$ciai=$_POST['ciai'];
$ciai_violations=$_POST['ciai_violations'];
$ciai_notice=$_POST['ciai_notice'];
$ciai_corrected_yes=$_POST['ciai_corrected_yes'];
$ciai_corrected_no=$_POST['ciai_corrected_no'];
$violations=$_POST['violations'];
$criticals=$_POST['criticals'];
$criticals_corrected=$_POST['criticals_corrected'];
$
2_1=$_POST['2-1'];   // line 42
$2_3=$_POST['2-3'];
$
2_4=$_POST['2-4'];
$
3_1=$_POST['3-1'];
$
3_2=$_POST['3-2'];
$
3_3=$_POST['3-3'];
$
3_4=$_POST['3-4'];
$
3_5=$_POST['3-5'];
$
3_6=$_POST['3-6'];
$
3_7=$_POST['3-7'];
$
3_8=$_POST['3-8'];
$
4_1=$_POST['4-1'];
$
4_2=$_POST['4-2'];
$
4_3=$_POST['4-3'];
$
4_4=$_POST['4-4'];
$
4_5=$_POST['4-5'];
$
4_6=$_POST['4-6'];
$
4_7=$_POST['4-7'];
$
4_8=$_POST['4-8'];
$
4_9=$_POST['4-9'];
$
5_1=$_POST['5-1'];
$
5_2=$_POST['5-2'];
$
5_3=$_POST['5-3'];
$
5_4=$_POST['5-4'];
$
5_5=$_POST['5-5'];
$
6_1=$_POST['6-1'];
$
6_2=$_POST['6-2'];
$
6_3=$_POST['6-3'];
$
6_4=$_POST['6-4'];
$
6_5=$_POST['6-5'];
$
7_1=$_POST['7-1'];
$
7_2=$_POST['7-2'];
$
7_3=$_POST['7-3'];
$
8_1=$_POST['8-1'];
$
8_2=$_POST['8-2'];
$
8_3=$_POST['8-3'];
$
8_4=$_POST['8-4'];
$time_in_am=$_POST['time_in_am'];
$time_in_pm=$_POST['time_in_pm'];
$after_hours=$_POST['after_hours'];
$remarks=$_POST['remarks'];

Last edited by Nico; 07-01-09 at 09:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-01-09, 09:31 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Variable names cannot begin with numbers. Change the names to something else...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-01-09, 09:40 AM
markbanker markbanker is offline
New Member
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you, Nico. I read that earlier and I thought...it doesn't begin with a number, it begins with a '$'. Have a great day!

Mark
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
expecting t_variable, unexpected t_lnumber


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
desoerate for help!!! Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting '] JavierVT PHP 7 09-07-08 09:31 PM
[Newbies]Parse error: syntax error, unexpected '(', expecting T_STRING pakdoz PHP 4 10-23-07 03:07 PM
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING o cpmross PHP 39 07-11-07 01:00 PM
Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or Dr. Forensics PHP 3 09-13-06 07:21 AM
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' Dr. Forensics PHP 3 07-15-06 04:54 PM


All times are GMT -5. The time now is 09:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.