Re: [PHP-DB] https

2001-10-22 Thread George Lioumis

I think that you MUST retype the whole URL.

George.

- Original Message - 
From: J-E-N [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 20, 2001 2:22 PM
Subject: [PHP-DB] https


hello,

how can i switch from http to https without typing the whole url?

thanks



-- 
PHP Database 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-DB] https

2001-10-22 Thread Beau Lebens

you mean to use for some sort of header redirect or something?

couldn't you do

1. click link change to secure mode
2. pass the url you just came from with the link (or get it from
HTTP_REFERRER or whatever it is)
3. header(Location:  . str_replace(http://;, https://;, $last_url));

or am i missing the point of what you want to do?

HTH

/beau

// -Original Message-
// From: George Lioumis [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 22 October 2001 2:52 PM
// To: PHP Mailing List
// Subject: Re: [PHP-DB] https
// 
// 
// I think that you MUST retype the whole URL.
// 
// George.
// 
// - Original Message - 
// From: J-E-N [EMAIL PROTECTED]
// To: [EMAIL PROTECTED]
// Sent: Saturday, October 20, 2001 2:22 PM
// Subject: [PHP-DB] https
// 
// 
// hello,
// 
// how can i switch from http to https without typing the whole url?
// 
// thanks
// 
// 
// 
// -- 
// PHP Database 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 Database 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-DB] PHP and Oracle

2001-10-22 Thread Michiel_Lange


You use // to  comment, that is quite fine, but it could be that I can't
see the layout of the file rightly, but when I opened the file it looked
like this:

// echo (
; // echo ...

etc...
that won't work if you want to comment a block out you can much better
use this kind of commenting out:
/*
 echo ( );
 echo (blah);
*/

check out if that works...

Met vriendelijke groet,

Michiel Lange
ActuEra B.V.


   

GEORGINA   

ELAINE BAILEYTo: [EMAIL PROTECTED]  

[EMAIL PROTECTED]   cc:   

.uk Fax to:   

 Subject: [PHP-DB] PHP and Oracle  

19-10-2001 

19:26  

   

   





Can anyone tell me why my results will display when I just use text, but
won't display when I try to put them into a table. I keep getting a message
saying there is a parse error on line 50 of my script, but as far as I acn
see, line 50 is commented out.

Georgina(See attached file: search1.php4)(See attached file: search1.html)

--
PHP Database 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 Database 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-DB] Asigning function values to variables??

2001-10-22 Thread Russ Michell

Not entirley sure what you're trying to do but, if the '.box_header' and '.box_footer' 
are css 
classes, then it won't show up in people's text-only email.

if not then try removing the second periods '.'
so i tlooks like:

$body .= box_header('test').;
$body .= h1text/h1;
$body .= box_footer().;

HTH
Russ


$body .= .box_header('test').;
$body .= h1text/h1;
$body .= .box_footer().;
On Sun, 21 Oct 2001 20:06:55 +0200 Luditus [EMAIL PROTECTED] wrote:

 Hi there,
 
 I am trying to send an email with html tags coming from functions.
 Something is wrong with asigning the value to the variable. I guess I don't
 know the proper syntax.
 
 Can anybody help me out?
 
 e.g.:
 
 $body .= .box_header('test').;
 $body .= h1text/h1;
 $body .= .box_footer().;
 
 
 Thanx in advance
 
 Luditus
 
 
 
 
 -- 
 PHP Database 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]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database 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-DB] How to write errorhandling??

2001-10-22 Thread Dobromir Velev

Hi,
I see that everybody is looking for the error in the header function - but
the error actually is that Luditus is trying to use mail on a Windows box
with no SMTP server on it.
It is possible to suppress the mail function output using @mail, but it
won't fix the problem - if you want to use mail function on a WIN machine
you'll need a sendmail like program and you will have to adjust the
sendmail_path variable in your PHP configuration.

HTH
Dobromir Velev

-Original Message-
From: Luditus [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Sunday, October 21, 2001 1:41 PM
Subject: [PHP-DB] How to write errorhandling??


Hi Fokes,

I would like to send an mail via the mail function.

If the mail failes I would like to redirect to an errorpage. Currently my
code looks like this:

 if ( mail($email,$subject_confirm_account, $message_confirm_account,
$from_confirm_account) ){
  HEADER(Location:index.php?fuseaction=txtmsg=registered);
file://success
 }
 else{
  HEADER(Location:index.php?fuseaction=txtmsg=mailproblem); // mail
could
not been sent
 };

Unfortunatelly I get an erromessage like that:

Warning: Failed to Connect in
e:\projects\globosapiens\07_production\actual\account\include\user.php on
line 256

Warning: Cannot add header information - headers already sent by (output
started at
e:\projects\globosapiens\07_production\actual\account\include\user.php:256)
in e:\projects\globosapiens\07_production\actual\account\include\user.php
on
line 260

Where is the problem??? I can't see it.

Maybe one of you guys could help me out.

Thanx in advance,

Luditus



--
PHP Database 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 Database 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-DB] How to write errorhandling??

2001-10-22 Thread Andrey Hristov

That's correct. I've seen a discussion on dev phorum about embeding SMTP code 
in PHP, but as I remember the final decision was that SMTP code will stay 
outside of PHP code.



-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com

On Monday 22 October 2001 06:46 am, you wrote:
 Hi,
 I see that everybody is looking for the error in the header function - but
 the error actually is that Luditus is trying to use mail on a Windows box
 with no SMTP server on it.
 It is possible to suppress the mail function output using @mail, but it
 won't fix the problem - if you want to use mail function on a WIN machine
 you'll need a sendmail like program and you will have to adjust the
 sendmail_path variable in your PHP configuration.

 HTH
 Dobromir Velev

 -Original Message-
 From: Luditus [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Sunday, October 21, 2001 1:41 PM
 Subject: [PHP-DB] How to write errorhandling??

 Hi Fokes,
 
 I would like to send an mail via the mail function.
 
 If the mail failes I would like to redirect to an errorpage. Currently my
 code looks like this:
 
  if ( mail($email,$subject_confirm_account, $message_confirm_account,
 $from_confirm_account) ){
   HEADER(Location:index.php?fuseaction=txtmsg=registered);

 file://success

  }
  else{
   HEADER(Location:index.php?fuseaction=txtmsg=mailproblem); // mail

 could

 not been sent
  };
 
 Unfortunatelly I get an erromessage like that:
 
 Warning: Failed to Connect in
 e:\projects\globosapiens\07_production\actual\account\include\user.php on
 line 256
 
 Warning: Cannot add header information - headers already sent by (output
 started at
 e:\projects\globosapiens\07_production\actual\account\include\user.php:256
 ) in
  e:\projects\globosapiens\07_production\actual\account\include\user.php

 on

 line 260
 
 Where is the problem??? I can't see it.
 
 Maybe one of you guys could help me out.
 
 Thanx in advance,
 
 Luditus
 
 
 
 --
 PHP Database 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 Database 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-DB] How to write errorhandling??

2001-10-22 Thread DL Neil

Luditus/Dobromir,
It IS possible to run the mail function on a Win machine - I had a Win2000/IIS(with 
its own SMTP stub) box running PHP
mail happily.
Also it is possible to have a Win-with-no-local-SMTP configuration. I have re-jigged 
my WinNT portable to run the same
PHP/Apache script connecting directly to my ISP's SMTP server (in part using the path 
var mentioned).
I haven't tried to combine email with 'headers' though!
...if that's the problem...
=dn


 Hi,
 I see that everybody is looking for the error in the header function - but
 the error actually is that Luditus is trying to use mail on a Windows box
 with no SMTP server on it.
 It is possible to suppress the mail function output using @mail, but it
 won't fix the problem - if you want to use mail function on a WIN machine
 you'll need a sendmail like program and you will have to adjust the
 sendmail_path variable in your PHP configuration.

 Hi Fokes,
 
 I would like to send an mail via the mail function.
 
 If the mail failes I would like to redirect to an errorpage. Currently my
 code looks like this:
 
  if ( mail($email,$subject_confirm_account, $message_confirm_account,
 $from_confirm_account) ){
   HEADER(Location:index.php?fuseaction=txtmsg=registered);
 file://success
  }
  else{
   HEADER(Location:index.php?fuseaction=txtmsg=mailproblem); // mail
 could
 not been sent
  };
 
 Unfortunatelly I get an erromessage like that:
 
 Warning: Failed to Connect in
 e:\projects\globosapiens\07_production\actual\account\include\user.php on
 line 256
 
 Warning: Cannot add header information - headers already sent by (output
 started at
 e:\projects\globosapiens\07_production\actual\account\include\user.php:256)
 in e:\projects\globosapiens\07_production\actual\account\include\user.php
 on
 line 260
 
 Where is the problem??? I can't see it.


-- 
PHP Database 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-DB] How to write errorhandling??

2001-10-22 Thread Dobromir Velev

Hi,
I never said it is impossible to use mail() on a WIN machine - it just
needs some additional adjustments of the php configuration file.
For those who need more information on the topic check the user contributed
notes at http://www.php.net/manual/en/ref.mail.php

Regards
Dobromir Velev

-Original Message-
From: DL Neil [EMAIL PROTECTED]
To: Dobromir Velev [EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Monday, October 22, 2001 2:29 PM
Subject: Re: [PHP-DB] How to write errorhandling??


Luditus/Dobromir,
It IS possible to run the mail function on a Win machine - I had a
Win2000/IIS(with its own SMTP stub) box running PHP
mail happily.
Also it is possible to have a Win-with-no-local-SMTP configuration. I have
re-jigged my WinNT portable to run the same
PHP/Apache script connecting directly to my ISP's SMTP server (in part
using the path var mentioned).
I haven't tried to combine email with 'headers' though!
...if that's the problem...
=dn


 Hi,
 I see that everybody is looking for the error in the header function -
but
 the error actually is that Luditus is trying to use mail on a Windows box
 with no SMTP server on it.
 It is possible to suppress the mail function output using @mail, but it
 won't fix the problem - if you want to use mail function on a WIN machine
 you'll need a sendmail like program and you will have to adjust the
 sendmail_path variable in your PHP configuration.

 Hi Fokes,
 
 I would like to send an mail via the mail function.
 
 If the mail failes I would like to redirect to an errorpage. Currently
my
 code looks like this:
 
  if ( mail($email,$subject_confirm_account, $message_confirm_account,
 $from_confirm_account) ){
   HEADER(Location:index.php?fuseaction=txtmsg=registered);
 file://success
  }
  else{
   HEADER(Location:index.php?fuseaction=txtmsg=mailproblem); // mail
 could
 not been sent
  };
 
 Unfortunatelly I get an erromessage like that:
 
 Warning: Failed to Connect in
 e:\projects\globosapiens\07_production\actual\account\include\user.php
on
 line 256
 
 Warning: Cannot add header information - headers already sent by (output
 started at

e:\projects\globosapiens\07_production\actual\account\include\user.php:256)
 in
e:\projects\globosapiens\07_production\actual\account\include\user.php
 on
 line 260
 
 Where is the problem??? I can't see it.


--
PHP Database 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 Database 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-DB] Check Boxes!

2001-10-22 Thread Rick Emery

Sometimes, PHP becaomes confused when a variable is included in another
word, such as you are doing with $i in:
 if($HTTP_POST_VARS[chkAuthStatus_$i] = 'on')

To avoid this problem, use braces to segregate the PHP variable from the
rest of the word:
try:   if($HTTP_POST_VARS[chkAuthStatus_${i}] = 'on')
or:if($HTTP_POST_VARS[chkAuthStatus_{$i}] = 'on')

-Original Message-
From: Matt C [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 6:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Check Boxes!


I still can't get my damn code working :( :( :(

All I want to do is have any records with a checked check box given the 
value of 1 in the AuthStatus row.

Can anyone help me please?

-


?php

if ($submit) {

//Get the DB result
$dbResult = mysql_query(SELECT * FROM vacancies WHERE (AuthStatus = '0') 
ORDER BY JobID DESC LIMIT 1);

$oRow = mysql_fetch_object($dbResult);

$Max_JobID = $oRow-JobID;

  for ($i = 0; $i = $Max_JobID; $i++) {
if($HTTP_POST_VARS[chkAuthStatus_$i] = 'on') {
$JobID = $i;
}

if($JobID){

$sql = UPDATE vacancies SET AuthStatus='1' WHERE (JobID = '$JobID');
mysql_query($sql,$dbconnect);

}


  }
}

?

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP Database 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 Database 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-DB] Notes DB

2001-10-22 Thread Carlos Augusto Abarca

Hello everyone:

I have a very urgent request... I´m trying to connetc to a Domino Notes
Database writting a script in PHP but I haven´t been able to find any
informatiion on this topic. I know that the logical step is to use ODBC
conections but the problem is that my client has Domino R5 Web Server and
will not change or install Apache or IIS so I´m have no info in the way to
install PHP on this plataform.

Please, anyone that can help me in this matter I would really appreciate it
as urgently as possible.

Thanks.-

Carlos



-- 
PHP Database 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-DB] Creating a file using php

2001-10-22 Thread Harpreet

Is there a command in PHP that can create a textfile and allows writing data
to it dynamically? Can someone point me to a tutorial or site .

Thanks in advance, help is appreciated.

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-- 
PHP Database 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-DB] Creating a file using php

2001-10-22 Thread DL Neil

Harpreet,

Blunt: Do you ever check the PHP manual before posting?

Polite: XXVI. Filesystem functions http://www.php.net/manual/en/ref.filesystem.php

=dn


- Original Message - 
From: Harpreet [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 22 October 2001 17:34
Subject: [PHP-DB] Creating a file using php


 Is there a command in PHP that can create a textfile and allows writing data
 to it dynamically? Can someone point me to a tutorial or site .
 
 Thanks in advance, help is appreciated.
 
 Regards,
 Harpreet Kaur
 Software Developer
 Crispin Corporations Inc.
 
 
 
 -- 
 PHP Database 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 Database 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-DB] Informix + PHP any gotcha's to watch out for?

2001-10-22 Thread davemacgb

I've been asked to create a B2B web site for on-line ordering.

The customer's software runs on SCO OpenServer 5 (UNIX) unfortunately the
run-time environment for the software is limited to either its own
proprietary database, Informix or Oracle. This means that switch to another
database like MySQL or PostgreSQL is not an option. The run-time's
developers offer their own ODBC driver for their db but I don't trust it
enough to run a web site though it. As Oracle is expensive this leaves
Informix.

I've only used MySQL via PHP until now, does anyone know of any gotchas that
I should watch out for?

The web site will hopefully run on Linux using Apache and PHP.


David McCormack




-- 
PHP Database 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-DB] Creating a file using php

2001-10-22 Thread Harpreet

Blunt: NO!!! Duh

Polite: Well its easier to post and get a reply rather then me going and
serching fo it.;)

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 12:59 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Creating a file using php


Harpreet,

Blunt: Do you ever check the PHP manual before posting?

Polite: XXVI. Filesystem functions
http://www.php.net/manual/en/ref.filesystem.php

=dn


- Original Message -
From: Harpreet [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 22 October 2001 17:34
Subject: [PHP-DB] Creating a file using php


 Is there a command in PHP that can create a textfile and allows writing
data
 to it dynamically? Can someone point me to a tutorial or site .

 Thanks in advance, help is appreciated.

 Regards,
 Harpreet Kaur
 Software Developer
 Crispin Corporations Inc.



 --
 PHP Database 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 Database 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-DB] Creating a file using php

2001-10-22 Thread Jonathan Hilgeman

DN has a point, though. You shouldn't rely on the mailing list, otherwise
you're going to turn out to be a pretty whacked programmer who doesn't know
a good portion of the available options and commands. It's a good thing to
just browse through the manual from time to time. Most people on here don't
know the names of all the functions that PHP offers because they don't go
through the manual. I think I know most of the important ones that pertain
to me, but occasionally I'll find one that I didn't know about. Why? BECAUSE
I READ THE MANUAL. You will learn a ton more by doing that than by asking
questions here.

Bottom Line: Read, read, read, read, READ the manual. Rinse and repeat.

- Jonathan

-Original Message-
From: Harpreet [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 10:27 AM
To: 'DL Neil'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Creating a file using php


Blunt: NO!!! Duh

Polite: Well its easier to post and get a reply rather then me going and
serching fo it.;)

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 12:59 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Creating a file using php


Harpreet,

Blunt: Do you ever check the PHP manual before posting?

Polite: XXVI. Filesystem functions
http://www.php.net/manual/en/ref.filesystem.php

=dn


- Original Message -
From: Harpreet [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 22 October 2001 17:34
Subject: [PHP-DB] Creating a file using php


 Is there a command in PHP that can create a textfile and allows writing
data
 to it dynamically? Can someone point me to a tutorial or site .

 Thanks in advance, help is appreciated.

 Regards,
 Harpreet Kaur
 Software Developer
 Crispin Corporations Inc.



 --
 PHP Database 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 Database 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 Database 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-DB] looped insert

2001-10-22 Thread Rick Emery

Construct your INSERT a piece at a time.  Something like:

$sql = INSERT INTO $myanet02
(staffdev,strategies,rules,news,information,policies) VALUES(;

for($i=0;$icount($category);$i++) {
if($HTTP_POST_VARS[category{$i}] == 'yes') { 
$sql .= \'$email\',;
}
else {
$sql .= NULL,;
}
}
$sql = substring($sql,0,-1).);
//$query = mysql_query($sql,$connect) or die(mysql_error());
echo $sql;

-Original Message-
From: Russ Michell [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 11:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] looped insert


Hi everyone:

I've been fiddling with this all day, and well - if it was working you
wouldn't be reading this right now! ;-)
My script should take the selections made by users and process them via
straightforward MySQL inserts:

//Get all table column names, dynamically display them as checkboxes. Use to
process subscriptions:
$fields = mysql_list_fields($dbName, myanet_categories, $connect);
$columns = mysql_num_fields($fields);
for ($i=0; $i$columns; $i++) {
$names = mysql_field_name($fields, $i) . \n;
$catselect .= b$names /binput type=\checkbox\
name=\category[$names]\ value=\yes\br\n;
}


//If submit button selected, process those ticked checkbox categories:
if(isset($submit)) {
//loop while categories have been ticked
for($i=0;$icount($category);$i++) {
if($HTTP_POST_VARS[category{$i}] == 'yes') { //Not sure
about this bit...
$sql = INSERT INTO $myanet02
(staffdev,strategies,rules,news,information,policies)
VALUES('$email','$email','$email','$email','$email','$email');
//$query = mysql_query($sql,$connect) or
die(mysql_error());
echo $sql;
}
}
}

At the moment not even echoing my $sql works. I know this aint gonna work as
it is, because what I really need to know is:

* How do I insert into only those categories that have been checked?
(default is 'null' in a VARCHAR(50) field)
* How do I only declare '$email' a single time as this is the only value
being inserted?

Many thanks:
Russ

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database 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 Database 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-DB] Creating a file using php

2001-10-22 Thread DL Neil

Yes it is easier for you. Congratulations!

Is it easier for the person answering?
Is it easier for the people reading and deleting irrelevant posts?

=dn

- Original Message - 
From: Harpreet [EMAIL PROTECTED]
To: 'DL Neil' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 22 October 2001 18:27
Subject: RE: [PHP-DB] Creating a file using php


 Blunt: NO!!! Duh
 
 Polite: Well its easier to post and get a reply rather then me going and
 serching fo it.;)
 
 regards,
 Harpreet Kaur
 Software Developer
 Crispin Corporations Inc.
 
 
 
 -Original Message-
 From: DL Neil [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 12:59 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Creating a file using php
 
 
 Harpreet,
 
 Blunt: Do you ever check the PHP manual before posting?
 
 Polite: XXVI. Filesystem functions
 http://www.php.net/manual/en/ref.filesystem.php
 
 =dn
 
 
 - Original Message -
 From: Harpreet [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: 22 October 2001 17:34
 Subject: [PHP-DB] Creating a file using php
 
 
  Is there a command in PHP that can create a textfile and allows writing
 data
  to it dynamically? Can someone point me to a tutorial or site .
 
  Thanks in advance, help is appreciated.
 
  Regards,
  Harpreet Kaur
  Software Developer
  Crispin Corporations Inc.
 
 
 
  --
  PHP Database 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 Database 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-DB] Warning: MySQL: Unable to save result set

2001-10-22 Thread Doug Schasteen

Warning: MySQL: Unable to save result set in location of script on
line *** 

I recently upgraded to php 4 from 3. I also upgraded MySQL to 3.23.43 at
the same time and repopulated my database with a .sql file. Everything
works fine but I get this warning message every time I do an UPDATE,
DELETE, or an INSERT. The data still gets updated, deleted or inserted
though. SELECTs work fine without any problems. Pretty much everything
works, I just keep getting warning messages.

I searched the web and found that several people have fixed the problem
in the past by doing myisamchk -r on all the tables. This did not work
for me. 

I also have plenty of diskspace, so I dont think I'm running out of
room. 

These scripts were all working perfectly on another server with php 3
and a slightly older version of mysql. Also, if I run the SQL commands
in the commandline they run fine without any warnings.

Any ideas?
 
- Doug



[PHP-DB] datetime in MSSQL7

2001-10-22 Thread kras

Hello!

How can I force PHP to fetch datetime field i 'mmdd hh:mm:ss'  WITHOUT
using MSSQL query like *SELECT convert(varchar,dtfield,20) as 'dtfield'* and
so on?
I have a few tables on MSSQL with the different structures and some of
fields are datetime. I have to use CLASS in php with querys inside the code
that are independent on order of fields.

setlocale? but what?

regards
Konrad



-- 
PHP Database 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-DB] Capturing select values from a multliple-select list box

2001-10-22 Thread Beau Lebens

i *think* you can do something like select name=county[] and then it
will pass an array on submission (someone please correct if wrong!) failing
that, you could use a javascript:onChange() function to set the value of a
hidden field using something like (snippet from previous project)

function updateValueString() {
var newValueString = ;
for ( i = 0; i  document.query.include_list.length; i++ ) {
newValueString += | +
document.query.include_list[i].value;
}
document.query.include.value = newValueString;
}

then on the next page, ignore the value submitted from the actual select,
and just work with the value submitted by the hidden field.

HTH
/beau


// -Original Message-
// From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 23 October 2001 1:46 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Capturing select values from a 
// multliple-select list
// box
// 
// 
// I have this bit of code where I am presenting the user a 
// mulitiple-select 
// dropdown box in a form as shown below:
// 
//  select NAME=county SIZE=5 MULTIPLE
// ?php
//// get county list
//$query = SELECT cid, county FROM allcounties;
//$result = mysql_query($query, $connection) or die (Error 
// in query: 
// $query.  . mysql_error());
//while (list($cid, $county) = mysql_fetch_array($result))
//{
//   echo option value=$cid$county/option;
//}
// ?
//  /select
// 
// My newbie question is, How can I capture the values 
// associated with the 
// users' selections from the 'county' box?  Besides wanting 
// to save these 
// values to another table, I would like to do other things with the 
// selections prior to completing the processing of this form.
// 
// Thanks,
// 
// Kim Bjork
// www.infoaxis.com
// 
// 
// -- 
// PHP Database 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 Database 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-DB] Re: [PHP] This is my second work :)

2001-10-22 Thread Robin McKenzie

Philip,

I don't really see the problem with Arash's post.

If people want to help him out with critique, then that's their option.
This board is hardly swamped with similar postings, is it?

Robin Mckenzie



Philip Olson [EMAIL PROTECTED] wrote in message
news:Pine.BSF.4.10.10110150632510.35831-10@localhost...
 Hi Arash-

 It's not a good idea to ask php lists for a website critique, imagine if
 all list members did that!  Please consider other means in evaluating your
 sites.

 Sure it may have worked in the past but that's a bad precedent to set.
 Members of these lists are helpful, sometimes too helpful ;-)

 Regards,
 Philip Olson


 On Mon, 15 Oct 2001, Arash Dejkam wrote:

  Hi,
 
  Some of you may remeber my first serious work (www.saharafilm.org) which
I
  introduced here for critic, and I received very useful replies from you.
 
  This is my second : http://www.dejkam.com
  It have much more different things to be criticised on it.
 
  hope to learn good tips from you like my previous experience :)
 
  Thanks
  Arash Dejkam
 
 
 
  --
  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 Database 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]