Re: [PHP-DB] setting session variables via a form

2003-06-30 Thread Terry Romine
Not to beat a dead horse, but I have a problem associated with differences between 4.3 and 4.0.6. My local server (Mac OSX) is running 4.3 and has globals off. I designed the code to run with $_SESSION for my log in pages, and they work fine. Then I had to move the files to a client's server

Re: [PHP-DB] Storing an array in the database

2003-02-28 Thread Terry Romine
just as a quick fix. I use the following snip to take an array of choices, enter it into a varchar field (or text if you expect alot) and extract back to array: $choicesArray is a list of checkboxes from a form // put data into table $checkList = implode(;, $choicesArray);

[PHP-DB] question about access

2003-02-10 Thread Terry Romine
I'd like to get some opinions from the list. We run php/mysql on our linux servers located behind a firewall. Many of our clients have scripts that access their databases via php running on the hosting server, and the general access is set up as: $hostname = localhost; $database =

Re: [PHP-DB] picture into mysql (file address)

2002-12-19 Thread Terry Romine
One comment is to be sure the destination folder has write privileges for world. My typical usage is: 2) // datafile is field name for image/file upload browser $img_dir = ../photos; // must be 777 access if($datafile_name != ) { if ($datafile_name != none) {

Re: [PHP-DB] first Array value duplicating..

2002-11-07 Thread Terry Romine
An Real World example of how I do a similar thing might help: My list with checkboxes (since this is dynamic, I don't know what numbers are assigned) $itemID is the id of the record from the mysql table, so the check box name is 'chk_12' for id=12. $checkAll is a flag if the user selected the

[PHP-DB] sort by date

2002-11-06 Thread Terry Romine
I have two tables, one contains event information and the other dates that the event takes place: | id| int(11) | | PRI | 0 | auto_increment | | title | varchar(100) | YES | | NULL|| | location | varchar(100) | YES | | NULL

Re: [PHP-DB] sort by date

2002-11-06 Thread Terry Romine
Thanks. My error seemed to be just in the group declaration. Comparing yours and mine with slight modifications to yours that eventually worked as desired: yours: select e.id, title, min(event_date) as event_date from eventTable e, dateTable d where e.id = d.event_key group by e.id; mine:

Re: [PHP-DB] sort by date

2002-11-06 Thread Terry Romine
I have a manual and use it plus lots of sample code to work through, but there are times when we hit a wall and a simple second set of eyes to spot what should be obvious is helpful. I appreciate having a forum to throw out a question and get a rapid response. I could have rewritten this

[PHP-DB] assist with SORT array

2002-09-09 Thread Terry Romine
I am trying to accomplish is an array('Atomic Coffee', 'Duane's House Of Pizza','Hi-Ho Tavern','Speak Easy','Village Inn') Help?? Terry Romine Web Developer JumpInteractive.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Fwd: [PHP-DB] database result: tables with 2 coloumns

2002-09-06 Thread Terry Romine
my improvement is: === $counter = 1; echo table border=1tr; //start of table for ($i=0;$i$num_rows; $i++) //loop through the number of records { $row = mysql_fetch_array($result); //Get associate row echo td$row[0]/td; //Print out the NAME if($counter =(!

[PHP-DB] Comparison with formatted numbers

2002-07-30 Thread Terry Romine
I've run into a sticky case where my query is failing (PHP4.x/MySQL). I have a table where the price value is imported from an external source, so I can't change it on the fly, and they embed thousands seperators (in my case ','). When I try to do a query such as .. where price = '25' ..

[PHP-DB] multiple selections to input variables

2002-07-18 Thread Terry Romine
I have a form with a multi-line select field: select name=cities size=5 multiple ? $sql=select City from table group by City ;

Re: [PHP-DB] multiple selections to input variables

2002-07-18 Thread Terry Romine
Great!! Works like a charm. Terry On Thursday, July 18, 2002, at 10:27 AM, Jason Wong wrote: On Thursday 18 July 2002 23:18, Terry Romine wrote: I have a form with a multi-line select field: select name=cities size=5 multiple Use: select name=cities[] size=5

[PHP-DB] cookies multiple pages

2002-07-03 Thread Terry Romine
I'm having a problem with cookies over several pages. I've tried to set them up per the manual, ie: prior to header, and using setcookie('cookiename',$value,time()+3600). The cookie seems to be created fine on the first page, and passed to the second page, but is not maintained when the pages

Re: [PHP-DB] cookies multiple pages

2002-07-03 Thread Terry Romine
1) no, the commented setcookie(user_data,,time()+(3600));// set for 6 weeks *24*7*6 I would move the *24*7*6 back into the (3600) to make it so. I just want to test for an hour 2) so maybe this is a problem with the server? I've been tearing my hair out because neither cookies

Re: [PHP-DB] cookies multiple pages

2002-07-03 Thread Terry Romine
as in if (!isset($_COOKIE['user_data'])) { setcookie(user_data,,time()+(3600));// set for 6 weeks *24*7*6 } ?? nah.. that doesn't work either. It still creates a new cookie. On Wednesday, July 3, 2002, at 10:05 AM, [EMAIL PROTECTED] wrote: Is this a

Re: [PHP-DB] cookies multiple pages

2002-07-03 Thread Terry Romine
just checked and the server is running Apache 1.6.19 and PHP 4.0.6 Terry On Wednesday, July 3, 2002, at 09:52 AM, [EMAIL PROTECTED] wrote: Trust me this does not work with php 4.2.1 and apache 2.0.39 from what I am told if you get the cvs for apache 2.0.4 it should but I just down graded

Re: [PHP-DB] How do I get a ' in my sql statement?

2002-06-10 Thread Terry Romine
routine before assigning my string to a variable that will be used in a SQL statement? Thanks, Blaine -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Terry Romine Web Developer JumpInteractive.com -- PHP Database Mailing List (http

Fwd: [PHP-DB] PHP amd MYSQL

2002-06-05 Thread Terry Romine
delete.php Terry Romine Web Developer JumpInteractive.com

Re: [PHP-DB] move next

2002-05-16 Thread Terry Romine
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Terry Romine Web Developer JumpInteractive.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] session variables across several pages

2002-05-15 Thread Terry Romine
page (select_class.php) to process the form, does the data get reverted somehow? The data just doesn't seem to get updated to the form inputs. What might I be missing? Thanks in advance Terry Romine Web Developer JumpInteractive.com -- PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] session variables across several pages

2002-05-15 Thread Terry Romine
. Whatsupwiththat??? On Wednesday, May 15, 2002, at 09:57 AM, matt stewart wrote: You need to look up $HTTP_SESSION_VARS['name'] - that's how to change the variables when they are already set.. i think most people have this problem when they first use sessions! Terry Romine Web Developer

Re: [PHP-DB] session variables across several pages

2002-05-15 Thread Terry Romine
, May 15, 2002, at 09:57 AM, matt stewart wrote: You need to look up $HTTP_SESSION_VARS['name'] - that's how to change the variables when they are already set.. i think most people have this problem when they first use sessions! Terry Romine Web Developer JumpInteractive.com -- PHP

Re: [PHP-DB] session variables across several pages

2002-05-15 Thread Terry Romine
, 2002, at 11:01 AM, matt stewart wrote: don't think you can have an array as a session variable, you'd have to set it as character delimited string or something. Terry Romine Web Developer JumpInteractive.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP-DB] finding a link in large text blob

2001-12-03 Thread Terry Romine
Is there an easy way (say using eregi_replace) to find a link reference in a blob of text and add the a href anchor around it? Something like: text has a link to a website at http://www.whatever.com/mydirectory/mypage.html ... and converts it to text has a link to a

[PHP-DB] Embedding Perl

2001-10-24 Thread Terry Romine
I have a small situation where it would be good to be able to embed a perl routing in a php script. Is this possible? Or do I need to pass control from php to a perl script and return? A quick synopsis would be (in pseudo code) ?php if($theFileType == pdf { // call

Re: [PHP-DB] Embedding Perl

2001-10-24 Thread Terry Romine
. On Wednesday, October 24, 2001, at 11:05 AM, Terry Romine wrote: I have a small situation where it would be good to be able to embed a perl routing in a php script. Is this possible? Or do I need to pass control from php to a perl script and return? A quick synopsis would be (in pseudo code

Re: [PHP-DB] security in PHP under Apache

2001-05-23 Thread Terry Romine
But how do you set it so a webuser would run sudo? That sounds pretty dangerous, to me. I have a similar situation where I want PHP to create a subdirectory and set privileges to it based on the login user. I end up having to create the directory by hand via SSH and then run the php script.

[PHP-DB] PHP and Access

2001-05-23 Thread Terry Romine
I normally work PHP/MySQL but now I have a customer that is adamant about keeping their data in an Access DB. I tried to use ADODB to do generic access scripts, but that doesn't seem to work out for me. I get an unsupported function just trying to make a connection. One problem is that my

Re: [PHP-DB] variables

2001-03-29 Thread Terry Romine
On Thursday, March 29, 2001, at 04:58 PM, Scott Kalbach wrote: I have the individual queries in include files. It does the first 2 queries fine,but when it gets to the third, the value of $customer seems to be gone, so I get no result for the rest of the query's. I looked in my scripts

Re: [PHP-DB] Hold that insert!

2001-03-27 Thread Terry Romine
I like your simplicity and straightforwardness. My code tends toward: switch($submit) { case: "Accept": .. insert record break; case: "Delete": .. delete record break; case "Cancel": ..

Re: [PHP-DB] How to sort numerically ?

2001-03-23 Thread Terry Romine
"select data_name,data_number from myTable order data_number DESC" The "DESC" is descending. HTH Terry On Friday, March 23, 2001, at 03:02 PM, Sunil Jagarlamudi wrote: I am trying to read a file which has two columns with names and numbers and I am trying to sort them numerically, with

Re: [PHP-DB] How do I test on number of fields ?

2001-03-19 Thread Terry Romine
check where you are getting "$mysql_link" that is the problem I usually associate with the error you report. if $mysql_link is undefined, MySQL can't perform the query. Terry On Tuesday, March 20, 2001, at 12:06 AM, Toke Herkild wrote: $mysql_result = mysql_query($query,

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Terry Romine
even better to use: echo("\$PASS = $PASSbr\$PASSNOG = $PASSNOG"); which will show the variable name whether it has anything defined or not. Terry On Wednesday, March 14, 2001, at 03:21 PM, Ivo Stoykov wrote: Hi Duky Try to add this before if statement