[PHP] Autoloading

2012-01-26 Thread Floyd Resler
I am using __autoload for my site which is conflicting with the autoloading of PHPExcel. I tried using spl_autoload_register thinking that might be the way to go but when I tried I got a cannot be redeclared error. I include my autoload script (include_once ../../lib/autoload.php;) and my

Re: [PHP] Re: sql injection protection

2012-01-26 Thread Haluk Karamete
when we do b64e and then back b64d, you are saying. we get the org input all as clear text but this time as a string. because it is now a string, (which by definition can not be executed) what's the difference between b64e+b64d vs (string) casting then? if you were to cast the original input into

[PHP] File upload in map drive with PHP

2012-01-26 Thread Mehmet YAYLA
Hello everyone, I've a question. I'm using map drive for file upload but dos'nt work. How can i do file upload map drive with php? Best Regards.

[PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Jim Giner
Do you mean you are trying to do an upload of a file on a mapped drive, such as a network drive? Is this upload using an html form with an input type=file tag? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Getting Column Names from an AS400 Database

2012-01-26 Thread Cheryl Sullivan
Can someone tell me why the following code: // $q = sprintf(SELECT * FROM DB#LIBNAME.TABLENAME); $conn = new COM (ADODB.Connection) or die(Cannot start ADO); $connStr = Provider=IBMDA400;Password=XX;User ID=;Data

Re: [PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Stuart Dallas
On 26 Jan 2012, at 15:10, Mehmet YAYLA wrote: I'm using code this bellow. ? if (!empty($_GET[upload])) { $uploaddir =x:\\file/; $uploadfile = $_FILES['userfile']['name']; print pre; if

Re: [PHP] Autoloading

2012-01-26 Thread Stuart Dallas
On 26 Jan 2012, at 14:44, Floyd Resler wrote: I am using __autoload for my site which is conflicting with the autoloading of PHPExcel. I tried using spl_autoload_register thinking that might be the way to go but when I tried I got a cannot be redeclared error. I include my autoload

Re: [PHP] Autoloading

2012-01-26 Thread Floyd Resler
On Jan 26, 2012, at 10:15 AM, Stuart Dallas wrote: On 26 Jan 2012, at 14:44, Floyd Resler wrote: I am using __autoload for my site which is conflicting with the autoloading of PHPExcel. I tried using spl_autoload_register thinking that might be the way to go but when I tried I got a

[PHP] Re: Getting Column Names from an AS400 Database

2012-01-26 Thread Jim Giner
I'm thinking that it should read $rs = $conn-execute($q); $outval = odbc_columns($rs, DB#LIBNAME, %, TABLENAME, %); You need to provide the results of the query to the odbc_columns, not the connection object. Just my guess since I've never used this. -- PHP General Mailing List

RE: [PHP] Re: Getting Column Names from an AS400 Database

2012-01-26 Thread Cheryl Sullivan
Thanks for your response... I changed the $outval line to $outval = odbc_columns($rs, DB#LIBNAME, %, TABLENAME, %); ...but still got the same error - Warning: odbc_columns() expects parameter 1 to be resource, object given in D:\WAMP\www\directory\filename.php on line 13 -Original

Re: [PHP] Re: Getting Column Names from an AS400 Database

2012-01-26 Thread Maciek Sokolewicz
On 26-01-2012 16:40, Cheryl Sullivan wrote: Thanks for your response... I changed the $outval line to $outval = odbc_columns($rs, DB#LIBNAME, %, TABLENAME, %); ...but still got the same error - Warning: odbc_columns() expects parameter 1 to be resource, object given in

RES: [PHP] Re: Getting Column Names from an AS400 Database

2012-01-26 Thread Alejandro Michelin Salomon
Cheryl: In the PHP Manual ; resource odbc_columns ( resource $connection_id [, string $qualifier [, string $schema [, string $table_name [, string $column_name ) Lists all columns in the requested range. Parameters connection_id The ODBC connection identifier, see odbc_connect() for

Re: [PHP] Re: sql injection protection

2012-01-26 Thread Maciek Sokolewicz
On 26-01-2012 15:46, Haluk Karamete wrote: when we do b64e and then back b64d, you are saying. we get the org input all as clear text but this time as a string. because it is now a string, (which by definition can not be executed) what's the difference between b64e+b64d vs (string) casting

Re: [PHP] Re: sql injection protection

2012-01-26 Thread Jim Lucas
On 01/26/2012 06:46 AM, Haluk Karamete wrote: when we do b64e and then back b64d, you are saying. we get the org input all as clear text but this time as a string. because it is now a string, (which by definition can not be executed) what's the difference between b64e+b64d vs (string) casting

Re: [PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Jim Lucas
On 01/26/2012 07:13 AM, Jim Giner wrote: You're using a GET in your script when your form is a POST. and if you look at the method value you will see that he is passing upload=1 in the URL. Which would be seen as a GET value. -- Jim Lucas http://www.cmsws.com/

Re: [PHP] Re: sql injection protection

2012-01-26 Thread Haluk Karamete
Re-read his example. He encodes the data in PHP. But decodes the data in SQL. So, if you echo the SQL statement, you would see a base64 encoded string that SQL then decodes. Got it this time! Up until reading your reply, I was reading Alex's example with my pseudo-code glasses. I did not