1,105,417 Community Members

T_STRING error

Member Avatar
hwoarang69
Posting Pro
572 posts since Feb 2012
Reputation Points: -4 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 9 [?]
 
0
 

Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\E-COMMERCE\admin\inventory_list.php on line 55

move_uploaded_file($_FILES['fileField']['tmp_name'], "../inventory_images/$newname");

what is t_string error?
here is almst full full.

<?php...

$sql = mysql_query("INSERT INTO products (product_name, price, details, category, subcategory, date_added)
VALUES('$product_name','$price','$details','$category','subcategory','details', now())")or die("insert error");

$pid = mysql_insert_id(); 
    $newname = "$pid.jpg"
    move_uploaded_file($_FILES['fileField']['tmp_name'], "../inventory_images/$newname");
    ...?

    <html>
    ....
    <form action="inventory_list.php" enctype="multipart/form-data" name="myForm" id="myForm" method="post">
     ...
                <input type="file" name="fileField" id="fileField"/>
                <input type="submit" name="button" id="button" value="add this item now">
    </form>
    ...
    </html>
Member Avatar
blocblue
Practically a Posting Shark
828 posts since Jan 2008
Reputation Points: 238 [?]
Q&As Helped to Solve: 162 [?]
Skill Endorsements: 16 [?]
Featured
 
0
 

You're missing a semi-colon at the end of line 2.

Member Avatar
SagarSe7en
Junior Poster
144 posts since Jul 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 0 [?]
 
0
 
$newname = "$pid.jpg" //Semi Colon ; missing. FIX IT! And Try Again
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article