parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$'

Discussion in 'MySQL' started by antonio12, Apr 21, 2008.

  1. #1
    To all MYSQL/SQL GURUS:

    I am getting this error and I am not sure how to deal with it. Please help!!

    Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/testthis2.php on line 10


    Here is the beginning my script:
    <html>
    <head>
    <title>Birthdays Insert Record</title>
    </head>
    <body>
    <?php
    $store_id=$_POST['store_id'];
    $store_name=$_POST['store_name'];
    $categories=$_POST['categories'];
    $17=$_POST['17']; <------------------ THIS IS LINE 10 ---------------->
    $43=$_POST['43'];
    $44=$_POST['44'];
    $45=$_POST['45'];
    $46=$_POST['46'];
    $47=$_POST['47'];
    $15=$_POST['15'];
    $52=$_POST['52'];
    $53=$_POST['53'];
    $54=$_POST['54'];

    Can you please guide me on what I am doing wrong.

    Thank you,

    Antonio
     
    antonio12, Apr 21, 2008 IP
  2. antonio12

    antonio12 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I also wanted to add the page where the data is getting posted from (the form itself)

    here is that code:

    <table width="420" cellpadding="5" cellspacing="0" border="2">
    <tr align="center" valign="top">
    <td align="left" colspan="1" rowspan="1" bgcolor="#FFFFFF">
    <h3>Insert Record <a href="display.php">Display result </a></h3>
    <form method="POST" action="testthis2.php">
    <input type="hidden" name="username" value="">
    Enter Store ID: <input type=text name=store_id size=10><br>
    Enter Store Name: <input type=text name=store_name size=20><br>
    Select Items: <BR>
    <input type="text" size="1" MAXLENGTH="1" name='17'>Cars & Automobiles<BR>
    <input type="text" size="1" MAXLENGTH="1" name='43' >Cars & Automobiles > Cars & Trucks<BR>
    <input type="text" size="1" MAXLENGTH="1" name='44'>Cars & Automobiles > Motorcycles<BR>
    <input type="text" size="1" MAXLENGTH="1" name="45" >Cars & Automobiles > Parts & Accessories<BR>
    <input type="text" size="1" MAXLENGTH="1" name="46" >Cars & Automobiles > Rentals<BR>
    <input type="text" size="1" MAXLENGTH="1" name="47" >Cars & Automobiles > Tools & Supplies<BR>
    <input type="text" size="1" MAXLENGTH="1" name="15" >Books & Magazines<BR>
    <input type="text" size="1" MAXLENGTH="1" name="52" >Books & Magazines > Audio Books<BR>
    <input type="text" size="1" MAXLENGTH="1" name="53" >Books & Magazines > Books<BR>
     
    antonio12, Apr 21, 2008 IP
  3. Randombase

    Randombase Peon

    Messages:
    224
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    A variable can't start with a number, you should rename it to (for example):
    $a17=$_POST['17']; <------------------ THIS IS LINE 10 ---------------->
    Code (markup):
     
    Randombase, Apr 21, 2008 IP
  4. antonio12

    antonio12 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Genius, pure genius :) - that worked!!! - thank you very much!!!
     
    antonio12, Apr 21, 2008 IP
  5. Trinket

    Trinket Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Below is the error that I receive:

    Parse error: parse error, unexpected T_LNUMBER on line 62



    Below is the php script:


    <?PHP
    //Modify your data in this section
    //----------------------------------------------------------------------------------
    $username = "goddy"; // Admin username
    $password = "kennel"; // Admin password
    //----------------------------------------------------------------------------------

    //----------------------------------------------------------------------------------

    //First, define the modules you want to be displayed : Google, Yahoo, Amazon and the number of news displayed
    $show_google = "1"; // Show google ads ?
    $show_yahoo ="0"; //Show yahoo ads? WARNING : Be sure not to have both show_google and show_yahoo enabled
    $show_amazon = "1"; // Show Amazon feed ?
    $_numResults ="5"; // Number of news displayed in each page
    $_linksResults = "5"; // Number of links on links pages
    $use_privacy_policy = "1"; // Enable privacy policy page?
    $use_terms_of_service = "1"; // Enable TOS page?
    $use_contact_page = "1"; // Enable contact page?
    $use_top_links = "1"; // Enable links page?
    $use_products = "1"; // Enable recommended products?
    $use_image_rotation = "1"; // Enable image rotation?

    //-----------------------------------------------------------------------------------

    // Configuration of your local installation and personal site definitions
    $templatefoldername="includes"; //folder where templates are installed relative to the DocumentRoot.
    $mysitename = "biggydaddy"; //name for your site
    $mainkeyword = "biggydaddy"; //primary site keyword

    //-----------------------------------------------------------------------------------

    // your personnal affiliate ID in the following programs
    $adsense_pub = "pub-56156429875626"; //your adsense publisher code
    $adsense_channel = ""; // adsense channel
    $yahoo_pub =""; // your Yahoo Publisher code YPN
    $yahoo_channel=""; // your Yahoo channel
    $Aassociates_id=array(
    'uk' => 'INVALID' , // <-- replace INVALID with your amazon.co.uk associate ID
    'us' => 'some-20' ,// <-- replace INVALID with your amazon.com associate ID
    );
    $num_amazon = "5"; //Max number of amazon products to return
    //-------------------------------------------------------------------------------------

    ?>
     
    Trinket, May 2, 2008 IP
  6. Randombase

    Randombase Peon

    Messages:
    224
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Line 62? The code you posted has only 44 lines..
     
    Randombase, May 3, 2008 IP
  7. Trinket

    Trinket Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You are correct. I am not sure why that is the error I received. I also checked and found out that it is not the amount of lines to get to 62 lines as the error mentioned.

    But can you see anything wrong with this code? I have been racking my mind because of the line 62 stuff and the other error code itself.

    Can you help me anyway?

    Appreciate it
     
    Trinket, May 3, 2008 IP