We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,628 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

T_STRING error

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>
3
Contributors
2
Replies
3 Hours
Discussion Span
6 Months Ago
Last Updated
3
Views
hwoarang69
Posting Pro
569 posts since Feb 2012
Reputation Points: 6
Solved Threads: 0
Skill Endorsements: 7

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

blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12
$newname = "$pid.jpg" //Semi Colon ; missing. FIX IT! And Try Again
SagarSe7en
Junior Poster
141 posts since Jul 2011
Reputation Points: 10
Solved Threads: 4
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0614 seconds using 2.67MB