Microsoft
Software
Hardware
Network
Question : insert variable in php
I have a code which insert excel file data to database.
but in this code, i have to give address of excel file like this:
// initialize reader object
$excel = new Spreadsheet_Excel_Reader()
;
// read spreadsheet data
$excel->read('Book1.xls');
its work right but
now i want to make it form method through which i can browse and insert variable.
i have tried this:
$excelfile = $_POST['filename'];
// initialize reader object
$excel = new Spreadsheet_Excel_Reader()
;
// read spreadsheet data
$excel->read('$excelfile')
;
but it shows error "The filename $excelfile is not readable"
Answer : insert variable in php
Remove quotes
// read spreadsheet data
$excel->read($excelfile
);
Random Solutions
How can i do insert more data with insert query with more select statment linqToSQL?
How to compress a string into a short representation in ASP.NET using C# or VB.NET?
Asp.Net profile information in SQL view
Add Mirror Greyed Out
SqlDataAdapter InsertCommand not updating primary key value in dataset
Difference between SSID and BSSID
How to get an USB speaker to work with Eee PC 900 Xandros Linux
XenServer 5.5 The Storage repository is not available.
VB.Net 2008 Problem passing data between forms
Font Question