[PHP-DB] advancing file pointer

2002-09-22 Thread roslyn jose


hi,

i was able to read from the file, thanks for your help, but one problem it gives me 
the first 2 chars as garbage values and then proceeds to print out the enter file. so 
how can i proceed to advance the file pointer. any suggestions.

regards,

roslyn



-
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!


Re: Re[2]: [PHP-DB] date format to dateformat

2002-09-22 Thread CrossWalkCentral

That did it thanks


"Andrey Sosnitsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello, CrossWalkCentral.
>
> You wrote 23 ñåíòÿáðÿ 2002 ã., 2:05:38:
>
> So, explode() requires a seperator as a first argument.
> You code is
>
> $date= "10-01-2002";
> list ($day, $month, $year) = explode("-", $date);
> echo "$year-$month-$day";
>
> See PHP manual at http://www.php.net/manual/en/function.explode.php
>
> C> What if
> C> $date="10-02-2002";
>
> C> I tried it this way and the explode causes problems with the - in it
> C> What would be the best way to deal with this should i just parse out
the -?
>
>
> www.pskov.ruwebmaster|programmer|DBA
> www.invest.pskov.ru
> www.education.pskov.ru
> --
> Best Regards,
> Andrey  mailto:[EMAIL PROTECTED]
>
>



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




[PHP-DB] Date Select help

2002-09-22 Thread CrossWalkCentral

Any one have any information on selecting a rake of dates from a mysql
database?

my current query reads.
$result = mysql_query("SELECT * FROM CWC_Memory");



I neeed to select where date is between todays date and todays date +10.



Any help would be realy great thanks in advanced.




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




RE: [PHP-DB]opening and reading from file

2002-09-22 Thread Beau Lebens

you have 2 spaces between My and Documents in those, not to mention that if
you are going to set $filename to be the path/file name, you may as well use
it in your fopen() call as well.

other than that is actually looks correct, although - you don't have < or >
around your HTML tag, you should use mailto:[EMAIL PROTECTED]]
// Sent: Monday, 23 September 2002 1:45 PM
// To: [EMAIL PROTECTED]
// Subject: RE: [PHP-DB]opening and reading from file
// 
// 
// 
// hi, the error is on line5. the error is: Parse error: parse error in 
// /var/www/html/learn/frames.php 
// 
// html
// 
// 
// 
// 
// 
// 
// 
// 
// regards,
// 
// roslyn
// 
//  Beau Lebens wrote:what exact error are you getting, and 
// what line is it on etc?
// 
// beau
// 
// 
// // -Original Message-
// // From: roslyn jose [mailto:[EMAIL PROTECTED]]
// // Sent: Monday, 23 September 2002 1:07 PM
// // To: [EMAIL PROTECTED]
// // Subject: RE: [PHP-DB]opening and reading from file
// // 
// // 
// // 
// // hello again,
// // i tried what u told me but im still getting the same error 
// // at the fopen(.). any other bright ideas. please help. 
// thanx alot
// // 
// // // $filename="C:\\Documents and Settings\\roslyn\\My 
// // Documents\\note.txt"
// // $fp = fopen ("C:\\Documents and Settings\\roslyn\\My 
// // Documents\\note.txt", "r");
// // $contents = fread ($fp, filesize ($filename));
// // echo $contents;
// // fclose ($fp); 
// // ?>
// // 
// // regards,
// // roslyn
// // Beau Lebens wrote:just use
// // 
// // $filename = "C:\\Documents and Settings\\roslyn\\My 
// // Documents\\note.txt"; //
// // note double-slashes
// // $contents = join('', file($filename));
// // echo $contents;
// // ?>
// // 
// // should work. your parse error is probably because of the 
// "\" in your
// // filename, you need to escape them with another "\".
// // 
// // HTH
// // 
// // Beau
// // 
// // // -Original Message-
// // // From: roslyn jose [mailto:[EMAIL PROTECTED]]
// // // Sent: Monday, 23 September 2002 12:54 PM
// // // To: [EMAIL PROTECTED]
// // // Subject: RE: [PHP-DB]opening and reading from file
// // // 
// // // 
// // // HI,IVE BEEN TRYING TO PRINT THIS CODE, BUT KEEP GETTING AN 
// // // ERROR: // $filename="C:\Documents and Settings\roslyn\My 
// // Documents\note.txt"
// // // $fp = fopen ("C:\Documents and Settings\roslyn\My 
// // // Documents\note.txt", "r");
// // // $contents = fread ($fp, filesize ($filename));
// // // echo $contents;
// // // fclose ($fp); 
// // // ?>
// // // THE ERROR I GOT WAS THIS:Parse error: parse error in 
// // // /var/www/html/learn/frames.php COULD SOMEONE PLS HELP ME 
// // // OUT EHRE, I JUST WANT TO PRINT THIS FILE, THATS ALL. 
// // // THANKSREGARDS ROSLYN
// // // 
// // // 
// // // 
// // // John Holmes wrote:Try $_POST['field_1'] instead of $field_1
// // // 
// // // ---John Holmes...
// // // 
// // // > -Original Message-
// // // > From: Warren Massengill [mailto:[EMAIL PROTECTED]]
// // // > Sent: Thursday, September 19, 2002 8:19 PM
// // // > To: [EMAIL PROTECTED]
// // // > Subject: [PHP-DB] Form response
// // // > 
// // // > Hi,
// // // > 
// // // > RedHat 7.2 RPM with PostgreSQL 7.1.x and PHP 4.0.6
// // // > 
// // // > Page 111 of "PHP and PostgreSQL", this form displays in 
// // // Mozilla. The
// // // > submit
// // // > button is expected to run a script called reaction.php 
// // but it opens
// // // the
// // // > script and displays the code. The response is the same 
// // // with or without
// // // > variable input.
// // // > 
// // // > I changed the script file to executable: no effect.
// // // > 
// // // > I can run 'reaction.php' from the shell and it works.
// // // > What is the problem here?
// // // > -
// // // > form
// // // > 
// // -
// // // > 
// // // > 
// // // > A Simple Form
// // // > 
// // // 
// // // 
// // // > 
// // // > [input] 
// // // 
// // // 
// // // > [input] 
// // // > 
// // // > 
// // // > 
// // // > 
// // // > -
// // // > Reaction.php
// // // > 
// // --
// // // > action.php
// // // > 
// // // > > if ($field_1)
// // // > {
// // // > echo "field_1: $field_1";
// // // > }
// // // > else
// // // > {
// // // > echo "nothing has been passed to this script";
// // // > }
// // // > ?>
// // // > --
// // // > run as stand alone php file
// // // > 
// // -
// // // > 
// // // > bash-2.05$ php < reaction.php
// // // > X-Powered-By: PHP/4.0.6
// // // > Content-type: text/html
// // // > nothing has been passed to this script
// // // > 
// // // > 
// 
// // // > 
// // // > In:
// // // > /etc/httpd/conf/httpd.conf
// // // > AddType application/x-httpd-php .

RE: [PHP-DB]opening and reading from file

2002-09-22 Thread roslyn jose


hi, the error is on line5. the error is: Parse error: parse error in 
/var/www/html/learn/frames.php 

html








regards,

roslyn

 Beau Lebens wrote:what exact error are you getting, and what line is it on etc?

beau


// -Original Message-
// From: roslyn jose [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 23 September 2002 1:07 PM
// To: [EMAIL PROTECTED]
// Subject: RE: [PHP-DB]opening and reading from file
// 
// 
// 
// hello again,
// i tried what u told me but im still getting the same error 
// at the fopen(.). any other bright ideas. please help. thanx alot
// 
// // $filename="C:\\Documents and Settings\\roslyn\\My 
// Documents\\note.txt"
// $fp = fopen ("C:\\Documents and Settings\\roslyn\\My 
// Documents\\note.txt", "r");
// $contents = fread ($fp, filesize ($filename));
// echo $contents;
// fclose ($fp); 
// ?>
// 
// regards,
// roslyn
// Beau Lebens wrote:just use
// 
// $filename = "C:\\Documents and Settings\\roslyn\\My 
// Documents\\note.txt"; //
// note double-slashes
// $contents = join('', file($filename));
// echo $contents;
// ?>
// 
// should work. your parse error is probably because of the "\" in your
// filename, you need to escape them with another "\".
// 
// HTH
// 
// Beau
// 
// // -Original Message-
// // From: roslyn jose [mailto:[EMAIL PROTECTED]]
// // Sent: Monday, 23 September 2002 12:54 PM
// // To: [EMAIL PROTECTED]
// // Subject: RE: [PHP-DB]opening and reading from file
// // 
// // 
// // HI,IVE BEEN TRYING TO PRINT THIS CODE, BUT KEEP GETTING AN 
// // ERROR: // $filename="C:\Documents and Settings\roslyn\My 
// Documents\note.txt"
// // $fp = fopen ("C:\Documents and Settings\roslyn\My 
// // Documents\note.txt", "r");
// // $contents = fread ($fp, filesize ($filename));
// // echo $contents;
// // fclose ($fp); 
// // ?>
// // THE ERROR I GOT WAS THIS:Parse error: parse error in 
// // /var/www/html/learn/frames.php COULD SOMEONE PLS HELP ME 
// // OUT EHRE, I JUST WANT TO PRINT THIS FILE, THATS ALL. 
// // THANKSREGARDS ROSLYN
// // 
// // 
// // 
// // John Holmes wrote:Try $_POST['field_1'] instead of $field_1
// // 
// // ---John Holmes...
// // 
// // > -Original Message-
// // > From: Warren Massengill [mailto:[EMAIL PROTECTED]]
// // > Sent: Thursday, September 19, 2002 8:19 PM
// // > To: [EMAIL PROTECTED]
// // > Subject: [PHP-DB] Form response
// // > 
// // > Hi,
// // > 
// // > RedHat 7.2 RPM with PostgreSQL 7.1.x and PHP 4.0.6
// // > 
// // > Page 111 of "PHP and PostgreSQL", this form displays in 
// // Mozilla. The
// // > submit
// // > button is expected to run a script called reaction.php 
// but it opens
// // the
// // > script and displays the code. The response is the same 
// // with or without
// // > variable input.
// // > 
// // > I changed the script file to executable: no effect.
// // > 
// // > I can run 'reaction.php' from the shell and it works.
// // > What is the problem here?
// // > -
// // > form
// // > 
// -
// // > 
// // > 
// // > A Simple Form
// // > 
// // 
// // 
// // > 
// // > [input] 
// // 
// // 
// // > [input] 
// // > 
// // > 
// // > 
// // > 
// // > -
// // > Reaction.php
// // > 
// --
// // > action.php
// // > 
// // > > if ($field_1)
// // > {
// // > echo "field_1: $field_1";
// // > }
// // > else
// // > {
// // > echo "nothing has been passed to this script";
// // > }
// // > ?>
// // > --
// // > run as stand alone php file
// // > 
// -
// // > 
// // > bash-2.05$ php < reaction.php
// // > X-Powered-By: PHP/4.0.6
// // > Content-type: text/html
// // > nothing has been passed to this script
// // > 
// // > 
// // > 
// // > In:
// // > /etc/httpd/conf/httpd.conf
// // > AddType application/x-httpd-php .php
// // > (appears as above plus an entry for each of php2,3,&4)
// // > LoadModule php4_module modules/libphp4.so
// // > LoadModule php_module modules/mod_php.so
// // > 
// // > These were all uncommented in the RPM installation of 
// RedHat 7.2.
// // > Somehow PHP is partially working...
// // > Any suggestions?
// // > 
// // > I can create forms in php and tables in PostgreSQL but 
// according to
// // > phpinfo(), php is not configured for PostfreSQL.
// // > 
// // > If I survive this problem, that one is on the horizon. 
// Does anyone
// // have a
// // > generic list of things to do after an RPM installation of 
// // RedHat Linux
// // 7.2
// // > in order to use PHP with PostgreSQL?
// // > 
// // > Thanks,
// // > Warren
// // > 
// // > 
// // > 
// _
// // > Send and receive Hotmail on your mobile device: 
// http://mobile.msn.com
// > 
// > 
// > --
// > PH

RE: [PHP-DB]opening and reading from file

2002-09-22 Thread Beau Lebens

what exact error are you getting, and what line is it on etc?

beau


// -Original Message-
// From: roslyn jose [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 23 September 2002 1:07 PM
// To: [EMAIL PROTECTED]
// Subject: RE: [PHP-DB]opening and reading from file
// 
// 
// 
// hello again,
// i tried what u told me but im still getting the same error 
// at the fopen(.). any other bright ideas. please help. thanx alot
//  
// 
// 
// regards,
// roslyn
//  Beau Lebens wrote:just use
// 
// $filename = "C:\\Documents and Settings\\roslyn\\My 
// Documents\\note.txt"; //
// note double-slashes
// $contents = join('', file($filename));
// echo $contents;
// ?>
// 
// should work. your parse error is probably because of the "\" in your
// filename, you need to escape them with another "\".
// 
// HTH
// 
// Beau
// 
// // -Original Message-
// // From: roslyn jose [mailto:[EMAIL PROTECTED]]
// // Sent: Monday, 23 September 2002 12:54 PM
// // To: [EMAIL PROTECTED]
// // Subject: RE: [PHP-DB]opening and reading from file
// // 
// // 
// // HI,IVE BEEN TRYING TO PRINT THIS CODE, BUT KEEP GETTING AN 
// // ERROR: // $filename="C:\Documents and Settings\roslyn\My 
// Documents\note.txt"
// // $fp = fopen ("C:\Documents and Settings\roslyn\My 
// // Documents\note.txt", "r");
// // $contents = fread ($fp, filesize ($filename));
// // echo $contents;
// // fclose ($fp); 
// // ?>
// // THE ERROR I GOT WAS THIS:Parse error: parse error in 
// // /var/www/html/learn/frames.php COULD SOMEONE PLS HELP ME 
// // OUT EHRE, I JUST WANT TO PRINT THIS FILE, THATS ALL. 
// // THANKSREGARDS ROSLYN
// // 
// // 
// // 
// // John Holmes wrote:Try $_POST['field_1'] instead of $field_1
// // 
// // ---John Holmes...
// // 
// // > -Original Message-
// // > From: Warren Massengill [mailto:[EMAIL PROTECTED]]
// // > Sent: Thursday, September 19, 2002 8:19 PM
// // > To: [EMAIL PROTECTED]
// // > Subject: [PHP-DB] Form response
// // > 
// // > Hi,
// // > 
// // > RedHat 7.2 RPM with PostgreSQL 7.1.x and PHP 4.0.6
// // > 
// // > Page 111 of "PHP and PostgreSQL", this form displays in 
// // Mozilla. The
// // > submit
// // > button is expected to run a script called reaction.php 
// but it opens
// // the
// // > script and displays the code. The response is the same 
// // with or without
// // > variable input.
// // > 
// // > I changed the script file to executable: no effect.
// // > 
// // > I can run 'reaction.php' from the shell and it works.
// // > What is the problem here?
// // > -
// // > form
// // > 
// -
// // > 
// // > 
// // > A Simple Form
// // > 
// // 
// // 
// // > 
// // > [input] 
// // 
// // 
// // > [input] 
// // > 
// // > 
// // > 
// // > 
// // > -
// // > Reaction.php
// // > 
// --
// // > action.php
// // > 
// // > > if ($field_1)
// // > {
// // > echo "field_1: $field_1";
// // > }
// // > else
// // > {
// // > echo "nothing has been passed to this script";
// // > }
// // > ?>
// // > --
// // > run as stand alone php file
// // > 
// -
// // > 
// // > bash-2.05$ php < reaction.php
// // > X-Powered-By: PHP/4.0.6
// // > Content-type: text/html
// // > nothing has been passed to this script
// // > 
// // > 
// // > 
// // > In:
// // > /etc/httpd/conf/httpd.conf
// // > AddType application/x-httpd-php .php
// // > (appears as above plus an entry for each of php2,3,&4)
// // > LoadModule php4_module modules/libphp4.so
// // > LoadModule php_module modules/mod_php.so
// // > 
// // > These were all uncommented in the RPM installation of 
// RedHat 7.2.
// // > Somehow PHP is partially working...
// // > Any suggestions?
// // > 
// // > I can create forms in php and tables in PostgreSQL but 
// according to
// // > phpinfo(), php is not configured for PostfreSQL.
// // > 
// // > If I survive this problem, that one is on the horizon. 
// Does anyone
// // have a
// // > generic list of things to do after an RPM installation of 
// // RedHat Linux
// // 7.2
// // > in order to use PHP with PostgreSQL?
// // > 
// // > Thanks,
// // > Warren
// // > 
// // > 
// // > 
// _
// // > Send and receive Hotmail on your mobile device: 
// http://mobile.msn.com
// > 
// > 
// > --
// > PHP Database Mailing List (http://www.php.net/)
// > To unsubscribe, visit: http://www.php.net/unsub.php
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 
// 
// 
// -
// Do you Yahoo!?
// New DSL Internet Access from SBC & Yahoo!
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubs

Re[2]: [PHP-DB] date format to dateformat

2002-09-22 Thread Andrey Sosnitsky

Hello, CrossWalkCentral.

You wrote 23 ñåíòÿáðÿ 2002 ã., 2:05:38:

So, explode() requires a seperator as a first argument.
You code is

$date= "10-01-2002";
list ($day, $month, $year) = explode("-", $date);
echo "$year-$month-$day";

See PHP manual at http://www.php.net/manual/en/function.explode.php

C> What if
C> $date="10-02-2002";

C> I tried it this way and the explode causes problems with the - in it
C> What would be the best way to deal with this should i just parse out the -?


www.pskov.ruwebmaster|programmer|DBA
www.invest.pskov.ru
www.education.pskov.ru
-- 
Best Regards,
Andrey  mailto:[EMAIL PROTECTED]



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




RE: [PHP-DB]opening and reading from file

2002-09-22 Thread roslyn jose


hello again,
i tried what u told me but im still getting the same error at the fopen(.). any 
other bright ideas. please help. thanx alot
 


regards,
roslyn
 Beau Lebens wrote:just use

$filename = "C:\\Documents and Settings\\roslyn\\My Documents\\note.txt"; //
note double-slashes
$contents = join('', file($filename));
echo $contents;
?>

should work. your parse error is probably because of the "\" in your
filename, you need to escape them with another "\".

HTH

Beau

// -Original Message-
// From: roslyn jose [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 23 September 2002 12:54 PM
// To: [EMAIL PROTECTED]
// Subject: RE: [PHP-DB]opening and reading from file
// 
// 
// HI,IVE BEEN TRYING TO PRINT THIS CODE, BUT KEEP GETTING AN 
// ERROR: // $filename="C:\Documents and Settings\roslyn\My Documents\note.txt"
// $fp = fopen ("C:\Documents and Settings\roslyn\My 
// Documents\note.txt", "r");
// $contents = fread ($fp, filesize ($filename));
// echo $contents;
// fclose ($fp); 
// ?>
// THE ERROR I GOT WAS THIS:Parse error: parse error in 
// /var/www/html/learn/frames.php COULD SOMEONE PLS HELP ME 
// OUT EHRE, I JUST WANT TO PRINT THIS FILE, THATS ALL. 
// THANKSREGARDS ROSLYN
// 
// 
// 
// John Holmes wrote:Try $_POST['field_1'] instead of $field_1
// 
// ---John Holmes...
// 
// > -Original Message-
// > From: Warren Massengill [mailto:[EMAIL PROTECTED]]
// > Sent: Thursday, September 19, 2002 8:19 PM
// > To: [EMAIL PROTECTED]
// > Subject: [PHP-DB] Form response
// > 
// > Hi,
// > 
// > RedHat 7.2 RPM with PostgreSQL 7.1.x and PHP 4.0.6
// > 
// > Page 111 of "PHP and PostgreSQL", this form displays in 
// Mozilla. The
// > submit
// > button is expected to run a script called reaction.php but it opens
// the
// > script and displays the code. The response is the same 
// with or without
// > variable input.
// > 
// > I changed the script file to executable: no effect.
// > 
// > I can run 'reaction.php' from the shell and it works.
// > What is the problem here?
// > -
// > form
// > -
// > 
// > 
// > A Simple Form
// > 
// 
// 
// > 
// > [input] 
// 
// 
// > [input] 
// > 
// > 
// > 
// > 
// > -
// > Reaction.php
// > --
// > action.php
// > 
// > > if ($field_1)
// > {
// > echo "field_1: $field_1";
// > }
// > else
// > {
// > echo "nothing has been passed to this script";
// > }
// > ?>
// > --
// > run as stand alone php file
// > -
// > 
// > bash-2.05$ php < reaction.php
// > X-Powered-By: PHP/4.0.6
// > Content-type: text/html
// > nothing has been passed to this script
// > 
// > 
// > 
// > In:
// > /etc/httpd/conf/httpd.conf
// > AddType application/x-httpd-php .php
// > (appears as above plus an entry for each of php2,3,&4)
// > LoadModule php4_module modules/libphp4.so
// > LoadModule php_module modules/mod_php.so
// > 
// > These were all uncommented in the RPM installation of RedHat 7.2.
// > Somehow PHP is partially working...
// > Any suggestions?
// > 
// > I can create forms in php and tables in PostgreSQL but according to
// > phpinfo(), php is not configured for PostfreSQL.
// > 
// > If I survive this problem, that one is on the horizon. Does anyone
// have a
// > generic list of things to do after an RPM installation of 
// RedHat Linux
// 7.2
// > in order to use PHP with PostgreSQL?
// > 
// > Thanks,
// > Warren
// > 
// > 
// > _
// > Send and receive Hotmail on your mobile device: 
http://mobile.msn.com
> 
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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



-
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

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



-
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!


RE: [PHP-DB]opening and reading from file

2002-09-22 Thread Beau Lebens

just use



should work. your parse error is probably because of the "\" in your
filename, you need to escape them with another "\".

HTH

Beau

// -Original Message-
// From: roslyn jose [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 23 September 2002 12:54 PM
// To: [EMAIL PROTECTED]
// Subject: RE: [PHP-DB]opening and reading from file
// 
// 
// HI,IVE BEEN TRYING TO PRINT THIS CODE, BUT KEEP GETTING AN 
// ERROR: 
// THE ERROR I GOT WAS THIS:Parse error: parse error in 
// /var/www/html/learn/frames.php  COULD SOMEONE PLS HELP ME 
// OUT EHRE, I JUST WANT TO PRINT THIS FILE, THATS ALL. 
// THANKSREGARDS ROSLYN
// 
// 
//  
//  John Holmes wrote:Try $_POST['field_1'] instead of $field_1
// 
// ---John Holmes...
// 
// > -Original Message-
// > From: Warren Massengill [mailto:[EMAIL PROTECTED]]
// > Sent: Thursday, September 19, 2002 8:19 PM
// > To: [EMAIL PROTECTED]
// > Subject: [PHP-DB] Form response
// > 
// > Hi,
// > 
// > RedHat 7.2 RPM with PostgreSQL 7.1.x and PHP 4.0.6
// > 
// > Page 111 of "PHP and PostgreSQL", this form displays in 
// Mozilla. The
// > submit
// > button is expected to run a script called reaction.php but it opens
// the
// > script and displays the code. The response is the same 
// with or without
// > variable input.
// > 
// > I changed the script file to executable: no effect.
// > 
// > I can run 'reaction.php' from the shell and it works.
// > What is the problem here?
// > -
// > form
// > -
// > 
// > 
// > A Simple Form
// > 
// 
// 
// > 
// >  [input] 
// 
// 
// >  [input] 
// > 
// > 
// > 
// > 
// > -
// > Reaction.php
// > --
// > action.php
// > 
// > > if ($field_1)
// > {
// > echo "field_1: $field_1";
// > }
// > else
// > {
// > echo "nothing has been passed to this script";
// > }
// > ?>
// > --
// > run as stand alone php file
// > -
// > 
// > bash-2.05$ php < reaction.php
// > X-Powered-By: PHP/4.0.6
// > Content-type: text/html
// > nothing has been passed to this script
// > 
// > 
// > 
// > In:
// > /etc/httpd/conf/httpd.conf
// > AddType application/x-httpd-php .php
// > (appears as above plus an entry for each of php2,3,&4)
// > LoadModule php4_module modules/libphp4.so
// > LoadModule php_module modules/mod_php.so
// > 
// > These were all uncommented in the RPM installation of RedHat 7.2.
// > Somehow PHP is partially working...
// > Any suggestions?
// > 
// > I can create forms in php and tables in PostgreSQL but according to
// > phpinfo(), php is not configured for PostfreSQL.
// > 
// > If I survive this problem, that one is on the horizon. Does anyone
// have a
// > generic list of things to do after an RPM installation of 
// RedHat Linux
// 7.2
// > in order to use PHP with PostgreSQL?
// > 
// > Thanks,
// > Warren
// > 
// > 
// > _
// > Send and receive Hotmail on your mobile device: 
http://mobile.msn.com
> 
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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



-
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

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




RE: [PHP-DB]opening and reading from file

2002-09-22 Thread roslyn jose

HI,IVE BEEN TRYING TO PRINT THIS CODE, BUT KEEP GETTING AN ERROR: 
THE ERROR I GOT WAS THIS:Parse error: parse error in /var/www/html/learn/frames.php  
COULD SOMEONE PLS HELP ME OUT EHRE, I JUST WANT TO PRINT THIS FILE, THATS ALL. 
THANKSREGARDS ROSLYN


 
 John Holmes wrote:Try $_POST['field_1'] instead of $field_1

---John Holmes...

> -Original Message-
> From: Warren Massengill [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 8:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Form response
> 
> Hi,
> 
> RedHat 7.2 RPM with PostgreSQL 7.1.x and PHP 4.0.6
> 
> Page 111 of "PHP and PostgreSQL", this form displays in Mozilla. The
> submit
> button is expected to run a script called reaction.php but it opens
the
> script and displays the code. The response is the same with or without
> variable input.
> 
> I changed the script file to executable: no effect.
> 
> I can run 'reaction.php' from the shell and it works.
> What is the problem here?
> -
> form
> -
> 
> 
> A Simple Form
> 


> 
>  [input] 


>  [input] 
> 
> 
> 
> 
> -
> Reaction.php
> --
> action.php
> 
> > if ($field_1)
> {
> echo "field_1: $field_1";
> }
> else
> {
> echo "nothing has been passed to this script";
> }
> ?>
> --
> run as stand alone php file
> -
> 
> bash-2.05$ php < reaction.php
> X-Powered-By: PHP/4.0.6
> Content-type: text/html
> nothing has been passed to this script
> 
> 
> 
> In:
> /etc/httpd/conf/httpd.conf
> AddType application/x-httpd-php .php
> (appears as above plus an entry for each of php2,3,&4)
> LoadModule php4_module modules/libphp4.so
> LoadModule php_module modules/mod_php.so
> 
> These were all uncommented in the RPM installation of RedHat 7.2.
> Somehow PHP is partially working...
> Any suggestions?
> 
> I can create forms in php and tables in PostgreSQL but according to
> phpinfo(), php is not configured for PostfreSQL.
> 
> If I survive this problem, that one is on the horizon. Does anyone
have a
> generic list of things to do after an RPM installation of RedHat Linux
7.2
> in order to use PHP with PostgreSQL?
> 
> Thanks,
> Warren
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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



-
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!


RE: [PHP-DB] Re: Insert Newbie

2002-09-22 Thread Jason Morehouse

Yeah, that too =)

On Sun, 22 Sep 2002 22:02:31 +, John Holmes wrote:

> From manual page on mysql_db_query():
> 
> Note: This function has been deprecated since PHP 4.0.6. Do not use this
> function. Use mysql_select_db() and mysql_query() instead. 
> 
> ---John Holmes...
> 
>> -Original Message-
>> From: Jason Morehouse [mailto:[EMAIL PROTECTED]]
>> Sent: Sunday, September 22, 2002 8:59 PM
>> To: [EMAIL PROTECTED]; Brandon Boyce
>> Subject: [PHP-DB] Re: Insert Newbie
>> 
>> $result = mysql_db_query($db,"$SQL",$cid) or die (mysql_error());
>> 
>> ...should give you and idea.
>> 
>> On Sun, 22 Sep 2002 12:05:19 +, Brandon Boyce wrote:
>> 
>> > Below is the code I used to try to insert info into a mysql
> database,
>> the
>> > form posts to itself. After I hit the submit button it isn't echoing
> the
>> > indication that information has been added, and when I check the
>> database
>> > there isn't anything there. help please!
>> >
>> > > > $usr = "username";
>> > $pwd = "password";
>> > $db = "dbname";
>> > $host = "localhost";
>> >
>> > # connect to database
>> > $cid = mysql_connect($host,$usr,$pwd);
>> > if (!$cid) { echo("ERROR: " . mysql_error() . "\n");}
>> >
>> > ?>
>> > 
>> > 
>> >Insert Link
>> >
>> > 
>> > 
>> >
>> >  Add Link  
>> >
>> > > > if ($REQUEST_METHOD=="POST") {
>> >
>> >
>> > $description = str_replace("'","''",$description);
>> > $sitename = str_replace("'","''",$sitename);
>> >
>> >
>> > $SQL = " INSERT INTO links ";
>> > $SQL = $SQL . " (category, sitename, siteurl, description)
>> VALUES ";
>> > $SQL = $SQL . " ('$category',
>> '$sitename','$siteurl','$description')
>> > ";
>> >
>> >
>> > $result = mysql_db_query($db,"$SQL",$cid);
>> >
>> >  if (!$result) { echo("ERROR: " . mysql_error() .
>> > $SQL\n");}
>> >
>> > echo ("New Link Added\n");
>> >
>> > }
>> >
>> > ?>
>> >
>> > 
>> > 
>> > Category:   NAME="category"
>> > SIZE=40>
>> > Site Name:  NAME="sitename"
>> > SIZE=40>
>> > Site URL:  > > VALUE="http://"; SIZE=40>
>> > Description:   > > NAME="description" ROWS=5 COLS=40>
>> > 
>> > 
>> > 
>> >
>> >
>> > 
>> > 
>> > 
>> 
>> --
>>  Jason Morehouse (jm[@]netconcepts[.]com)
>>  Netconcepts - http://www.netconcepts.com
>>  Auckland, New Zealand
>>  Linux: Because rebooting is for adding hardware.
>> 
>> 
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




RE: [PHP-DB] Re: Insert Newbie

2002-09-22 Thread John Holmes

>From manual page on mysql_db_query():

Note: This function has been deprecated since PHP 4.0.6. Do not use this
function. Use mysql_select_db() and mysql_query() instead. 

---John Holmes...

> -Original Message-
> From: Jason Morehouse [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 22, 2002 8:59 PM
> To: [EMAIL PROTECTED]; Brandon Boyce
> Subject: [PHP-DB] Re: Insert Newbie
> 
> $result = mysql_db_query($db,"$SQL",$cid) or die (mysql_error());
> 
> ...should give you and idea.
> 
> On Sun, 22 Sep 2002 12:05:19 +, Brandon Boyce wrote:
> 
> > Below is the code I used to try to insert info into a mysql
database,
> the
> > form posts to itself. After I hit the submit button it isn't echoing
the
> > indication that information has been added, and when I check the
> database
> > there isn't anything there. help please!
> >
> >  > $usr = "username";
> > $pwd = "password";
> > $db = "dbname";
> > $host = "localhost";
> >
> > # connect to database
> > $cid = mysql_connect($host,$usr,$pwd);
> > if (!$cid) { echo("ERROR: " . mysql_error() . "\n");}
> >
> > ?>
> > 
> > 
> >Insert Link
> >
> > 
> > 
> >
> >  Add Link  
> >
> >  > if ($REQUEST_METHOD=="POST") {
> >
> >
> > $description = str_replace("'","''",$description);
> > $sitename = str_replace("'","''",$sitename);
> >
> >
> > $SQL = " INSERT INTO links ";
> > $SQL = $SQL . " (category, sitename, siteurl, description)
> VALUES ";
> > $SQL = $SQL . " ('$category',
> '$sitename','$siteurl','$description')
> > ";
> >
> >
> > $result = mysql_db_query($db,"$SQL",$cid);
> >
> >  if (!$result) { echo("ERROR: " . mysql_error() .
> > $SQL\n");}
> >
> > echo ("New Link Added\n");
> >
> > }
> >
> > ?>
> >
> > 
> > 
> > Category:   > SIZE=40>
> > Site Name:  > SIZE=40>
> > Site URL:   > VALUE="http://"; SIZE=40>
> > Description:> NAME="description" ROWS=5 COLS=40>
> > 
> > 
> > 
> >
> >
> > 
> > 
> > 
> 
> --
>  Jason Morehouse (jm[@]netconcepts[.]com)
>  Netconcepts - http://www.netconcepts.com
>  Auckland, New Zealand
>  Linux: Because rebooting is for adding hardware.
> 
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




[PHP-DB] Re: Insert Newbie

2002-09-22 Thread Jason Morehouse

$result = mysql_db_query($db,"$SQL",$cid) or die (mysql_error());

...should give you and idea.

On Sun, 22 Sep 2002 12:05:19 +, Brandon Boyce wrote:

> Below is the code I used to try to insert info into a mysql database, the
> form posts to itself. After I hit the submit button it isn't echoing the
> indication that information has been added, and when I check the database
> there isn't anything there. help please!
> 
>  $usr = "username";
> $pwd = "password";
> $db = "dbname";
> $host = "localhost";
> 
> # connect to database
> $cid = mysql_connect($host,$usr,$pwd);
> if (!$cid) { echo("ERROR: " . mysql_error() . "\n");}
> 
> ?>
> 
> 
>Insert Link
> 
> 
> 
> 
>  Add Link  
> 
>  if ($REQUEST_METHOD=="POST") {
> 
> 
> $description = str_replace("'","''",$description);
> $sitename = str_replace("'","''",$sitename);
> 
> 
> $SQL = " INSERT INTO links ";
> $SQL = $SQL . " (category, sitename, siteurl, description) VALUES ";
> $SQL = $SQL . " ('$category', '$sitename','$siteurl','$description')
> ";
> 
> 
> $result = mysql_db_query($db,"$SQL",$cid);
> 
>  if (!$result) { echo("ERROR: " . mysql_error() .
> $SQL\n");}
> 
> echo ("New Link Added\n");
> 
> }
> 
> ?>
> 
> 
> 
> Category:   SIZE=40>
> Site Name:  SIZE=40>
> Site URL:   VALUE="http://"; SIZE=40>
> Description:NAME="description" ROWS=5 COLS=40>
> 
> 
> 
> 
> 
> 
> 
> 

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




Re: [PHP-DB] date format to dateformat

2002-09-22 Thread CrossWalkCentral

What if
$date="10-02-2002";

I tried it this way and the explode causes problems with the - in it
What would be the best way to deal with this should i just parse out the -?


"Andrey Sosnitsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello CrossWalkCentral,
>
> Sunday, September 22, 2002, 7:06:18 AM, you wrote:
>
> Try this
>
> $date= "10 01 2002";
> list ($day, $month, $year) = explode(" ", $date);
> echo "$year-$month-$day";
>
> C> I am having problems coverting the followign date format. Does any one
have
> C> any insight on this.
> C> $date= 10 01 2002
> C> I need to conver this to Y-m-d
> C> any help would be great
>
> www.pskov.ru
> www.invest.pskov.ru
> --
> Best regards,
> Andreymailto:[EMAIL PROTECTED]
>



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




AW: [PHP-DB] Large files using phpMyAdmin

2002-09-22 Thread Thomas Lamy

Hi,

1. Problem (Uploads)
Have a look at your php.ini, max_upload_size is 2 MB per default, you may
wish to increase this. Not sure if phpMyAdmin has another parameter to
configure this...

2. Problem (pics messed up)
Seems to be some magic quotes problem. In your php.ini, check
magic_qoutes_gpc and magic_quotes. Can't tell how you designed picture
uploads, but if you did it "the right way" (my opinion, no flames :-), both
need to be "Off".


Thomas


> Von: Steve Vernon [mailto:[EMAIL PROTECTED]]
> Gesendet: Sonntag, 22. September 2002 20:00
> An: [EMAIL PROTECTED]
> Betreff: [PHP-DB] Large files using phpMyAdmin
> 
> 
> Hiya,
> So on the net I ask for a dump of my database using 
> myPHPadmin, get a
> 2mb sql file. Put it in my local copy of myphpadmin and it 
> wont accept it.
> If I remove some of the lines then it works so I suppose its 
> something to do
> with the size. Can this be fixed? Is it to do with timeouts?
> 
> The other problem is that I store pictures in the 
> database, about 1.8mb
> worth. They look fine on the net but when i download they are 
> messed up!!!
> They used to till I formatted my hard disk, what have I done 
> wrong? Please!
> 
> Just a quick note I have not got a command line access to 
> the online
> server only using myphpadmin and I have tried getting a dump 
> using IE and
> Netscape  to see if it was IE messing the file up!
> 
> Thanks a lot,
> 
> Steve
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP-DB] Large files using phpMyAdmin

2002-09-22 Thread Steve Vernon

Hiya,
So on the net I ask for a dump of my database using myPHPadmin, get a
2mb sql file. Put it in my local copy of myphpadmin and it wont accept it.
If I remove some of the lines then it works so I suppose its something to do
with the size. Can this be fixed? Is it to do with timeouts?

The other problem is that I store pictures in the database, about 1.8mb
worth. They look fine on the net but when i download they are messed up!!!
They used to till I formatted my hard disk, what have I done wrong? Please!

Just a quick note I have not got a command line access to the online
server only using myphpadmin and I have tried getting a dump using IE and
Netscape  to see if it was IE messing the file up!

Thanks a lot,

Steve




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




[PHP-DB] Insert Newbie

2002-09-22 Thread Brandon Boyce

Below is the code I used to try to insert info into a mysql database, the
form posts to itself. After I hit the submit button it isn't echoing the
indication that information has been added, and when I check the database
there isn't anything there. help please!




   Insert Link




 Add Link  

New Link Added\n");

}

?>



Category:  
Site Name: 
Site URL:  http://"; SIZE=40>
Description:   











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




[PHP-DB] Add items to field using update?

2002-09-22 Thread Jas

Not sure how to do this but I have a table which looks like:
CREATE TABLE cm_sessions (
  session varchar(255) NOT NULL default '',
  ipaddy varchar(30) NOT NULL default '',
  host varchar(255) NOT NULL default '',
  pages longtext NOT NULL,
  referrer varchar(255) NOT NULL default '',
  hck varchar(15) NOT NULL default '',
  nrml varchar(15) NOT NULL default '',
  hour varchar(15) NOT NULL default '',
  date_stamp varchar(255) NOT NULL default '',
  PRIMARY KEY  (session),
  UNIQUE KEY session (session)
) TYPE=MyISAM;

Now everytime a new page is reached I want to update only the 'pages' field,
here is the current sql statement that overwrites the contents of the
'pages' field.

UPDATE $table SET pages = '".$PHP_SELF."' WHERE session = '$holy_cow'

any help on this would be great.
Jas



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




[PHP-DB] Searching for Datagrid

2002-09-22 Thread Paolo Zani

Hi All!
I'm searching for Datagrid component for php and mysql. Something like java
ones.
Does anyone knows one?

Thanks
Paolo



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




[PHP-DB] Re: convert mysql table to Excell or Access file

2002-09-22 Thread corto

Alex Shi wrote:

>Can MySQL table be converted to Access or Excell format?
>
>Alex
>
>  
>
yes
go
http://www.phpwizard.net/projects/phpMyAdmin/

corto




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




[PHP-DB] password function

2002-09-22 Thread Murat Ö.

hi,
i want to encode a string that users enter with mysql password function. but
sometimes this code works sometimes don't. mysql warns me:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in 

the code is:

$result=mysql_query("select password(".$_POST['password'].")");
  while ($p = mysql_fetch_array($result, MYSQL_ASSOC)):
  $pswrd=$p['password('.$_POST['password'].')'];
  endwhile;

thanks...



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




RE: [PHP-DB] Variables coming from forms

2002-09-22 Thread Peter Lovatt

could be a register globals issue?

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---  

-Original Message-
From: Achilles Maroulis [mailto:[EMAIL PROTECTED]]
Sent: 22 September 2002 07:04
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Variables coming from forms


Hi. I have posted this thread before but didn't come to a solution so I try
again.

I've installed Apache 2.0 and PHP 4.2.3 (both with the msi installers) on
Windows 2000 Pro.
The problem I have is that I get the message

Notice: Undefined variable: var_name in 

every time I pass a new variable into another page whether this happens
using the URL or a form or even sessions.

The strange thing is that if I run phpinfo() in the same page (where the
variable is considered to be undefined) I see that my variables do exist in
the variables section of phpinfo.


For example. If I use a form to pass a variable in a php file like this:

  
  


and have the var.php like this:


I'll get the message:
Notice: Undefined variable: var in C:\Progr.\htdocs\var.php on line 2

while I'll also get a line like this in the variables section of phpinfo():
Variable  Value
_GET["var"] the value I typed before

I think this is really strange. Has anyone something to suggest?

Thanx in advance!!
Achilles


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



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




Re: [PHP-DB] date format to dateformat

2002-09-22 Thread Andrey Sosnitsky

Hello CrossWalkCentral,

Sunday, September 22, 2002, 7:06:18 AM, you wrote:

Try this

$date= "10 01 2002";
list ($day, $month, $year) = explode(" ", $date);
echo "$year-$month-$day";

C> I am having problems coverting the followign date format. Does any one have
C> any insight on this.
C> $date= 10 01 2002
C> I need to conver this to Y-m-d
C> any help would be great

www.pskov.ru
www.invest.pskov.ru
-- 
Best regards,
Andreymailto:[EMAIL PROTECTED]


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