[PHP-DB] undefined function error

2005-03-18 Thread Chip Wiegand
I have a web site that connects to a mysql database using this connect script - ? $db=mysql_connect(localhost,***,***); mysql_select_db(simradusa,$db); ? When I access the page it gives me this error - Fatal error: Call to undefined function: mysql_connect() in

[PHP-DB] regex question

2005-03-07 Thread Chip Wiegand
I am writing some regex on a php form to validate input and have come up with this, for example - if (empty($first) || !eregi(^[A-Za-z]+[- ]?[A-Za-z]+$, $first)) for checking a persons name. This allows a single name, or a hyphenated double name, or a non-hyphenated double name, and it works.

[PHP-DB] odd results when running this

2005-01-28 Thread Chip Wiegand
Okay, so I have got the php bits working in this web page but it is running 3 times every time the page loads, and I see no reason why (I have opened this page in two differant browsers). The code for the entire page is pasted below, it includes some calls to include files which are not

RE: [PHP-DB] odd results when running this

2005-01-28 Thread Chip Wiegand
= mysql_fetch_array($result)) { printf(pimg src=\hotspots/latest$x.gif\ alt=\%s\ title=\%s\/pp class=\footnote\%s/p, $row[alt-text], $row[title-text], $row[desc-text]); $x++; } ? bastien From: Chip Wiegand [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Subject: [PHP-DB

RE: [PHP-DB] odd results when running this

2005-01-28 Thread Chip Wiegand
... bastien From: Chip Wiegand [EMAIL PROTECTED] To: php-db@lists.php.net Subject: RE: [PHP-DB] odd results when running this Date: Fri, 28 Jan 2005 09:17:35 -0800 Thanks for the tips. I find this confusing - I have 3 statements pulling 3 differant images, so I don't understand why

RE: [PHP-DB] storing images in database

2005-01-26 Thread Chip Wiegand
Thanks for all the tips guys. I'll keep the last couple for future reference. -- Chip Gareth Heyes [EMAIL PROTECTED] wrote on 01/26/2005 05:30:45 AM: if(isset($_GET['id'])) { $id=$_GET['id']; $query = select bin_data, filetype from binary_data where id=$id; This is a really bad

[PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
I have stored a .jpg image in a database, then when I make a sql statement to display that image on a web page all I get is the cryptic code in place of the image. I am storing it in a row configured as a blob, mime type image/jpeg and binary (using phpMyAdmin). What am I doing wrong? Regards,

RE: [PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
=$id; $result = @MYSQL_QUERY($query); $data = @MYSQL_RESULT($result,0,bin_data); $type = @MYSQL_RESULT($result,0,filetype); Header( Content-type: $type); echo $data; }; ? bastien From: Chip Wiegand [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Subject: [PHP-DB] storing

RE: [PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
the default is the record_id that corresponds back to the id of the row with the image blob field. Bastien From: Chip Wiegand [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: PHP DB php-db@lists.php.net Subject: RE: [PHP-DB] storing images in database Date: Tue, 25 Jan 2005 12:57:40 -0800

[PHP-DB] query of two tables returns too many rows, many more than the two tables contain

2004-11-11 Thread Chip Wiegand
the rows that are in the dealers table but not in the blackgate_users table. Thanks for any help, Chip Wiegand Computer Services Simrad, Inc 425-778-8821 425-771-7211 (FAX) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] query of two tables returns too many rows, many more than the two tables contain

2004-11-11 Thread Chip Wiegand
is DealnerName in both cases. The WHERE clause says only show us where DealerName is null (meaning no corresponding record in blackgate_users). I think that'll do it for ya. -TG -Original Message- From: Chip Wiegand [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11, 2004 4:28

[PHP-DB] I'm not getting any mailing list messages

2004-08-12 Thread Chip Wiegand
I just subscribed to the list yesterday and have yet to receive any messages from the list. Any ideas? -- Chip Wiegand Computer Services Simrad, Inc 425-778-8821 425-771-7211 (FAX)

[PHP-DB] How to do an update with arithmetic from a user input

2004-08-12 Thread Chip Wiegand
pasted in the main part of the code below... Thanks for any help you can provide, Chip Wiegand Computer Services Simrad, Inc 425-778-8821 425-771-7211 (FAX) BTW, thanks for the replys to the first message, I was expecting the list to be much more busy

Re: [PHP-DB] How to do an update with arithmetic from a user input

2004-08-12 Thread Chip Wiegand
Justin Patrin [EMAIL PROTECTED] wrote on 08/12/2004 12:55:24 PM: On Thu, 12 Aug 2004 12:46:19 -0700, Chip Wiegand [EMAIL PROTECTED] wrote: I have an existing database and web page showing the query results. I have added another field to allow a user to input a two digit number. I want

Re: [PHP-DB] How to do an update with arithmetic from a user input

2004-08-12 Thread Chip Wiegand
Justin Patrin [EMAIL PROTECTED] wrote on 08/12/2004 01:37:35 PM: Unless $part_number is a number, you're going to want to put quotes around it. Well, actually, you want to run mysql_real_escape_string() on it. You also don't seem to have an end to that if statement. Usually, people use

RE: [PHP-DB] address info, forms, maintanance

2003-06-06 Thread chip . wiegand
John W. Holmes [EMAIL PROTECTED] wrote on 06/04/2003 05:24:22 PM: Thanks to everyone for the suggestions. Got it fixed. Just added a couple lines of code - $sql1 = select * from endusers where name like '$name'; $result1 = mysql_query($sql1); $count1 =

[PHP-DB] address info, forms, maintanance

2003-06-05 Thread chip . wiegand
I need to modify some company web pages that include a form for asking the company departments questions, such as service dept, etc. As the forms are currently built there is some field validation but no cookies. This info is saved in a mysql database, problem is, there are duplicate entries,

Re: [PHP-DB] address info, forms, maintanance

2003-06-05 Thread chip . wiegand
Dan Brunner [EMAIL PROTECTED] wrote on 06/04/2003 01:24:13 PM: Hello!! Are talking about the same Post Question??? On another words, what is being duplicated?? If not, you can use auto_increment. Dan This pertains to every time a person visits the page and fills in the form - today,

Re: [PHP-DB] address info, forms, maintanance

2003-06-05 Thread chip . wiegand
Thanks to everyone for the suggestions. Got it fixed. Just added a couple lines of code - $sql1 = select * from endusers where name like '$name'; $result1 = mysql_query($sql1); $count1 = mysql_num_rows($result1); if ($count1 == 0 ) $sql = insert into endusers..blah

Re: [PHP-DB] Odd browser problem with sessions

2003-01-29 Thread chip wiegand
), and no one I've talked to on the phone has had this problem in any browser other than IE, and there have been many calls about this. Any idea what this might be caused by? Thanks, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason

[PHP-DB] Odd browser problem with sessions

2003-01-28 Thread chip . wiegand
. This behavior appears to only effect IE, I saw it once on either Netscape or Mozilla (I don't recall which), and no one I've talked to on the phone has had this problem in any browser other than IE, and there have been many calls about this. Any idea what this might be caused by? Thanks, -- Chip

[PHP-DB] query results page ignores style sheet reference

2002-12-12 Thread chip . wiegand
by the results page. This is quite strange. Anyone seen this behavior before? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation

[PHP-DB] database update question

2002-11-15 Thread chip . wiegand
that changed the file name for id 11 to %.zip. Is there a way to change all the entries from .pdf to .zip without writing an update statement for each individual row? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer

[PHP-DB] database update question

2002-11-15 Thread chip . wiegand
that changed the file name for id 11 to %.zip. Is there a way to change all the entries from .pdf to .zip without writing an update statement for each individual row? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer

Re: [PHP-DB] a menu item from a database, linked to a list from a anothertable

2002-11-14 Thread chip . wiegand
Jason Wong [EMAIL PROTECTED] wrote on 11/13/2002 10:46:32 PM: On Thursday 14 November 2002 07:32, [EMAIL PROTECTED] wrote: Is this even possible? I have a menu that is generated from a table. What is your menu -- a set of a tags? or a selector box? I suspect you mean the latter ... Not a

[PHP-DB] a menu item from a database, linked to a list from a another table

2002-11-13 Thread chip . wiegand
statement? Is this even possible? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 8? Somebody

Re: [PHP-DB] alter table statement from within php web page

2002-10-01 Thread Chip Wiegand
Forget it, It works, I was entering a field name with a space in it, and that was causing the problem. Duh! -- Chip phpdbOn Tue, 2002-10-01 at 22:01, Chip Wiegand wrote: I would like to know how to add columns to an existing table. I've tried this - $qry = mysql_query(alter table exercises

[PHP-DB] alter table statement from within php web page

2002-10-01 Thread Chip Wiegand
I would like to know how to add columns to an existing table. I've tried this - $qry = mysql_query(alter table exercises add column $fieldname char($length) not null) or die(sql_error()); but it doesn't work, I get this error - 1064: You have an error in your SQL syntax near 'lifts, char(25),

[PHP-DB] big sessions problem - page refusing to load, but will if I skip the logonpage

2002-09-30 Thread chip . wiegand
get this fixed ASAP, perminently, this is a business web site. The code for the login screen and the main page are pasted below. Regards, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken

[PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread chip . wiegand
the user being forced to go through the logon screen? Thanks, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977

Re: [PHP-DB] how do I echo this statement to the browser? -solved

2002-09-21 Thread Chip Wiegand
, l_name, COUNT(*) AS Total_Kids FROM kids GROUP BY l_name JOIN SELECT COUNT(*) AS Total_Rows FROM kids HTH Ignatius - Original Message - From: Chip Wiegand [EMAIL PROTECTED] To: phpdb [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 7

[PHP-DB] how do I echo this statement to the browser?

2002-09-20 Thread Chip Wiegand
I want to get the first name, last name, total row count, and total time a name appears in the database. Something like this - select f_name, l_name, count(*) as 'Total Kids', count distinct l_name from kids group by l_name it doesn't work of course, the count distinct l_name part is completely

[PHP-DB] update db problem

2002-09-10 Thread chip . wiegand
of updating the current item in the db, it is submitting another row into the database, giving multiple rows of the same rma, but with each one showing it's edits over time. This would be fine for historical purposes, but not what I want. What am I doing wrong? -- Chip Wiegand Computer Services

[PHP-DB] verify text entry in a textarea doesn't work

2002-08-27 Thread chip . wiegand
comments/li/font\n; } I use the same type of checking on input type=text boxes and it works fine. Any ideas why it doesn't work on a textarea field? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken

Re: [PHP-DB] verify text entry in a textarea doesn't work

2002-08-27 Thread chip . wiegand
, whereas before it was one tab furthor into the box, now I know why that happens also. thanks, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital

Re: [PHP-DB] keeping form field data when reloading a form

2002-08-21 Thread chip . wiegand
there is a way to keep the existing data in the fields so the end-user will only have to change the incorrect fields, and not have to re-enter all the data. But how? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would

[PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
this and it allows as many letters as I put in there, but not 1 only. What's wrong? Also, when using eregi do I need to specify A-Za-z or just a-z, since it is case-insensitive? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
Jason Wong [EMAIL PROTECTED] wrote on 08/21/2002 10:00:23 AM: On Thursday 22 August 2002 00:29, [EMAIL PROTECTED] wrote: I hope this isn't too far off topic - I have a regex for validating email addresses - if (empty($useremail) || !eregi(^([A-Za-z0-9\.\_-])+@([A-Za-z0-9\_-]) +\.

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
Jason Wong [EMAIL PROTECTED] wrote on 08/21/2002 12:10:02 PM: It's only checking for addresses of the form [EMAIL PROTECTED] As you can see, the list address ([EMAIL PROTECTED]), and my address ([EMAIL PROTECTED]) would be treated as invalid. Not very clever is it? Got it figured out, and

[PHP-DB] what's wrong with this ereg?

2002-08-20 Thread chip . wiegand
this? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 9? Somebody help me!) -- PHP

Re: [PHP-DB] what's wrong with this ereg?

2002-08-20 Thread chip . wiegand
/var/www/html/auth_dealers/user_input2.php on line 70 and on another server I get this error: Parse error: parse error, unexpected T_BOOLEAN_OR in /usr/local/apache/htdocs/auth_dealers/user_input2.php on line 70 What do I need to do to fix this? -- Chip Wiegand Computer Services

[PHP-DB] keeping form field data when reloading a form

2002-08-20 Thread chip . wiegand
, and not have to re-enter all the data. But how? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 9

Re: [PHP-DB] oddity with insert multiple input fields to multipletables

2002-08-18 Thread Chip Wiegand
is optional. I thought I would try to test for any of the 3 being empty but it didn't work. -- Chip On Sat, 2002-08-17 at 17:08, Chip Wiegand wrote: I have a web page interface to a mysql database. In this web page I have about a dozen form input fields. On submit these are submitted to multiple

Re: [PHP-DB] oddity with insert multiple input fields tomultipletables

2002-08-18 Thread Chip Wiegand
: Chip Wiegand [mailto:[EMAIL PROTECTED]] Sent: Sunday, 18 August 2002 7:08 AM To: phpdb Subject: [PHP-DB] oddity with insert multiple input fields to multiple tables I have a web page interface to a mysql database. In this web page I have about a dozen form input fields

Re: [PHP-DB] oddity with insert multiple input fields tomultipletables

2002-08-18 Thread Chip Wiegand
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: if (!isnull($date_am || $exercise_am || $reps_am)) then mysql_query($sql_am) or die (Error in this query $sql : .mysql_error()); Try: if(!isnull($date_am) !isnull($exercise_am) !isnull($reps_am)) This should IMO work :) -Joni-

Re: [PHP-DB] oddity with insert multiple input fields tomultipletables

2002-08-18 Thread Chip Wiegand
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: if (!isnull($date_am || $exercise_am || $reps_am)) then mysql_query($sql_am) or die (Error in this query $sql : .mysql_error()); Try: if(!isnull($date_am) !isnull($exercise_am) !isnull($reps_am)) This should IMO work :) -Joni-

Re: [PHP-DB] oddity with insert multiple input fields - olved

2002-08-18 Thread Chip Wiegand
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: if (!isnull($date_am || $exercise_am || $reps_am)) then mysql_query($sql_am) or die (Error in this query $sql : .mysql_error()); Try: if(!isnull($date_am) !isnull($exercise_am) !isnull($reps_am)) This should IMO work :) -Joni-

[PHP-DB] oddity with insert multiple input fields to multiple tables

2002-08-17 Thread Chip Wiegand
I have a web page interface to a mysql database. In this web page I have about a dozen form input fields. On submit these are submitted to multiple tables, a differant table for each input field. If I leave any fields blank, and insert only some of the fields, the database will insert an empty

[PHP-DB] user authentication problem

2002-08-13 Thread chip . wiegand
; } } if ( ! $auth ) { header( 'WWW-Authenticate: Basic realm=Private' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { header( 'Location: http://www.simradusa.com/auth_dealers/dealers_page.php' ); } ? -- Chip Wiegand Computer Services Simrad, Inc

[PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
ItemNumber $description= odbc_result( $result, 3 ); // get the field ItemDescription echo trtd$brand/tdtd$number/tdtd$description/td/tr \n; } echo /table; echo /body/html; ? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
$number= odbc_result( $result, 2 ); // get the field ItemNumber $description= odbc_result( $result, 3 ); // get the field ItemDescription echo trtd$brand/tdtd$number/tdtd$description/td/tr \n; } echo /table; echo /body/html; ? -- Chip Wiegand

RE: [PHP-DB] problem getting form input field to become part ofquery statement

2002-08-04 Thread Chip Wiegand
PROTECTED] -Original Message- From: Chip Wiegand [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 03, 2002 12:51 AM To: phpdb Subject: [PHP-DB] problem getting form input field to become part of query statement I have a form with a select list and a hidden field to save the selected

[PHP-DB] problem getting form input field to become part of query statement

2002-08-02 Thread Chip Wiegand
I have a form with a select list and a hidden field to save the selected item. On submit another page is loaded with a few fields to be filled in and submitted to a table. Using get I see the data is being passed from the first page to the second properly, and the second page sends its data

Re: [PHP-DB] extract data from database into an array

2002-07-15 Thread chip . wiegand
Adam Alkins [EMAIL PROTECTED] wrote on 07/13/2002 07:56:46 PM: I have a database, all the data is numbers. I want to make a query that will extract the data and then make it available in an array, so the array is populated 'real-time'. I could just enter the number into an array

[PHP-DB] A problem with insert to mysql from a web interface

2002-07-13 Thread Chip Wiegand
I just set up a pc with mysql-3.23.51/php-4.2.1/apache-1.3.26. I have created a database and tables and a web interface to insert data into it. I can insert data from the command line just fine. From the web interface there is nothing inserted and no error messages. I have tried connection string

Re: [PHP-DB] A problem with insert to mysql from a web interface

2002-07-13 Thread Chip Wiegand
On Sat, 2002-07-13 at 00:52, Jason Wong wrote: On Saturday 13 July 2002 14:49, Chip Wiegand wrote: I just set up a pc with mysql-3.23.51/php-4.2.1/apache-1.3.26. I have created a database and tables and a web interface to insert data into it. I can insert data from the command line just

[PHP-DB] extract data from database into an array

2002-07-13 Thread Chip Wiegand
I have a database, all the data is numbers. I want to make a query that will extract the data and then make it available in an array, so the array is populated 'real-time'. I could just enter the number into an array manually, but I want to automate the job. I don't know what to start looking

[PHP-DB] Graphing data

2002-07-10 Thread chip . wiegand
Is there any application available that can take data from my mysql database and draw graphs? I am using mysql/php on FreeBSD. -- Chip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] need a solution for web page navigation

2002-06-14 Thread chip . wiegand
trying to do please attempt to help... -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 9

[PHP-DB] sql query problem

2002-06-14 Thread chip . wiegand
column only) and blue2 (name column only) like this- title1 blue2 I am finding it difficult to write the proper select statement to get just those items in a web page using php/mysql. Suggestions? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED

[PHP-DB] looking for a particular script, or how-to...

2002-03-07 Thread chip . wiegand
the database. Any suggestions? -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 7? Somebody help me!)

[PHP-DB] Why the following error, yet it works anyway

2002-01-14 Thread chip . wiegand
/a/center /body /html -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why

RE: [PHP-DB] Why the following error, yet it works anyway

2002-01-14 Thread chip . wiegand
=bulletin_admin.phpBack/a/center /body /html -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment