[PHP-DB] cookie question

2002-04-02 Thread wesley grubbs:.
i set up a form a while back where people submit urls that are written to a db. the form is fully validated.. only...I have been getting several double submissions of the same url. so i want to prevent this from happening. javascript is out of the question. for a pop-up window.. to put an

RE: [PHP-DB] figuring out number of months between two dates

2002-04-02 Thread Rick Emery
select PERIOD_DIFF(DATE_FORMAT(2002-04-01,%Y%m), DATE_FORMAT(2001-0801,%Y%m) ) as dd; +--+ | dd | +--+ |8 | +--+ 1 row in set (0.00 sec) -Original Message- From: John Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 2:28 AM To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] autoincrement

2002-04-02 Thread Rick Emery
what command are you using? When posting questions, give all details...wee can't read your mind -Original Message- From: Daniel Broome [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 9:33 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] autoincrement I am trying to add auto

[PHP-DB] Variable names

2002-04-02 Thread kodrik
If I have a variable, how do I extract the name of the variable. In principle: $varname=somefunction($myvar); The value of $varname is then myvar How do I do it? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Variable names

2002-04-02 Thread kodrik
Kodrik wrote: If I have a variable, how do I extract the name of the variable. In principle: $varname=somefunction($myvar); The value of $varname is then myvar How do I do it? Sorry, this was meant for the general list. You an still reply though :) -- PHP Database Mailing List

[PHP-DB] odbc_pconnect

2002-04-02 Thread Maris Kalnins
Hi All! I have a situation where I need to keep connection still active after php script is done and page displayed! I tried to use $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw); But unfortunately connection closes automatically when script is done! What must I do to keep connection

[PHP-DB] mail()

2002-04-02 Thread James Kupernik
I'm trying to run a mail function .. the program is running, but I'm not getting the email. Here is the code .. any one have any ideas? $toaddress = $friendemail; $subject = A message from .$fromname..; $mailcontent = Here's a special message from a friend .Your friend,

Re: [PHP-DB] mail()

2002-04-02 Thread Maureen
You do not show where $fromemail, $friendemail and $fromname are defined. Shouldn't $toaddress be the first item in your mail function? Try echoing these 3 variables to make sure it is what you think it should be. HTH MB James Kupernik [EMAIL PROTECTED] said: I'm trying to run a mail

Re: [PHP-DB] mail()

2002-04-02 Thread Adam Voigt
You know that $fromaddress must have the correct header's to, right? Like just [EMAIL PROTECTED] will not be interepreted but something like Reply-to:[EMAIL PROTECTED] will set the Reply-to header correctly. Also, did you try taking out the dynamic values and just entering a hardcoded test

Re: RE: [PHP-DB] mail()

2002-04-02 Thread Adam Voigt
The last parameter of the mail command is for email headers, if you pass in just a single email address it doesn't know what you want to do with that since thats not a valid header. If you don't know what your doing with the last parameter then you don't need to have it, and should omit it, as it

[PHP-DB] invalid link resource after deserialization

2002-04-02 Thread Hrvoje Bogunovic
Hi all, I have a problem that I loose connection_id (i.e. it gets set to 0) when I propagate object through session. This results in an error message when I use this connection. Warning: Supplied argument is not a valid PostgreSQL link resource Object has member variable $db which is of

Re: [PHP-DB] how to get consistent UTC from gmmktime (w/o dst-offset) ????

2002-04-02 Thread Patrick Sibenaler
I'm getting my brain fried on this. Tried to figure out the results of you code. I think you're at the point where I really started to get worried. So I tried to put it into a more simple question: Why doesn't gmmktime(15,1,0,11,1,2002) return the SAME number (= epoch timestamp) when

[PHP-DB] odbc vs mysql

2002-04-02 Thread Maris Kalnins
When connecting to database (Sybase) through ODBC it takes some time to establish odbc connection with: $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw); And only after that I am able to access data through SQL Selects The problem is that every time the script is finished this connection

[PHP-DB] XSLT wihout Sablotron

2002-04-02 Thread Christian Weichel
Hi, does anybody know a way to use XSLT and PHP without Sablotron and Xerces or what ever is needed for it? greetz Christian W. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] XSLT wihout Sablotron

2002-04-02 Thread Christian Weichel
Hi, does anybody know a way to use XSLT and PHP without Sablotron and Xerces or what ever is needed for it? greetz Christian W. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] need some help...

2002-04-02 Thread Alex Behrens
Hey Guys, I'm new to this list and I need some help outputing some code to a .shtml file instead of using a dynamic php file. Can someoneh elp me get this working? I have a script that outputs headlines for reviews and I need to output it to a file for inserting into my page, because I can't

Re: [PHP-DB] need some help...

2002-04-02 Thread szii
Not really a database question, but why not... Step 1: Clean up the code... a) Convert all double-quote to single quotes in the HTML portion. I usually use doubles for PHP and singles for HTML. I hate having to escape quotes. b) Use of spacing

RE: [PHP-DB] need some help...

2002-04-02 Thread Jonathan Hilgeman
Thank you. Someone else exists who has the sense of mind to use single quotes. I hate looking at other people's code that has tons of \s in it. - Jonathan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 5:00 PM To: [EMAIL PROTECTED]

FW: [PHP-DB] need some help...

2002-04-02 Thread Peter Lovatt
hi Alex basically you load a variable with the contents of the page, and then write the contents of the variable to the file hope this helps Peter ?php //load page contents into a variable then write to file $retval.=' div align=left table border=0 cellpadding=0

RE: [PHP-DB] need some help...

2002-04-02 Thread Shrock, Court
If you want your output to validate xhtml, you had better make sure that your html looks like: a href=link.phpLink/a and NOT: a href='link.php'Link/a -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 4:52 PM To: '[EMAIL

[PHP-DB] PHP MySql

2002-04-02 Thread Mike Meighan
I need a good suggestion as I've been a Microsoft ASP developer but now getting more into PHP. It appears there are some issues about session ID's, cookies, and passing data from an NT box to PHP running on a Linux box. Would you folks reccommend I first stuff the data into the Linux box via

RE: [PHP-DB] PHP MySql

2002-04-02 Thread Shrock, Court
You could store session vars that are set on the NT box in mssql and then pass them to the linux box with the session id in the querystring and then have the linux box verify and fetch the session data from the MSSQL server...problem solved. www.freeTDS.org is where you can get the necessary

Re: [PHP-DB] need some help...

2002-04-02 Thread Alex Behrens
Awesome, thanks a ton! Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network:

Re: [PHP-DB] PHP MySql

2002-04-02 Thread Mike Meighan
Thanks, just as I had hit send on that messege, the thought of passing the session ID via a querystring hit me. I'm using linux for MySql and Secure Server processing so as data is being collected from various users while on the NT box, when it comes time for secure server type transactions, I

[PHP-DB] Re: autoincrement

2002-04-02 Thread Daniel Broome
Here is the info that I used,I think there is something elce that I have to do but I have done everything to my know how.. Please help SQL-query : ALTER TABLE `ajj47592`.`content` CHANGE `code` `code` TEXT NOT NULL AUTO_INCREMENT MySQL said: Incorrect column specifier for column 'code'

[PHP-DB] Re: autoincrement

2002-04-02 Thread Daniel Broome
Here is the info that I used, I know that there is something else that I have to add but I have done everything that I know... Please help... SQL-query : ALTER TABLE `ajj47592`.`content` CHANGE `code` `code` TEXT NOT NULL AUTO_INCREMENT MySQL said: Incorrect column specifier for column 'code'

[PHP-DB] Re: autoincrement

2002-04-02 Thread Glenn Holden
First, I think an AUTO_INCREMENT column must be a numeric column, not TEXT. Second, be sure this column is indexed. If you have trouble, send us the results of a DESCRIBE TABLE `ajj47592`.`content`; statement. That may help us give you some specific syntax to try. Glenn Daniel Broome

Re: [PHP-DB] Re: Database search question

2002-04-02 Thread olinux
I have a similar search. My table setup looks like this TABLE vendors: [ id | category_id | bla | bla | city | state | zip ] TABLE key_list: [ id | category_id | word ] sample data in key_list (category #1 - auto repair) [ 1 | 1 | automobile ] [ 2 | 1 | car ] [ 3 | 1 | repair ] [ 3 | 4 |

[PHP-DB] Re: odbc_pconnect

2002-04-02 Thread Peter Vereshagin
On Tue, 2 Apr 2002 18:27:40 +0300, Maris Kalnins [EMAIL PROTECTED] wrote: $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw); But unfortunately connection closes automatically when script is done! What must I do to keep connection alive and be able to use $cx again and again without

[PHP-DB] Selecting random record from a database?

2002-04-02 Thread Dan Swensen
Hi all, Does anyone know a quick and easy way to select a random record from a database? I'm looking to put together a simple random quote generator, a la linux's fortune. Any help would be much appreciated. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP-DB] Selecting random record from a database?

2002-04-02 Thread Beau Lebens
SELECT * FROM quotes ORDER BY RAND() LIMIT 1 something like that, take a quick look in the MySQL (or other) docs for the RAND() function. HTH Beau // -Original Message- // From: Dan Swensen [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 3 April 2002 1:45 PM // To: [EMAIL PROTECTED] //

[PHP-DB] odbc_pconnect doesnt reuse connection

2002-04-02 Thread Maris Kalnins
Hi! Configuration: WinXP, the latest Apache, PHP4 The problem is that every time the script runs and the following command is executed $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw); it happens very often that a new connection is created instead of reusing the old one! Is there any idea