[PHP] Re: file upload

2003-04-05 Thread Alexander Weber
Seems correct to me, try to upload the file with different browsers. Opera,
Netscape, M$. e.g. Rich Text could be: application/MSword, text/richtext,
and some other nice applications ;-)

Cheers,

Alex

Anders Thoresson [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Am I making any obvious mistakes here, in my upload script? I want to
 upload text-files only, they should end up in the directory from which the
 script is executed and be names __traningsmatcher.txt.

 HTML-form:

 FORM ENCTYPE=multipart/form-data METHOD=POST ACTION=store.php
 TABLE
 INPUT NAME=max_file_size TYPE=hidden VALUE=300
 TR
 TDFil: /TD
 TDINPUT NAME=userfile TYPE=file/TD
 /TR
 TR
 TD/TD
 TDINPUT TYPE=submit VALUE= skicka /TD
 /TR
 /TABLE
 /FORM


 And php, on the recieving end:
 ?php

 // check and validate uploaded file

 if($_FILES['userfile'] == none) {
 die(Problem: Ingen fil uppladdad.);
 }


 if($_FILES['userfile']['size'] == 0) {
 die(Problem: Filen är tom.);
 }

 if($_FILES['userfile']['type'] != text/plain) {
 die(Problem: Filen är inte en textfil.);
 }


 if(!is_uploaded_file($_FILES['userfile']['tmp_name'])) {
 die(Problem: Filen är inte uppladdad);
 }

 $upfile = __traningsmatcher.txt;

 if(!copy($_FILES['userfile']['tmp_name'], $upfile)) {
 die(Kunde inte spara filen);
 }

 echo(Filen är sparad!);


 ?

 --
 anders thoresson



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP or HTTPS

2003-04-05 Thread Alexander Weber
But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way is not
really secure.

Alex

Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 I usually just use $_SERVER['SERVER_PORT']

 -Rasmus

 On Sat, 5 Apr 2003, Alexander Weber wrote:

  Unfortunally is not set. It's like the variable does not exist, because
when
  I extract the varaible $_SERVER with foreach I don't get HTTPS as key,
only
  SERVER_PROTOCOL.
 
  I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
  register_globals OFF
  safe:mode OFF
 
  stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec 2002
 
  If you need more info:
 
  ICQ 46858764.
 
  Thanx
 
  Alex
 
  John W. Holmes [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
anybody knows how to find out the connection type (http or httpS)?
   Tried
out
$HTTP_SERVER_VARS.
  
   $_SERVER['HTTPS'] will be set if it's over HTTPS.
  
   ---John W. Holmes...
  
   PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
   today. http://www.phparch.com/
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP or HTTPS

2003-04-05 Thread Alexander Weber
So far so good, the next problem is now, that the port changes with every
new request. Tried this on my personal server an my hoster's one.

Perhaps there is another way? JScript, xml or anything other?

Thanx so far,

Alex


Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Presumably you know the HTTPS port on your server.  Anything not SSL is
 going to be straight HTTP.  The point here is that SSL happens a layer
 below PHP.  PHP doesn't care whether it is running over SSL or not.  In
 fact it has no idea what transport layer is below it.  So your only way to
 tell is to depend on whatever the web server tells you.  Look at a
 phpinfo() for both an SSL and a non-SSL request and see what the
 differences are on your server.  For me, checking SERVER_PORT has been the
 most portable/reliable mechanism.

 -Rasmus



 On Sat, 5 Apr 2003, Alexander Weber wrote:

  But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way is
not
  really secure.
 
  Alex
 
  Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
   I usually just use $_SERVER['SERVER_PORT']
  
   -Rasmus
  
   On Sat, 5 Apr 2003, Alexander Weber wrote:
  
Unfortunally is not set. It's like the variable does not exist,
because
  when
I extract the varaible $_SERVER with foreach I don't get HTTPS as
key,
  only
SERVER_PROTOCOL.
   
I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
register_globals OFF
safe:mode OFF
   
stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec
2002
   
If you need more info:
   
ICQ 46858764.
   
Thanx
   
Alex
   
John W. Holmes [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
  anybody knows how to find out the connection type (http or
httpS)?
 Tried
  out
  $HTTP_SERVER_VARS.

 $_SERVER['HTTPS'] will be set if it's over HTTPS.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your
  copy
 today. http://www.phparch.com/


   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: error while quering from MSSQL server from a Linux box

2003-04-05 Thread Alexander Weber
Tell us more about your script please.

Cheers, Alex


Dhaval [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Hi All,

 I m trying to build a drop down dynamically. I m quering fields from MSSQL
 2000 Server. Now look wat is happning when i run my php from a Win2K PC
and
 from a Linux Box.

 Linux Machine
 ABIDA PARVEEN
 AHMED HUSSAIN MOHD.HUSSAIN
 AHMED HUSSAIN,MOHAMMED HUSSAIN
 ANWAR USSAI
 ARVINDER SINGHOHAMMED HUSSA
 ASHA BHOSLEGHOHAMMED
 ASHA BHOSLE ,GHULAM ALIUSSAN
 ASHA BHOSLE,GHULAM ALIUSSAN
 ASHOK KHOSLAHULAM ALI
 ASHOK KHOSLA,SUMITA CHAKRABORTY SAME
 BEGUM AKHTAR UMITA CHAKRA
 BHUPINDER SINGHITA CHAKRAORT
 BHUPINDER SINGH, MITHALEE SINGHSAME
 BHUPINDER SINGH,MITALEEE SINGHSAME
 C.H. ATMASINGH,MI
 C.H.ATMASINGH,
 CHHAYA GANGULI,IALEEE SI
 CHITRA SINGHI,IALEE
 CHITRA SINGH,JAGJIT SINGHSIGHSAME
 DILRAAJ KAURJAGJIT SING


 Win 2K Server

 ABIDA PARVEEN
 AHMED HUSSAIN MOHD.HUSSAIN
 AHMED HUSSAIN,MOHAMMED HUSSAIN
 ANWAR
 ARVINDER SINGH
 ASHA BHOSLE
 ASHA BHOSLE ,GHULAM ALI
 ASHA BHOSLE,GHULAM ALI
 ASHOK KHOSLA
 ASHOK KHOSLA,SUMITA CHAKRABORTY SAME
 BEGUM AKHTAR
 BHUPINDER SINGH
 BHUPINDER SINGH, MITHALEE SINGH
 BHUPINDER SINGH,MITALEE
 C.H. ATMA
 C.H.ATMA
 CHHAYA GANGULI
 CHITRA SINGH
 CHITRA SINGH,JAGJIT SINGH
 DILRAAJ KAUR


 Values are getting cat after the original value. Can any one help in this.
 I have tried using both sybase and mssql functions the results are the
same.




 Regards
 Dhaval






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP or HTTPS

2003-04-05 Thread Alexander Weber
For sure, and this port changes every time I make a new request.

Alex

Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 No, the destination port will not change.  You must be looking at the
 source port.

 -Rasmus

 On Sat, 5 Apr 2003, Alexander Weber wrote:

  So far so good, the next problem is now, that the port changes with
every
  new request. Tried this on my personal server an my hoster's one.
 
  Perhaps there is another way? JScript, xml or anything other?
 
  Thanx so far,
 
  Alex
 
 
  Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
   Presumably you know the HTTPS port on your server.  Anything not SSL
is
   going to be straight HTTP.  The point here is that SSL happens a layer
   below PHP.  PHP doesn't care whether it is running over SSL or not.
In
   fact it has no idea what transport layer is below it.  So your only
way to
   tell is to depend on whatever the web server tells you.  Look at a
   phpinfo() for both an SSL and a non-SSL request and see what the
   differences are on your server.  For me, checking SERVER_PORT has been
the
   most portable/reliable mechanism.
  
   -Rasmus
  
  
  
   On Sat, 5 Apr 2003, Alexander Weber wrote:
  
But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way
is
  not
really secure.
   
Alex
   
Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 I usually just use $_SERVER['SERVER_PORT']

 -Rasmus

 On Sat, 5 Apr 2003, Alexander Weber wrote:

  Unfortunally is not set. It's like the variable does not exist,
  because
when
  I extract the varaible $_SERVER with foreach I don't get HTTPS
as
  key,
only
  SERVER_PROTOCOL.
 
  I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
  register_globals OFF
  safe:mode OFF
 
  stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31
Dec
  2002
 
  If you need more info:
 
  ICQ 46858764.
 
  Thanx
 
  Alex
 
  John W. Holmes [EMAIL PROTECTED] schrieb im
Newsbeitrag
  news:[EMAIL PROTECTED]
anybody knows how to find out the connection type (http or
  httpS)?
   Tried
out
$HTTP_SERVER_VARS.
  
   $_SERVER['HTTPS'] will be set if it's over HTTPS.
  
   ---John W. Holmes...
  
   PHP Architect - A monthly magazine for PHP Professionals. Get
your
copy
   today. http://www.phparch.com/
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP or HTTPS

2003-04-04 Thread Alexander Weber
Unfortunally is not set. It's like the variable does not exist, because when
I extract the varaible $_SERVER with foreach I don't get HTTPS as key, only
SERVER_PROTOCOL.

I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
register_globals OFF
safe:mode OFF

stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec 2002

If you need more info:

ICQ 46858764.

Thanx

Alex

John W. Holmes [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
  anybody knows how to find out the connection type (http or httpS)?
 Tried
  out
  $HTTP_SERVER_VARS.

 $_SERVER['HTTPS'] will be set if it's over HTTPS.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HTTP or HTTPS

2003-04-03 Thread Alexander Weber
Hi!

anybody knows how to find out the connection type (http or httpS)? Tried out
$HTTP_SERVER_VARS.

Thanx a lot!

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP or HTTPS

2003-04-03 Thread Alexander Weber
Hi Burhan,

sorry but this tells me only HTTP/1.1 but not if the connection
is secure or not.

Alex

Burhan Khalid [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Alexander Weber wrote:
  Hi!
 
  anybody knows how to find out the connection type (http or httpS)? Tried
out
  $HTTP_SERVER_VARS.
 
  Thanx a lot!
 
  Alex
 
 
 

 Try $_SERVER['SERVER_PROTOCOL']

 --
 Burhan Khalid
 phplist[at]meidomus[dot]com






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] variables??

2003-03-27 Thread Alexander Weber
Rick,

use explode to insert the array in the symbole table, then every get / post
(depend wich you explode) variable is available.

Alex


John W. Holmes [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Okay, true. But they key here is the act accordingly, meaning you
sanitize and validate the variable before using it anywhere.

Sometimes the way it's represented is that just using $_GET['var'] is
going to make things more secure than using $var, which is not the case
unless you know what exactly $_GET['var'] contains and how you're using
it.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 8:15 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] variables??

No, it is more secure. The problem with register_globals is that ALL
variables become global - not just the ones you want to be. Example:

if(something) $authorized = true;
if($authorized){
...do something requiring security...
}

A hacker could easily go to script.php?authorized=1, and gain access.
If you only allow one variable in that ($_GET['var']), you will know
that the variable is from an outside source, and can act accordingly.

John W. Holmes wrote:

It is considered more secure to declare the variable explicitly.

$var = $_GET[var];


Ummm... that's the same result as having register_globals on
(basically). You're not helping anything and it's certainly not any more
secure.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/


I'm having a problem with form data being recognized by a php

script.

If I send information with a GET the variable data appears in

$GET[var]

but not $var.  



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








--
The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to Return 403 Forbidden headers

2003-03-27 Thread Alexander Weber
For sure, has to be sent before any text and has to be part of a PHP script!

Alex

Matt Schroebel [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]


 -Original Message-
 From: Christopher Ditty [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 10:59 AM
 To: Matt Schroebel; [EMAIL PROTECTED]
 Subject: RE: [PHP] How to Return 403 Forbidden headers


 Thanks, but it returns a blank page.

Works for me in I.E 6.

?php
header('HTTP/1.0 403 Forbidden');
?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Importing emails

2003-03-27 Thread Alexander Weber
Alexis,

if the users data are informations about the user you can use this:
if you ar talking about files should use data upload instead.

you can start with the database. I dont know how many adresses and what more
you want to have in the DB.

1. create the DB (eg. mySQL),
2. design a FORM where the user can entry his datas
3. the script who enters the user data into the DB.

Alex

Alexis Antonakis [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Hi,

 I am trying to set up a system whereby users can send data, in a
 pre-determined format, to a specified email address. I would then like to
 import the contents within each email into a database.

 The trouble I'm having is not knowing really where to start. Could any
kind
 sole point me in the right direction. I've done a search of the site, but
 nothing has come up.

 Regards
 Alexis




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Secure coockie is not available as variable

2003-03-24 Thread Alexander Weber
hello,

I send a secure cookie an it should be available as varible

setcookie(pbas_usr, $row[usr], time()+600, , , 1);

but the varable is empty. If it send the header without secure flag the
cookie works well

setcookie(pbas_usr, $row[usr], time()+600);

Is there a special way to read out secure cookies?


THX,

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Charset problem with DBF database

2003-03-24 Thread Alexander Weber
Hello,

I have a DBF database with some ASCII characters like ALT+154 (Ü) etc.
I read out the database but instead of an Ü i get an s.
Tried out charsetconverting from/to ASCII, UTF-8/7 and ISO, but nothing gave
me the rigth letter.

Anybody an idea?

THX

Alex




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hashes in strings

2002-05-02 Thread Alexander Weber

Ferry van Steen wrote:
 while this one doesn't:
 str = I can NOT use $hash['vars'] in strings;

Try this one:

str = I can NOT use .$hash['vars']. in strings;

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] basename unix/windows

2002-04-25 Thread Alexander Weber

ROBERT MCPEAK wrote:
 basename(/usr/blah/doh/yuck/wow/abigfile.html)
 
 resolves to : abigfile.html
 
 but
 
 basename(adirectory\onawindowsbox\abigfile.html)
 
 does not resovle to abigfile.html.
 
 Does anybody have a workaround for this?
 
What about str_replace()?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Can anybody tell what is wrong with this file?

2002-03-12 Thread Alexander Weber

Balaji Ankem wrote:
It z not displaying the select box..blindly displaying in text
format.. (If u want to see open example.jpg)

You have to use form tags. select tags are invalid if they are not
within form tags.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and IBM DB2 / odbc_connect failed

2002-03-07 Thread Alexander Weber

Jerry wrote:
 I have IBM DB2 v7.2 FP5 on a Windows 2000 Server
 A Linux Web server running with Apache/PHP4 And IBM DB2 V7.2 Client Install
 on it.
 When I try to use odbc_connect($dbname, $user,$password);
 I received the message:
 
 Warning: SQL error: , SQL state ¿Ë ?=z@éÿ¿ÛË ?=z@?=z in SQLConnect in
 /svr/jerry/web/myphppage.php
 

We had a similar problem connecting to Adabas via ODBC. We installed a
newer Apache version and then it worked.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Text editor for linux

2002-02-17 Thread Alexander Weber

Josep Raurell wrote:
 
 Quoting Torkil Johnsen [EMAIL PROTECTED]:
 
  Anyone know of a good text editor for linux, WITH syntax highlighting for
  php/html + other languages?
 
  - TOrkil

vi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Correct URL's

2002-01-25 Thread Alexander Weber

Stefan Rusterholz wrote:
 
Part 1.1Type: Plain Text (text/plain)
Encoding: quoted-printable
 What was the best way to check, if the give address really exists?
Just try this function:

http://www.php.net/manual/en/function.gethostbyname.php

It returns the IP address of the given domain. Normally a domain can be
accessed by the browser if it has a valid IP address and everything is
configured correctly.

Please do not send HTML messages.

Alexander

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Correct URL's

2002-01-25 Thread Alexander Weber

Stefan Rusterholz wrote:
  http://www.php.net/manual/en/function.gethostbyname.php
 But if I understand this function right, It will only work for URLs like
 http://www.php.net/ - what if the user has a free space from his ISP which
 is located in a subdir like http://www.php.net/users/myhome/?

If you want to check subdirs you have to connect to the URL and look at
the response. 
You should use gethostbyname to check the domain (use some regular
expressions on the URL) and then try to connect to the server and send a
HTTP request (fsockopen and some other functions). 
Then you can check the response for error messages like 404.

Alexander

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP IDE

2002-01-25 Thread Alexander Weber

Rafael Perazzo B Mota wrote:
 
 Who knows a good Php IDE for linux, like PHP Code ?
 
Just have a look at www.activestate.com. They sell a product called
Komodo.


Alexander

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] FW: Array problem

2001-11-19 Thread Alexander Weber

Well, I tried the following script which works:
?php
$i = 0;
while ($i  5) 
{
$x[$i] = 1;
$i++;
}

$i = 0;
while($x[$i]) 
{
echo value .$i.: .$x[$i].br;
$i++;
}

?

but the following does not:

?php
//$i = 0;
while ($i  5) 
{
$x[$i] = 1;
$i++;
}

$i = 0;
while($x[$i]) 
{
echo value .$i.: .$x[$i].br;
$i++;
}

?
That is the same code as yours. It generates an array in the first while
loop and prints each value in the second one.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] MS SQL Server support

2001-11-19 Thread Alexander Weber

Daniel Persson wrote:
 
 I got this error message when using PHP 4.06 with MSSQL.
 
 PHP ERROR: PHP build incomplete: the prerequisite MS SQL Server support
 required to read the alert database
 was not built into PHP. Please recompile PHP with the necessary library
 (--enable-mssql).
 
 Is there anyone who knows what's wrong?
 
You need special software for connecting to MSSQL. Just have a look at
www.freetds.org
MSSQL and Sybase use a protocol called Tabular Data Stream to connect to
the server.
Install the software and then recompile it. Normally you have to use
--with-sybase=path-to-tds.
If there is an --enable-mssql it must be new to 4.0.6.

I have not tried it myself, but maybe someone else on this mailing list
did it already.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Copying into another table

2001-11-16 Thread Alexander Weber

_lallous wrote:
 
 Hello!
 
 Is there is anyway to copy from a table to another but by applying a filter?
 
 Example:
 
 SELECT * FROM table1 WHERE (condition)
 INSERT INTO table2 (the results of the last query)

Just try this one:
INSERT INTO table2 SELECT * FROM table1 WHERE (condition)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Re: Empty form variables when uploading, Help please???

2001-11-13 Thread Alexander Weber

The Big Roach wrote:
 
 In a form you can't really have 2 submit buttons.
 Either a submit submits or it is just a button.
 That's because the var name is already submit (check out your
 http_post_vars).
 And you have it twice!
 Change one of them and make it just a button (HTML4).
 Recheck your post-vars.
 This should help.

That's definetely not true. You can have more than one submit buttons in
a form. I often make formulars with more than one submit button, there
have not been any problems. 
You just have give a name and a value to your submit buttons. Then you
can check which one was pressed by the user.
For example:
...
input type=submit name=submit1 value=do this
input type=submit name=submit2 value=do that
...

Then just write:
if ($submit1 == do this)
...
else if ($submit2) == do that)
...

To [EMAIL PROTECTED]: 
Please post some code your formular action script (foto.php). Having
just the form, we can guess what went wrong.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Parse Error

2001-10-29 Thread Alexander Weber

Just use 

var $VAL_ID;

Names of variables always start with a $ sign.


Alberto wrote:
 
 Parse error: parse error, expecting `T_VARIABLE' in
 /sdr/httpd/Prisa/DATA/private/libs/captura/valores.php on line 18

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]