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 an

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); mysql_query("upd

[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 = "clients

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

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 prob

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: sel

[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

[PHP-DB] assist with SORT array

2002-09-09 Thread Terry Romine
ee; size = 6 sorted: 1 What 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 ""; //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 "$row[0]"; //Print out the NAME > if($counter =(! $counte

[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' ..

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: >> > > Use: > > >

[PHP-DB] multiple selections to input variables

2002-07-18 Thread Terry Romine
I have a form with a multi-line select field: City; $cityCode = strtolower(eregi_replace(" ","_", $city)); $cityName = ucwords(strtolower($city));

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 > grad

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
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 cookie

[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] How do I get a ' in my sql statement?

2002-06-10 Thread Terry Romine
to the database. Anyone know a way around >> this? Do I have to send each string through a parsing routine before >> assigning my string to a variable that will be used in a SQL statement? >> >> >> Thanks, >> >> Blaine >> >> >>

Fwd: [PHP-DB] PHP amd MYSQL

2002-06-05 Thread Terry Romine
ot;; >> >> Then do: >> echo ' >> Header("Location: original_location.php"); >> >> You can't have any html previous to the Header command, though. >> >> This will return you to your original page where you can do your select >&g

Re: [PHP-DB] php.ini Question

2002-05-24 Thread Terry Romine
t; can handle.. is this a concern?? > > Setup: "OSX Server 10.1.4, PHP 4.2.1, Mysql 3.23.46" > > Cheers for any advice! > > Daz > Terry Romine Web Developer JumpInteractive.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] sessions

2002-05-23 Thread Terry Romine
r phpwizard > if not, there's plenty of source code for existing shopping cart systems > around these sites, so you can take them and rewrite it to your liking > and > design! > the wonders of open source! > 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

Re: [PHP-DB] Anti-virus alarm! Sulfbnk var inget virus.

2002-05-16 Thread Terry Romine
maybe one real one out of hundreds of hoaxes. I always check Symantec's site for bogus and real alerts. On Thursday, May 16, 2002, at 06:17 AM, Olav Bringedal wrote: > --- Craig Vincent <[EMAIL PROTECTED]> wrote: > > >>> >>> Sorry for the last email, it seems, this file >> "sulfnbk.exe" only

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

2002-05-15 Thread Terry Romine
. I got it. Thanks!! On Wednesday, May 15, 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 Dat

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 Develo

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

2002-05-15 Thread Terry Romine
> i think most people have this problem when they first use sessions! > 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
dated once the page is processed. If I am calling the same 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/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Terry Romine
Do I see a semicolon at the end of the while? that won't work... On Monday, May 13, 2002, at 04:35 PM, Gurhan Ozen wrote: > while ($row = mssql_fetch_array($rs)) _;_ > should be while ($row = mssql_fetch_array($rs)) { ... } Terry Romine We

Re: [PHP-DB] :: Alternating Rows :: Script With More Explaining ::

2001-12-07 Thread Terry Romine
Couldn't you use $alt=(!$alt); echo "\n"; On Thursday, December 6, 2001, at 03:07 PM, Vins wrote: > if(ereg("1$|3$|5$|7$|9$", $i)) { > $bg[$i] = "#FF"; > } else { > $bg[$i] = "#CC"; > } -- PHP Database Mailing List (htt

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

2001-12-06 Thread Terry Romine
Is everyone ignoring me?? This is the third time I have asked for assistance on this... Is there an easy way (say using eregi_replace) to find a link reference in a blob of text and add the anchor around it? Something like: "text has a link to a website at http://www.whatever.com/myd

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

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

[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 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 websi

Re: [PHP-DB] Embedding Perl

2001-10-24 Thread Terry Romine
o secondary file gets created. 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 re

[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) Alternatively, is there a module that can take a pdf file and m

Re: [PHP-DB] Uploading Files

2001-05-24 Thread Terry Romine
I've had problems enough with uploading files that I find the following checkpoints VERY important: 1) directory privileges (you indicate you have those set 777 2) the tag needs: a) enctype = "multipart/form-data" b) method = "post" HTH Terry On Thursday, May 24, 2001, at 12:1

[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 serv

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. T

Re: [PHP-DB] connecting to database..?

2001-05-20 Thread Terry Romine
I have a strange situation-- I have a php page that submits form data to MySql database and sends an email confirmation on completion. It works fine, but there were several people at one site that although the emails indicate the data was submitted successfully, the data never showed up in the

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 scrip

Re: [PHP-DB] Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Terry Romine
On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote: > Doesn't the command return 1 or 0 in success or failure? > > You may not have a result > > Probably wrong but something like > > if (mysql_query($query)) { > > } else { > > } What I understand is that the return from the query only

Re: [PHP-DB] My first question: PHP won't update MySQL

2001-03-28 Thread Terry Romine
You don't seem to do an insert with the new data. Terry On Wednesday, March 28, 2001, at 11:19 AM, Timothy D. Arnold wrote: > I believe that the problem is in the following batch of code... > > Thanks, > > Tim > [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscr

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": .. 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, wi

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, $mysql_l

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

2001-03-14 Thread Terry Romine
even better to use: echo("\$PASS = $PASS\$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 >echo("$PASS$PASSNOG");