[PHP-DB] Cookies

2001-04-25 Thread Tobbe
Hi !! I'm trying to but down 2 variables ($iCount and $sPhone) into a cookie and I used the code example from the php manual from php.net put I only get the error messages (down below) And how do i get back the var in to the page or is there another beter way to save the variables when

[PHP-DB] apache 1.3.9 pgsql 7.1 php4 on solaris 2.7

2001-04-25 Thread Marc Blum
Hello We're trying to get this running. php4 is running as dynamically linked module. the php.ini file contains the entry: extension=libpq.so and extensiondir=./ libpq.so has been copied to the php directory and the modules and libs subdirs. postmaster is up and running but in our testscript

RE: AW: [PHP-DB] syntax error - -- agghhh!

2001-04-25 Thread Michael Rudel
it's always eaiser to count the parens and braces backwards to make sure they're all there. i do it all the time. ... or you use a cool Editor (like UE32) which will do this job for you =8) Greetinx, Mike (Germany) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Cookies

2001-04-25 Thread johndmiller
I believe that the cookie part needs to be sent to the browser before the html. You can put the set cookies any where in the php portion as long as the first thing you send is the cookie stuff setcookie.. html header info... html not html header info. setcookie html.. Hopes

Re: [PHP-DB] Cookies

2001-04-25 Thread Miles Thompson
Tobbe, The cookie information has to the first thing sent to the browser, ahead of everything else. You sometimes get trapped by having a single empty line at the top of your file. The page has to be reloaded for content of cookies to be read by the browser. Netscape has a short article on

[PHP-DB] Please help me to solve a question

2001-04-25 Thread David Lee
I used MySQL server to create a application database and access it by php program. But now,I can access it only one machine that is runing the server.Other computer can not access it through browser(Internet Explorer5.0).My networks is made up with windows98 peer to peer network.Please help me

[PHP-DB] file and mail

2001-04-25 Thread kancha
Hi all I have a text file with email addresses. Each line contains one email address. I read the file using file() function. Below is a snippet of my code $staff = file(staff); for($x=0; $xcount($staff); $x++){ $to = $staff[$x]; mail($to, New User Added, $mailBody, From: [EMAIL

RE: [PHP-DB] Retrieving and Printing Categories

2001-04-25 Thread Lager, Jeremy
append the correct 'ORDER BY' clause to the end of your SELECT statement syntax: ORDER BY fieldname_1 [[, fieldname_2], fieldname_n] shouldn't matter what tables they are in as long as you can get the records with SELECT -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] How to select [please HELP]

2001-04-25 Thread Michael Rudel
... AND recordid NOT LIKE '$recordid' I think this will do the job. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax:

Re: [PHP-DB] How to select [please HELP]

2001-04-25 Thread Brinzoi Constantin Aurelian
On Wed, 25 Apr 2001, David Tandberg-Johansen wrote: Hello! I am trying to select from a table where users add stuf. First I do: SELECT recordid,uid ,info FROM userstuff WHERE recordid LIKE '$recordid' Then I want to check if the user has more records in the table, based on the the

RE: [PHP-DB] Retrieving and Printing Categories

2001-04-25 Thread Lager, Jeremy
sorry jordan, ref. my last mail, use GROUP BY in exactly the same way -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: 25 April 2001 14:31 To: PHP Database Mailing List; PHP General Mailing List Subject: [PHP-DB] Retrieving and Printing Categories Hi, I've got a

Re: [PHP-DB] apache 1.3.9 pgsql 7.1 php4 on solaris 2.7

2001-04-25 Thread Yasuo Ohgaki
You can't load libpq.so, but pgsql.so. If you compiled PostgreSQL extension as self contained module. (Location of shared object is probably wrong, also) I suggest to compile PostgreSQL module in PHP. Minimum configure line would be ./configure --with-apxs --with-pgsql Make sure to use

Re: [PHP-DB] How to select [please HELP]

2001-04-25 Thread William Lai
Hi David, Perhaps you can modify your second query to the following way. SELECT recordid,uid,info FROM userstuff WHERE uid LIKE '$uid' AND recordid NOT LIKE '$recordid' -- Regards, William Lai -Original Message- From:David Tandberg-Johansen [EMAIL PROTECTED] Sent:Wed, 25 Apr

Re: [PHP-DB] file and mail

2001-04-25 Thread Sigitas Paulavicius
Hi all I have a text file with email addresses. Each line contains one email address. I read the file using file() function. Below is a snippet of my code $staff = file(staff); for($x=0; $xcount($staff); $x++){ $to = $staff[$x]; mail($to, New User Added, $mailBody, From: [EMAIL

[PHP-DB] Creating tables

2001-04-25 Thread Herman Wapenaar
Hi everyone I am using a website based in the states to which is PHP enabled. I am using MySQL. Is there a way to create a table with PHP? I do not see any command for that. I have loaded MySQL for Windows but the server runs MySQL on Unix. I don't know if the file structure is different.

Re: [PHP-DB] Creating tables

2001-04-25 Thread Brian S. Dunworth
At 08:00 AM 4/25/01 +0200, Herman Wapenaar wrote: I am using a website based in the states to which is PHP enabled. I am using MySQL. Is there a way to create a table with PHP? I do not see any command for that. Well, as an Oracle administrator, I may be going out on a limb here regarding

[PHP-DB] WML vs PHP and MYSQL

2001-04-25 Thread Kelvin
Hi, I am trying to retrieve data from MYSQL inside of PHP code which I placed under WML page. But every time I compile this file, it said compile error. Can anyone help? --3.php- ?php header(Content-type: text/vnd.wap.wml); echo(?xml version=\1.0\?\n);

Re: [PHP-DB] Creating tables

2001-04-25 Thread Miles Thompson
Check your MySQL docs for exact syntax on table creation ... then: Connect to the database Build a SQL statement that does what you want: $sql = CREATE TABLE blah, blah ..; Execute the statement: $result = mysql_query( $sql ); and check for errors, etc. Alternately, if this is a

[PHP-DB] MySql select and insert

2001-04-25 Thread johndmiller
Ok here is my problem. I have this database and the key is comprised of two fields, filename and path to file. When I read based on this key, I get 0 records found. When I insert the same record, it will say that the key already exists.(which id does). Why can't MySql findthe record. Also

[PHP-DB] query problem

2001-04-25 Thread Russ Michell
Hi all: I'm using mysql-3.22.32: My PHP-embedded query is as follows: else if($sortBy == '01') { $sql = SELECT * FROM $table_cal WHERE item_activity='$id' AND DATE_FORMAT('item_date','%m') LIKE '$sortBy'; $sortBy = Month of January; } * '$sortBy' is equal to '01'. *

[PHP-DB] Password field!

2001-04-25 Thread Pedro M. S. Oliveira
Hello all! i was wondering if any1 of you could help me with something. i have a table with 3 fields user_ip, user and pass. how can i encript the pass and then read compare it with a pass inserted on the web page? thanx *** Pedro Miguel Silva

Re: [PHP-DB] Creating tables

2001-04-25 Thread Subodh Gupta
Hi Herman, I am myself a pro at PHP, but I think, this would be of some help to you. To create a Table, you won't find a comand in PHP. However what you do is build a CREATE TABLE statement and pass that as an argument to mysql_query() function to do the job. Here is a small example:

Re: [PHP-DB] file and mail

2001-04-25 Thread Subodh Gupta
Hi Kancha, Since you are putting the From: [EMAIL PROTECTED] in double quotes, I believe that you need to esacape @ and (.) character by a slash. So you need to write From: sysadmin\@foo\.com Will anybody correct me if I am wrong? Subodh Gupta I have learned, Joy is not in things, it is in

[PHP-DB] Sybase datetime

2001-04-25 Thread Björn Dolkemeier
Hello, If I do a sybase_query(select getdate(),$Conn) this will return the current date in the format Nov 3 1998 8:06PM (so I don't have seconds). I think this leads to the usage of CS_SHORT_DATE in ext/sybase_ct/php_sybase_ct.c (Line 275). Does somebody know, if there is a solution for

[PHP-DB] How to keep selection on radio buttons when the form is refreshed?

2001-04-25 Thread Hector M Banda
Hi all, I have some radio buttons like: department, vendor, etc, on my form but at the time I submit or refresh the form, my radio buttons do not keep the selection. I have not idea in how to do tell PHP to keep the values of the objects when the form is refresed. Thanks, -hector --

Re: [PHP-DB] MySql select and insert

2001-04-25 Thread olinux o
what is your SQL select statement ? olinux --- johndmiller [EMAIL PROTECTED] wrote: Ok here is my problem. I have this database and the key is comprised of two fields, filename and path to file. When I read based on this key, I get 0 records found. When I insert the same record, it will

Re: [PHP-DB] How to keep selection on radio buttons when the form is refreshed?

2001-04-25 Thread Joel Gilbert
Hi, If you want to keep the selection, use the value of the form radio buttons to determine whether the button is selected or not. One way to do it is: ?php echo Radio1INPUT TYPE=RADIO NAME=radio1 VALUE=value; if( isset($radio3) ) { if( $radio1 == 'value' ) echo CHECKED;

RE: [PHP-DB] Password field!

2001-04-25 Thread David Balatero
Yes, that will work, just a) make sure that the password column in your database is 32 chars exactly [varchar(32) or something, as md5 hashes are 32 chars in length], and b) in the sql code you don’t want to say WHERE user = '$md5($pass)', rather, WHERE user = 'md5($pass)', or else it will treat

Re: [PHP-DB] extracting login name

2001-04-25 Thread Zak Greant
If you are running PHP as an Apache module, you should have access to the user authentication data as $PHP_AUTH_USER and $PHP_AUTH_PW - see the features section of the PHP manual for more information. --zak - Original Message - From: olinux [EMAIL PROTECTED] To: PHP-DB [EMAIL

[PHP-DB] Postgres/IIS/PHP3

2001-04-25 Thread J Northey
yep...Version 3 is still going strong. Q: Can php3 (on Win2k-IIS 5) be hooked up to Postgres? If so, where can one obtain the module to hook into php3? eg. extension=php3_pgsql.dll ??? regards, J Northey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP-DB] extracting login name

2001-04-25 Thread Zak Greant
Quite right - thanks for the correction Paul! :) --zak - Original Message - From: Paul Burney [EMAIL PROTECTED] To: olinux [EMAIL PROTECTED]; PHP-DB [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, April 25, 2001 11:07 PM Subject: Re: [PHP-DB] extracting login name on 4/26/01

Re: [PHP-DB] compilation does not support pg_cmdtuples()?

2001-04-25 Thread Yasuo Ohgaki
Oh. You seems to have php_pgsql.dll that pg_cmdtuples() compiled in. (Where did you get it? I don't have environment to compile PHP/Win and I need it) I guess all you need to do is copy php_pgsql.dll which works to other machine. Other possibility is your error_reporting. You might set E_ALL

[PHP-DB] Retrieving and Printing Categories

2001-04-25 Thread Jordan Elver
Hi, I've got a load of records that are in different categories. What is the best way to get all the records or selected records and print them in such a way that they are grouped (on the page) in their relevent category, like: Fruit - Apples - Pears - Bananas Vegetables - Carrots - Cabbages