Question : insert values in php

hello,

i have post file name by:

$file=$_POST['file'];

now i want to use it like this:

$fileaddress==(upload/$file);

mean if file address is sample.xls
then it complete file address read by $fileaddress== upload/sample.xls


but it shows error "Division by zero"

Answer : insert values in php

Thats certainly an improvement... now you just need to step through the code and find which object is null and work out why.

Actually I think I see the problem, you appear to be using a mix of OleDb and Sql - you've created an OleDb connection and then asked it to give you a command - which it will, an OleDbCommand - but then you're tried to cast it to an SqlCommand which won't work.

You need to decide whether you're working on OleDb or native Sql Server and then ensure your code is consistent with your choice.
Random Solutions  
 
programming4us programming4us