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
Should Sys Admins (Domain Admins) also have user accounts?
Forefront 2010 URL Filtering
PHP 5.3.2 installation problem on Vista IIS7
Rundll error error loading F3SCRCTR.DLL
configuring asa to PAT port 9191 to 9100
How can I handle dbNull in Linq?
Popup window keeps coming..after clicking Browser Back
Problem getting the Selected value of a CheckBoxList (used in a gridview)
CISCO UC520 - IP Phones & Computers on different ip ranges.
SQL 2005 SQL Syntax Help Needed