[PHP-DB] PHP 4 inserting data in MySQL 3.23

2002-11-13 Thread Josh Jones
I'm running the following setup:
Apache 2.0.40-8
MySQL 3.23.52-3
PHP 4.2.2-8.0.5

I have no problems retreiving data from the database
and posting it to a website, but I can't insert data
from the website to the database via forms or
whatever.

I'm new to this, but I've triple checked all the
permissions and the code - it all works fine from the
MySQL command line. I can't find any errors in the
logs either, maybe I'm looking in the wrong place.

Here's a sample of some testing code:

html
body

?php

$db = mysql_connect(localhost, webuser);

mysql_select_db(example,$db);

$result = mysql_query(SELECT * FROM mytable,$db);

echo table border=1\n;

echo trtdName/tdtdPhone/tr\n;

while ($myrow = mysql_fetch_row($result)) {

printf(trtd%s/tdtd%s/td/tr\n, $myrow[0],
$myrow[1]);

}

echo /table\n;

?

/body
/html

html
body

?php

if ($submit) {

  // process form

  $db = mysql_connect(localhost, webuser);

  mysql_select_db(example,$db);

  $sql = INSERT INTO mytable (name, phone) VALUES
('$name','$phone');

  $result = mysql_query($sql);

  echo Thank you! Information entered.\n;

} else{

  // display form

  ?

  form method=post action=?php echo $PHP_SELF?

  Name:input type=Text name=namebr

  Phone:input type=Text name=phonebr

  input type=Submit name=submit value=Enter
information

  /form

  ?php

} // end if

?

/body
/html

Any help or direction pointing would be appreciated.

Thanks
 

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] PHP 4 inserting data in MySQL 3.23

2002-11-13 Thread Snijders, Mark
try before the :
if ($submit) 

this:

phpself();

the vars are now declared on a different way in the new phph versions


you need to do:

if ($_POST[submit]){


and the insert values are also now :

echo $_POST[phone];

so check phpinfo(); there are all the vars you need...

___ 

Mark Snijders, Developer 
Atos Origin 
Groenewoudeseweg 1, Room VN-515 
5621 BA  Eindhoven, The Netherlands 
*   : [EMAIL PROTECTED] 
*:+31 (0)40 - 2785992 (tel) 
* : +31 (0)40 - 2788729 (fax) 

The information in this mail is intended only for use of the individual or
entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
Access to this mail by anyone else than the addressee is unauthorized. If
you are not the intended recipient, any disclosure, copying, distribution or
any action taken omitted to be taken in reliance of it, is prohibited and
may be unlawful.



-Original Message-
From: Josh Jones [mailto:bootsec99;yahoo.com]
Sent: woensdag 13 november 2002 14:25
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP 4 inserting data in MySQL 3.23


I'm running the following setup:
Apache 2.0.40-8
MySQL 3.23.52-3
PHP 4.2.2-8.0.5

I have no problems retreiving data from the database
and posting it to a website, but I can't insert data
from the website to the database via forms or
whatever.

I'm new to this, but I've triple checked all the
permissions and the code - it all works fine from the
MySQL command line. I can't find any errors in the
logs either, maybe I'm looking in the wrong place.

Here's a sample of some testing code:

html
body

?php

$db = mysql_connect(localhost, webuser);

mysql_select_db(example,$db);

$result = mysql_query(SELECT * FROM mytable,$db);

echo table border=1\n;

echo trtdName/tdtdPhone/tr\n;

while ($myrow = mysql_fetch_row($result)) {

printf(trtd%s/tdtd%s/td/tr\n, $myrow[0],
$myrow[1]);

}

echo /table\n;

?

/body
/html

html
body

?php

if ($submit) {

  // process form

  $db = mysql_connect(localhost, webuser);

  mysql_select_db(example,$db);

  $sql = INSERT INTO mytable (name, phone) VALUES
('$name','$phone');

  $result = mysql_query($sql);

  echo Thank you! Information entered.\n;

} else{

  // display form

  ?

  form method=post action=?php echo $PHP_SELF?

  Name:input type=Text name=namebr

  Phone:input type=Text name=phonebr

  input type=Submit name=submit value=Enter
information

  /form

  ?php

} // end if

?

/body
/html

Any help or direction pointing would be appreciated.

Thanks
 

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] small database

2002-11-13 Thread Edward Peloke
I agree with the others, don't try to store the picture in the db.  What I
did was provide a place for users to log-in to my site, when they signed up,
I created a folder (using their username since that had to be unique).  When
they uploaded their pictures, I put the pictures in their folder and then
just put the path (/username/pic1.jpg) into the db as a string.

Eddie

-Original Message-
From: Seabird [mailto:jacco;vliegt.nl]
Sent: Tuesday, November 12, 2002 11:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] small database


Hi everyone,

I'm creating a sample site for a company that does aircraft sales. I use a
MySQL DB to store all the info of the available aircraft. Now, I would like
to store pictures directly inside that same table, so that on the details
page, it would provide a picture out of (for example) Field5. Is this
possible and if so how? (I tried blob etc., but can't get it to work).

Thanx,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] airport codes db

2002-11-13 Thread Edward Peloke
I am working on a php page where I need some airport codes data, I have seen
a few places online where you can buy this data so I was wondering if anyone
has used any of these databases and if anyone had a good source for a mysql
airport code db.

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Difference between 2 dates.. thoughts?

2002-11-13 Thread Aaron Wolski
Hi All,
 
First off I have a query like this:
 
SELECT dateinserted FROM SiteTrackingTable;
 
Now. in this query any number of results could be returned 10 or 1000,
etc.
 
Is it possible to take the dateinserted value from the first record and
then from the last record and perform some calculation to get the number
of days the record spans?
 
Haven't done something like this before and don't have a clue where to
start. Date sorting,etc I can do just don't know about this one.
 
Thanks for your help!
 
Aaron



[PHP-DB] Oracle9i and PHP

2002-11-13 Thread George Pitcher
Hi,

Can anyone point me in the direction of resources on PHP and Oracle9i
(Win2K). I have the db installed on my laptop, on which I already have PHP
running with IIS5 and would like to use PHP with Oracle.

Any tips (even if it's a 'waste of effort' type) would be welcome.

George in Oxford


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Pull Word Docs

2002-11-13 Thread Steve Dodkins
Hi

I'm trying to use the following

echo a href=\.$myrow[parts_proc].\Procedure/a;

where parts_proc contains the document path //ebmnw01/vol1/docs/proc1.doc

In Internet Explorer it pulls the document correctly but in Mozilla it tries
http:\\192.168.10.50\works\//ebmnw01/vol1/docs/proc1.doc is there another
way to represent the document path?

Regards

Steve Dodkins

IMPORTANT NOTICE The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended to
be relied upon by any person without subsequent written confirmation of its
contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
accuracy or completeness of this message as it has been transmitted over a
public network.   Furthermore, the content of this e-mail is the personal
view of the sender and does not represent the advice, views or opinion of
our company. Accordingly, our company disclaim all responsibility and accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation. In particular (but not
by way of limitation) our company disclaims all responsibility and accepts
no liability for any e-mails which are defamatory, offensive, racist or in
any other way are in breach of any third party's rights, including breach of
confidence, privacy or other rights. If you have received this e-mail
message in error, please notify me immediately by telephone. Please also
destroy and delete the message from your computer. Any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message is strictly prohibited.  If you have
received this E-mail in error, or suspect that the message may have been
intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
468555.
ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Difference between 2 dates.. thoughts?

2002-11-13 Thread Jason Vincent
You should be able to do this at the database level - of course you never
said what database that is.

Regardless, check your database documentation for the max() and min()
functions - never used these on date but they might work - do you always
want the first record and the last record in the database?  Or do you mean
the first and last record of the record set?  If you always want the first
record inserted and the last record inserted, than use max() and min() in
the unique database key (the unique record number) assuming you have one and
that they are sequential.

Then check for any date functions that might be able to tell the days
elapsed between to dates (in mySQL you might look at the interval function).

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Wednesday, November 13, 2002 11:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Difference between 2 dates.. thoughts?


Hi All,
 
First off I have a query like this:
 
SELECT dateinserted FROM SiteTrackingTable;
 
Now. in this query any number of results could be returned 10 or 1000, etc.
 
Is it possible to take the dateinserted value from the first record and then
from the last record and perform some calculation to get the number of days
the record spans?
 
Haven't done something like this before and don't have a clue where to
start. Date sorting,etc I can do just don't know about this one.
 
Thanks for your help!
 
Aaron



RE: [PHP-DB] Difference between 2 dates.. thoughts?

2002-11-13 Thread Aaron Wolski
Hi There,

Well the first and last record of the results.

So if 1000 records were found... then record #1 and then record #1000 -
perform data calculation between those 2 records (how many days does
this query span).

Know what I am trying to say?

Sorry if its not clear.

Aaron

-Original Message-
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 13, 2002 12:24 PM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Difference between 2 dates.. thoughts?

You should be able to do this at the database level - of course you
never
said what database that is.

Regardless, check your database documentation for the max() and min()
functions - never used these on date but they might work - do you always
want the first record and the last record in the database?  Or do you
mean
the first and last record of the record set?  If you always want the
first
record inserted and the last record inserted, than use max() and min()
in
the unique database key (the unique record number) assuming you have one
and
that they are sequential.

Then check for any date functions that might be able to tell the days
elapsed between to dates (in mySQL you might look at the interval
function).

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Wednesday, November 13, 2002 11:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Difference between 2 dates.. thoughts?


Hi All,
 
First off I have a query like this:
 
SELECT dateinserted FROM SiteTrackingTable;
 
Now. in this query any number of results could be returned 10 or 1000,
etc.
 
Is it possible to take the dateinserted value from the first record and
then
from the last record and perform some calculation to get the number of
days
the record spans?
 
Haven't done something like this before and don't have a clue where to
start. Date sorting,etc I can do just don't know about this one.
 
Thanks for your help!
 
Aaron



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Difference between 2 dates.. thoughts?

2002-11-13 Thread Jason Vincent
Test whether min() and max() work on date fields - never tried it.  Or check
the documentation on date and time functions for your database - they may
have something that does this.

If not, you could just do an order by date ascending and grab only the first
record, then an order by date descending and grab the first record of that.
Then you would need to use some date function (or php date module) to find
the span.  If you are using mysql, check out the INTERVAL function.

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Wednesday, November 13, 2002 12:27 PM
To: Vincent, Jason [BRAM:1334:EXCH]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Difference between 2 dates.. thoughts?


Hi There,

Well the first and last record of the results.

So if 1000 records were found... then record #1 and then record #1000 -
perform data calculation between those 2 records (how many days does this
query span).

Know what I am trying to say?

Sorry if its not clear.

Aaron

-Original Message-
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 13, 2002 12:24 PM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Difference between 2 dates.. thoughts?

You should be able to do this at the database level - of course you never
said what database that is.

Regardless, check your database documentation for the max() and min()
functions - never used these on date but they might work - do you always
want the first record and the last record in the database?  Or do you mean
the first and last record of the record set?  If you always want the first
record inserted and the last record inserted, than use max() and min() in
the unique database key (the unique record number) assuming you have one and
that they are sequential.

Then check for any date functions that might be able to tell the days
elapsed between to dates (in mySQL you might look at the interval function).

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Wednesday, November 13, 2002 11:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Difference between 2 dates.. thoughts?


Hi All,
 
First off I have a query like this:
 
SELECT dateinserted FROM SiteTrackingTable;
 
Now. in this query any number of results could be returned 10 or 1000, etc.
 
Is it possible to take the dateinserted value from the first record and then
from the last record and perform some calculation to get the number of days
the record spans?
 
Haven't done something like this before and don't have a clue where to
start. Date sorting,etc I can do just don't know about this one.
 
Thanks for your help!
 
Aaron





RE: [PHP-DB] Difference between 2 dates.. thoughts?

2002-11-13 Thread Aaron Wolski
Ok,
 
Thanks for your input. I know very little about how to manipulate MySQL
so this out to be fun and very slow going :-(
 
Thanks!
 
Aaron
 
-Original Message-
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 13, 2002 12:34 PM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Difference between 2 dates.. thoughts?
 
Test whether min() and max() work on date fields - never tried it.  Or
check the documentation on date and time functions for your database -
they may have something that does this.
If not, you could just do an order by date ascending and grab only the
first record, then an order by date descending and grab the first record
of that.  Then you would need to use some date function (or php date
module) to find the span.  If you are using mysql, check out the
INTERVAL function.
Regards, 
J 
 
-Original Message- 
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Wednesday, November 13, 2002 12:27 PM 
To: Vincent, Jason [BRAM:1334:EXCH]; [EMAIL PROTECTED] 
Subject: RE: [PHP-DB] Difference between 2 dates.. thoughts? 
 
Hi There, 
Well the first and last record of the results. 
So if 1000 records were found... then record #1 and then record #1000 -
perform data calculation between those 2 records (how many days does
this query span).
Know what I am trying to say? 
Sorry if its not clear. 
Aaron 
-Original Message- 
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 13, 2002 12:24 PM 
To: Aaron Wolski; [EMAIL PROTECTED] 
Subject: RE: [PHP-DB] Difference between 2 dates.. thoughts? 
You should be able to do this at the database level - of course you
never said what database that is. 
Regardless, check your database documentation for the max() and min()
functions - never used these on date but they might work - do you always
want the first record and the last record in the database?  Or do you
mean the first and last record of the record set?  If you always want
the first record inserted and the last record inserted, than use max()
and min() in the unique database key (the unique record number) assuming
you have one and that they are sequential.
Then check for any date functions that might be able to tell the days
elapsed between to dates (in mySQL you might look at the interval
function).
Regards, 
J 
 
-Original Message- 
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Wednesday, November 13, 2002 11:33 AM 
To: [EMAIL PROTECTED] 
Subject: [PHP-DB] Difference between 2 dates.. thoughts? 
 
Hi All, 
  
First off I have a query like this: 
  
SELECT dateinserted FROM SiteTrackingTable; 
  
Now. in this query any number of results could be returned 10 or 1000,
etc. 
  
Is it possible to take the dateinserted value from the first record and
then from the last record and perform some calculation to get the number
of days the record spans?
  
Haven't done something like this before and don't have a clue where to
start. Date sorting,etc I can do just don't know about this one.
  
Thanks for your help! 
  
Aaron 
 



Re: [PHP-DB] airport codes db

2002-11-13 Thread bbonkosk
You should take advantage of this highly international PHP communicty and set 
up a simple PHP interface to a table like:
Airport Code | Airport City | Airport Name | Country | etc..

And then ask people to go in there and insert whatever information they know 
especially from around their area.  Then you could post the rresulting mysql 
database somewhere for people's future use?

 I am working on a php page where I need some airport codes data, I have seen
 a few places online where you can buy this data so I was wondering if anyone
 has used any of these databases and if anyone had a good source for a mysql
 airport code db.
 
 Thanks,
 Eddie
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] airport codes db

2002-11-13 Thread alex hogan
You know that is an excellent idea.

alex
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:bbonkosk;tampabay.rr.com]
 Sent: Wednesday, November 13, 2002 6:38 AM
 To: Edward Peloke; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] airport codes db
 
 You should take advantage of this highly international PHP communicty
and set
 up a simple PHP interface to a table like:
 Airport Code | Airport City | Airport Name | Country | etc..
 
 And then ask people to go in there and insert whatever information
they know
 especially from around their area.  Then you could post the rresulting
mysql
 database somewhere for people's future use?
 
  I am working on a php page where I need some airport codes data, I
have seen
  a few places online where you can buy this data so I was wondering
if anyone
  has used any of these databases and if anyone had a good source for
a mysql
  airport code db.
 
  Thanks,
  Eddie
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] can i create an Access table or mdb with PHP?

2002-11-13 Thread John A DAVIS
I'm trying to supply our Contract Counties with mailing labels, already formatted. 
They log on to our website and PHP will hit our SQL Server and return a list of Public 
Water Systems for the County chosen. I would like a link on this page that says 
something like Send me an Access .mdb with mailing labels for these systems. PHP 
would delete whatever is in stock Access .mdb table somewhere on our system and 
replace the rows with newer, current ones, specific to the County chosen(same query 
that displays the systems in HTML). The Access .mdb that gets downloaded will have a 
report formatted for Avery 5160 labels, bound to the newer table that was filled. 
All they have to do is adjust their printer settings.

Does anyone have an easier way of supplying data formatted for mailing labels? If they 
do, I'm all ears(eyes). Since this is a bonus service, we don't want to have to have 
people involved providing this stuff to our counties.

tia
John Davis
IIS State of Oregon
Drinking Water Program


 [EMAIL PROTECTED] 11/12/02 09:12PM 
On Tue, 12 Nov 2002, John A DAVIS wrote:

 Want to give the user the ability to download a dynamic Access.mdb file
 that has a table and linked report formatted for Avery 5160 labels. Know
 how to create all this stuff in VBA code, but not using PHP.

 It is better to give too much information than not enough.

 You are trying to generate a dynamic Access.mdb file on the fly, using
 PHP?  Or you are trying to deliver this already existing file that changes
 sometimes with PHP?  Or you are trying to do something else?

 If the first option, where is your data coming from?

 If the second, why are you trying to use PHP instead of just linking to
 the Access.mdb file via the web server?

Peter
---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/ 
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Hutchins, Richard
Sounds like a looping problem in your code. Can you supply the code around
your INSERT statement so we can see what's going on?

The only times I've experienced anything Roswell about MySQL is when I've
written bad code.

Rich

 -Original Message-
 From: Toby Parkins [mailto:toby;uknetweb.com]
 Sent: Wednesday, November 13, 2002 1:42 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Multiply Auto_Increments
 
 
 Hi
 
 When ever I INSERT into a table with the values NULL into the ID
 (AUTO_INCREMENT) field it adds in 1-4 extra blank records after. These
 records have an AUTO_INCREMENT field which increases (+1) each time.
 
 Has anyone experienced this?
 
 Thanks,
 
 Toby Parkins
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Pull Word Docs

2002-11-13 Thread Peter Lovatt
Hi

If the webserver is delivering the doc you need the path relative to the
document, not the server file system.

If the word doc is off the web root I think

a href=get_doc.php?doc=proc1.docProcedure/a

and get_doc.php is

(assuming linux file system)

?php

include ('/ebmnw01/vol1/docs/proc1.doc')

?

If I have understood what you are doing

HTH

Peter


---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk]
Sent: 13 November 2002 16:53
To: Php-Db (E-mail)
Subject: [PHP-DB] Pull Word Docs


Hi

I'm trying to use the following

echo a href=\.$myrow[parts_proc].\Procedure/a;

where parts_proc contains the document path //ebmnw01/vol1/docs/proc1.doc

In Internet Explorer it pulls the document correctly but in Mozilla it tries
http:\\192.168.10.50\works\//ebmnw01/vol1/docs/proc1.doc is there another
way to represent the document path?

Regards

Steve Dodkins

IMPORTANT NOTICE The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended to
be relied upon by any person without subsequent written confirmation of its
contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
accuracy or completeness of this message as it has been transmitted over a
public network.   Furthermore, the content of this e-mail is the personal
view of the sender and does not represent the advice, views or opinion of
our company. Accordingly, our company disclaim all responsibility and accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation. In particular (but not
by way of limitation) our company disclaims all responsibility and accepts
no liability for any e-mails which are defamatory, offensive, racist or in
any other way are in breach of any third party's rights, including breach of
confidence, privacy or other rights. If you have received this e-mail
message in error, please notify me immediately by telephone. Please also
destroy and delete the message from your computer. Any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message is strictly prohibited.  If you have
received this E-mail in error, or suspect that the message may have been
intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
468555.
ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Toby Parkins
Richard,

Here is the code

$sql = 
INSERT INTO $table
(id,date,user,title,brief,body,expires,visible)

VALUES(NULL,\$date\,\$user\,\$title\,\$brief\,\$body\,\$exdate\,
\1\)
;

$connection = mysql_connect($dbhost, $dbusername, $dbpass) or die (Could
not connect to database);
$db = mysql_select_db($dbname) or die (could not select db.);
$result = mysql_query($sql,$connection) or die (Could not execute query);

The variables $date etc are from a POST form input

Any ideas?

Toby


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] can i create an Access table or mdb with PHP?

2002-11-13 Thread Anthony
You could use ODBC to do it.  Create a template access DB, poulate it 
with ODBC, then read the file and send it to the user.  After it's 
downloaded clear the table.  the downside to this is that you would only 
be able to haev one user ata time get an access database.  I'm sure 
there are better ideas, but this would work.

- Anthony

John A Davis wrote:
I'm trying to supply our Contract Counties with mailing labels, already formatted. They log on to our website and PHP will hit our SQL Server and return a list of Public Water Systems for the County chosen. I would like a link on this page that says something like Send me an Access .mdb with mailing labels for these systems. PHP would delete whatever is in stock Access .mdb table somewhere on our system and replace the rows with newer, current ones, specific to the County chosen(same query that displays the systems in HTML). The Access .mdb that gets downloaded will have a report formatted for Avery 5160 labels, bound to the newer table that was filled. All they have to do is adjust their printer settings.

Does anyone have an easier way of supplying data formatted for mailing labels? If they do, I'm all ears(eyes). Since this is a bonus service, we don't want to have to have people involved providing this stuff to our counties.

tia
John Davis
IIS State of Oregon
Drinking Water Program




[EMAIL PROTECTED] 11/12/02 09:12PM 



On Tue, 12 Nov 2002, John A DAVIS wrote:



Want to give the user the ability to download a dynamic Access.mdb file
that has a table and linked report formatted for Avery 5160 labels. Know
how to create all this stuff in VBA code, but not using PHP.



 It is better to give too much information than not enough.

 You are trying to generate a dynamic Access.mdb file on the fly, using
 PHP?  Or you are trying to deliver this already existing file that changes
 sometimes with PHP?  Or you are trying to do something else?

 If the first option, where is your data coming from?

 If the second, why are you trying to use PHP instead of just linking to
 the Access.mdb file via the web server?

Peter
---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/ 
---




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Hutchins, Richard
Looking at the code you've pasted in below, I don't see anything that would
result in one valid row plus additional blank rows.

Is the code you supplied in a script with any control structures like IF,
WHILE, or FOR? Is it included into a script in the middle of a control
structure? If you answered yes to any of the above questions, is it supposed
to be? Have you closed those control structures prior to executing the
INSERT?

If there is more code in the script, can you please paste it all? It's
possitble something else higher up in the script is causing the problem.
Sorry I wasn't more specific the first time.

Rich

 -Original Message-
 From: Toby Parkins [mailto:toby;uknetweb.com]
 Sent: Wednesday, November 13, 2002 2:16 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Multiply Auto_Increments
 
 
 Richard,
 
 Here is the code
 
   $sql = 
   INSERT INTO $table
   (id,date,user,title,brief,body,expires,visible)
 
 VALUES(NULL,\$date\,\$user\,\$title\,\$brief\,\$body\
 ,\$exdate\,
 \1\)
   ;
 
   $connection = mysql_connect($dbhost, $dbusername, 
 $dbpass) or die (Could
 not connect to database);
   $db = mysql_select_db($dbname) or die (could not select db.);
   $result = mysql_query($sql,$connection) or die (Could 
 not execute query);
 
 The variables $date etc are from a POST form input
 
 Any ideas?
 
 Toby
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] any free php mySql Host's?

2002-11-13 Thread Paul Ihrig
Hey guys.
i have a host at cfm-resources.com for coldfusion

but now that i am getting into php.
i would like to find a free host.

any ones out there?

thanks.

-paul
 
Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it. - Goethe
 
web developer, that is looking for work
http://www.PaulIhrig.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] airport codes db

2002-11-13 Thread Andy Crain
Or you could go here:
http://flyaow.com/airportcode.htm

Andy

-Original Message-
From: Edward Peloke [mailto:epeloke;echoman.com] 
Sent: Wednesday, November 13, 2002 1:32 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] airport codes db

great idea...I am setting up a webserver at home and as soon as it is
up, I
will create an interface!

Thanks,
Eddie

-Original Message-
From: [EMAIL PROTECTED] [mailto:bbonkosk;tampabay.rr.com]
Sent: Wednesday, November 13, 2002 7:38 AM
To: Edward Peloke; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] airport codes db


You should take advantage of this highly international PHP communicty
and
set
up a simple PHP interface to a table like:
Airport Code | Airport City | Airport Name | Country | etc..

And then ask people to go in there and insert whatever information they
know
especially from around their area.  Then you could post the rresulting
mysql
database somewhere for people's future use?

 I am working on a php page where I need some airport codes data, I
have
seen
 a few places online where you can buy this data so I was wondering if
anyone
 has used any of these databases and if anyone had a good source for a
mysql
 airport code db.

 Thanks,
 Eddie


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] mssql.datetimeconvert bug ?

2002-11-13 Thread Matt Brown
Hi All,

We have MS Sql Server 7 running backend and are running our reports via
PHP 4.2.3 (compiled with freetds), we have the flag
mssql.datetimeconvert = 0 set in the php.ini, but yet all date/time(s)
are returned as 'Nov 13 2002 02:26PM'...

This is driving us mad, everywhere we search for a solution says that
the flag mssql.datetimeconvert = 0 or Off fixes this problem, however in
our config it does not ...

Anyone have any suggestions ?

Regards

Matt Brown
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.417 / Virus Database: 233 - Release Date: 08/11/2002


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] date()

2002-11-13 Thread Edward Peloke
I have a date field in my mysql db, when I output the data to the screen, I
don't want to see the minutes, just the mmddyy.  I can format a date but
can't seem to get it to work passing in the value from
$myrow[datefield]any ideas?  I don't want to have to worry about just
pulling what I want in the select clause, I just want to format it when I
diplay it.

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] date()

2002-11-13 Thread Aaron Wolski
$date = date(m:d:y, $myrow[datefield]);

Will produce: 11:13:02

http://www.php.net/manual/en/function.date.php


Aaron


-Original Message-
From: Edward Peloke [mailto:epeloke;echoman.com] 
Sent: November 13, 2002 4:27 PM
To: Php-Db
Subject: [PHP-DB] date()

I have a date field in my mysql db, when I output the data to the
screen, I
don't want to see the minutes, just the mmddyy.  I can format a date but
can't seem to get it to work passing in the value from
$myrow[datefield]any ideas?  I don't want to have to worry about
just
pulling what I want in the select clause, I just want to format it when
I
diplay it.

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] date()

2002-11-13 Thread SELPH,JASON (HP-Richardson,ex1)
use the php function substr to chop off what you don't need, since all the
dates can come from mysql as -mm-dd or however, just use substr($mydate,
0, 10) or however far out, that truncates the actual $mydate.

-Original Message-
From: [EMAIL PROTECTED] [mailto:epeloke;echoman.com]
Sent: Wednesday, November 13, 2002 3:27 PM
To: Php-Db
Subject: [PHP-DB] date()


I have a date field in my mysql db, when I output the data to the screen, I
don't want to see the minutes, just the mmddyy.  I can format a date but
can't seem to get it to work passing in the value from
$myrow[datefield]any ideas?  I don't want to have to worry about just
pulling what I want in the select clause, I just want to format it when I
diplay it.

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] date()

2002-11-13 Thread Marco Tabini
If you don't want to change your SQL statement:

echo date ('Y/m/d', strtotime ($myrow['datefield']));


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

---BeginMessage---
I have a date field in my mysql db, when I output the data to the screen, I
don't want to see the minutes, just the mmddyy.  I can format a date but
can't seem to get it to work passing in the value from
$myrow[datefield]any ideas?  I don't want to have to worry about just
pulling what I want in the select clause, I just want to format it when I
diplay it.

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



---End Message---
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] date()

2002-11-13 Thread Jason Wong
On Thursday 14 November 2002 05:27, Edward Peloke wrote:
 I have a date field in my mysql db, when I output the data to the screen, I
 don't want to see the minutes, just the mmddyy.  

DATE fields in MySQL don't have the time (h:m:s).

 I can format a date but
 can't seem to get it to work passing in the value from
 $myrow[datefield]any ideas?  I don't want to have to worry about just
 pulling what I want in the select clause, I just want to format it when I
 diplay it.

If you're pulling the dates from the db and just using it purely for display 
then you may as well use DATE_FORMAT() on them in your query:

  ..., DATE_FORMAT(...) AS datefield, ...

where datefield is the name of your column holding the date.

If you're doing calculations on your dates in your PHP code then you should 
convert them using UNIX_TIMESTAMP() in your query.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
Only through hard work and perseverance can one truly suffer.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Multiple Inserts with mySQL

2002-11-13 Thread Peter Beckman
Try this:

$stack is an array of hashes:

$stack[0] = array(0=tablename, 1=insertid());

For each insert you do, push an anonymous array on $stack which includes
the tablename and insertid of the insert.

Then as you continue your inserts, if any of them fail, call a function
which takes that array $stack, and iterate through it, deleting the rows
you just inserted. (see mysql_insert_id() function to get the insert ID)

If none of them do fail, then you are in the clear.  Either unset $stack or
ignore it.

Peter

On Wed, 13 Nov 2002, Anthony wrote:

 I have to drop a lot of data into mySQL from PHP.  It will go into quite
 a few different tables.  How can I maintain integrity of the entire
 insert?  I need to do about a dozen inserts on four tables and I need to
 insure that all the inserts are successful or that none of them get
 done.  I'm sort of new at this, so please help me out.  Thanks.

 - Anthony


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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

2002-11-13 Thread chip . wiegand
Is this even possible? I have a menu that is generated from a table.
Typically, the menu items are links
to html pages. I would like to have the link bring up a list of items from
another table in the database,
not an html page. So I guess this would be a select statement linked from a
select 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 help me!)



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Toby Parkins
Hi Richard,

Thank you for all your time. It is nearly midnight here!

All the code including // test sections is
body background=#FF bgcolor=#FF
p
  ?
include(../include/config.php);
///
// To be finished
// if (checkdate($month, $day, $year)) {print (header etc.
redirection if date is wrong

$exdate = $year-$month-$day;
$date = date(Y-m-d);
$sql = 
INSERT INTO $table
(id,date,user,title,brief,body,expires,visible)

VALUES(NULL,\$date\,\$user\,\$title\,\$brief\,\$body\,\$exdate\,
\1\)
;

// test simple SQL
//  $sql = 
//  INSERT INTO $table
//
(NULL,\$date\,\$user\,\$title\,\$brief\,\$body\,\$exdate\,\1\)
//  ;

$connection = mysql_connect($dbhost, $dbusername, $dbpass) or die (Could
not connect to database);
//  if ($connection) { $msg = Database Connection Established; }
//  echo ($msg);
$db = mysql_select_db($dbname) or die (could not select db.);
$result = mysql_query($sql,$connection) or die (Could not execute query);
//  $result = mysql_query(insert into $table (user) values
('toby');,$connection) or die (Could not execute query);
//  if ($result) { $msg = brNews Article added; }
//  echo ($msg);
$close = mysql_close($connection) or die(Could not close database);
if ($close) {echo (brDatabase closed);};
?


Toby Parkins


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Arrays again

2002-11-13 Thread Martin Allan Jensen
Hi everyone,

I need a little help again

I have a array with 4 values:

320 - 570 - 860 - 960

Each time it extracts one value it's supposed to take minus it with the old value. So 
that the output for the array above would be:

320 - 250 - 290 - 100

I hope you get the point and you're able to help me...

FIRST im a totally jerk to ARRAYS

THANKS !!!


Regards Martin Allan Jensen


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Arrays again again

2002-11-13 Thread Martin Allan Jensen
Sorry fellers

Allready figured it outsorrynow i see that the question was foolish

Anyway now i need help with something else...

I now have some values:
320  -  250  -  290  -  100
And years that fits to them:
2002 - 2003 - 2004 - 2005

How can i put these dynamic values in a array. be carefull cause i need the array 
to be filled active in a loop, so i CAN only define ONE year, and ONE value in each 
LOOP!

THANKS!!!


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Shopping Cart Sessions - Think this is a simple prolem - hopefully

2002-11-13 Thread Boa Constructor
Evening all, I'm pretty stumped with this basic shopping cart I'm trying to integrate 
into my site, if u wanna see what I'm on about visit 
http://www.hostmaster-x.co.uk/Products.php.  On my products script I've got the 
following:

?php

$shoppingcart = array();

session_start();

session_register('shoppingcart');

if($buy != )

{

$shoppingcart[] = $buy;

//header(Location: $PHP_SELF);

/*

echo BCart contains: ?=count($shoppingcart)? items/BBRBRBR;

*/

//exit();

}

// Loads more code here ( code that works )


Of course I need a link so that I can buy a product, so I've got the following in a 
loop:  
echo a href=$PHP_SELF?buy=$iBuy/aBR;

The link works fine for each product, the problem is that the ID of the product 
doesn't seem to be stored in the session and I get a whole pile of mysql errors which 
don't appear in the same page when products are displayed.  The errors highlight the 
following code:

while($ProductDetails = mysql_fetch_array($Q))
{

$ProductID = $ProductDetails[ID];

$ProductName = $ProductDetails[ProductName];

$SellingPrice = $ProductDetails[SellingPrice];

$ProductPicture = $ProductDetails[PictureOfProduct];

$AmountInStock = $ProductDetails[AmountInStock];

$Description = $ProductDetails[ProductDescription];

$PictureOfProduct = $ProductDetails[PictureOfProduct];

}

if(mysql_num_rows($Q)  0)



Anyone got any ideas? I'm a bit lost as to why this doesn't work.

G :)



Public Sub House()

On Error Resume drink

 If Pint.empty = True Then
 Pint.refill
   Else
 Pint.drink
 End if

stomach.add Pint

MsgBox  I've had    stomach.count   Pints
MsgBox VERY DRUNK

End Sub




[PHP-DB] how to put all rows into an array

2002-11-13 Thread John A DAVIS
Is there anyway to take a resultset and cram it into an array?

In VB it would be the GetRows function:
myArray = rs.GetRows


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] how to put all rows into an array

2002-11-13 Thread Marco Tabini
while ($a[] = mysql_fetch_row ($rs));

should work


Marco
-- 

php|architect - The magazine for PHP Professionals
The monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!


On Wed, 2002-11-13 at 19:27, John A DAVIS wrote:
 Is there anyway to take a resultset and cram it into an array?
 
 In VB it would be the GetRows function:
 myArray = rs.GetRows
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: how to put all rows into an array

2002-11-13 Thread Adam Royle
No built-in function, but this can be handy (i have it inside a getData() function, 
which also lets me output data in a number of ways)

HTH, Adam

$sql = SELECT * FROM .;
$DB_RESULT = mysql_query($sql);

$arrData = array();
$rowCount = 0;

while ($r = mysql_fetch_array($DB_RESULT,MYSQL_ASSOC)){
 foreach ($r as $key = $value){
  $arrData[$rowCount++][$key] = $value;
 }
}





Re: [PHP-DB] Arrays again again

2002-11-13 Thread Marco Tabini
Perhaps I don't understand what it is you're looking for, but...

$a = array();
for ($i = 0; $i  $maxvalue; $i++)
{
$a[$year] = $value;
}

but this is almost too simple, which probably just means I didn't quite
understand your question.


Marco
-- 

php|architect - The magazine for PHP Professionals
The monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

On Wed, 2002-11-13 at 19:28, Martin Allan Jensen wrote:
 Sorry fellers
 
 Allready figured it outsorrynow i see that the question was foolish
 
 Anyway now i need help with something else...
 
 I now have some values:
 320  -  250  -  290  -  100
 And years that fits to them:
 2002 - 2003 - 2004 - 2005
 
 How can i put these dynamic values in a array. be carefull cause i need the 
array to be filled active in a loop, so i CAN only define ONE year, and ONE value in 
each LOOP!
 
 THANKS!!!
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Arrays again again

2002-11-13 Thread Peter Beckman
The problem there is that you've got $a[$year] getting set a bunch of
times.  That is busted code.  $a[$year] will only contain the LAST value.

Replace that line with this one.

$a[] = array(year=$year, value=$value);

OR

$a[$i] = array(year=$year, value=$value);

Now $a[0][year] = 2002
Now $a[0][value] = 320

And on and on.

Peter

On 13 Nov 2002, Marco Tabini wrote:

 Perhaps I don't understand what it is you're looking for, but...

 $a = array();
 for ($i = 0; $i  $maxvalue; $i++)
 {
   $a[$year] = $value;
 }

 but this is almost too simple, which probably just means I didn't quite
 understand your question.


 Marco
 --
 
 php|architect - The magazine for PHP Professionals
 The monthly worldwide magazine dedicated to PHP programmers

 Come visit us at http://www.phparch.com!

 On Wed, 2002-11-13 at 19:28, Martin Allan Jensen wrote:
  Sorry fellers
 
  Allready figured it outsorrynow i see that the question was foolish
 
  Anyway now i need help with something else...
 
  I now have some values:
  320  -  250  -  290  -  100
  And years that fits to them:
  2002 - 2003 - 2004 - 2005
 
  How can i put these dynamic values in a array. be carefull cause i need the 
array to be filled active in a loop, so i CAN only define ONE year, and ONE value in 
each LOOP!
 
  THANKS!!!
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] upload data to MySql

2002-11-13 Thread Seabird
Hi everyone,

I don't get my upload to work properly. It's a tutorial of the web, but it
doesn't function (unless I made a mistake). Please help me...
I have a form passing on 5 fields (text for testing), name: year, make,
model, price, picture and submit to PHP_SELF

?php
if ($submit) {

$db = mysql_connect(localhost,myname,mypassword);

mysql_select_db($test,$db);
//DB Test for testing...

$sql = INSERT INTO test (year,make,model,price,picture) VALUES
('$year,$make,$model,$price,$picture');
//I created these columns in the table test


echo year: $yearbr\n;
echo make: $makebr\n;
echo model: $modelbr\n;
echo price: $pricebr\n;
echo picture: $picturebr\n;
}

?

I know I need globals on for this.
Thanx for the help,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] upload data to MySql

2002-11-13 Thread Boa Constructor
I'm new to file uploads, however I managed to get it working.  Are you
copying the file after its been uploaded?  If not you need to do this as the
temp file is destroyed after the script has finished running so you need to
copy it if you wish to store it.  You also will have to chmod 777 to the
directory you wish to copy the file to.  It may help if we can see the
tutorial to try and find out exactly what you are doing.

I've been working from Build Your Own Database Driven Website Using PHP 
MySQL By Kevin Yank and its really helpful it covers file uploads.  I'm
also using PHP and MySQL Web Development by Luke Wellling and Laura
Thomson.  This covers file uploads also, infact I found it more helpful for
file uploads.


Hope this helps.

Cheers,

G :)

- Original Message -
From: Seabird [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 13, 2002 8:47 PM
Subject: [PHP-DB] upload data to MySql


 Hi everyone,

 I don't get my upload to work properly. It's a tutorial of the web, but it
 doesn't function (unless I made a mistake). Please help me...
 I have a form passing on 5 fields (text for testing), name: year, make,
 model, price, picture and submit to PHP_SELF

 ?php
 if ($submit) {

 $db = mysql_connect(localhost,myname,mypassword);

 mysql_select_db($test,$db);
 //DB Test for testing...

 $sql = INSERT INTO test (year,make,model,price,picture) VALUES
 ('$year,$make,$model,$price,$picture');
 //I created these columns in the table test


 echo year: $yearbr\n;
 echo make: $makebr\n;
 echo model: $modelbr\n;
 echo price: $pricebr\n;
 echo picture: $picturebr\n;
 }

 ?

 I know I need globals on for this.
 Thanx for the help,
 Jacco
 --
 http://seabird.jmtech.ca

 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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

2002-11-13 Thread Jason Wong
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 ...

 Typically, the menu items are links
 to html pages. I would like to have the link bring up a list of items from
 another table in the database,
 not an html page. So I guess this would be a select statement linked from a
 select statement?
 Is this even possible?

Yes, google - dynamic linked listbox php.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
The early bird who catches the worm works for someone who comes in late
and owns the worm farm.
-- Travis McGee
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] upload data to MySql

2002-11-13 Thread Jason Wong
On Thursday 14 November 2002 04:47, Seabird wrote:
 Hi everyone,

 I don't get my upload to work properly. It's a tutorial of the web, but it
 doesn't function (unless I made a mistake). 

HOW doesn't it function?

 Please help me...

You have to provide more information, like what you see when you submit the 
form and whether there were any error messages etc.

For starters, you should always set error reporting to MAX, and log errors to 
a file (if you're not displaying it to screen). These can be set in php.ini.

Next use print_r() on all your important variables at strategic places in your 
code so you can verify that they contain what you expect them to contain.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
Term, holidays, term, holidays, till we leave school, and then work, work,
work till we die.
-- C.S. Lewis
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] A Question on Javascript

2002-11-13 Thread Shahmat Dahlan


I have a question on Javascript, if you don't mind.
Say if I have a main page, whereby I would also have a html form which
contains a button. Let's call it main document.
When I click on the button it will open a new window, which refers to
another html page. Now, let's call it child document.
Now on this html page, say, I would like to search for an e-mail address,
and returns the value of the e-mail address from the child document
to the main document.
Regards and thanks in advance.




smime.p7s
Description: S/MIME Cryptographic Signature


RE: [PHP-DB] A Question on Javascript

2002-11-13 Thread Beau Lebens
Not that there is actually a question in there...
 
I assume your question is How do I pass a value from a window which was
opened via JavaScript, back to the window which opened it
 
Short answer: window.opener -- read up in a javascript reference manual
about this object.
 
Longer answer
after reading up on the above, you will find that you can manipulate the
elements on the opener of a window via javascript. This will allow you to
do things like get an email, then drop it back into a form field
(window.opener.formName.formField.value = foundEmailAddress or something
like that)
 
not that this has anything directly to do with PHP or Databases, let alone
both.
 
enjoy, have fun
 
Beau

-Original Message-
From: Shahmat Dahlan [mailto:shahmatd;sains.com.my]
Sent: Thursday, 14 November 2002 2:27 PM
To: PHP DB Mailing List
Subject: [PHP-DB] A Question on Javascript


I have a question on Javascript, if you don't mind. 

Say if I have a main page, whereby I would also have a html form which
contains a button. Let's call it main document. 


When I click on the button it will open a new window, which refers to
another html page. Now, let's call it child document. 
Now on this html page, say, I would like to search for an e-mail address,
and returns the value of the e-mail address from the child document 
to the main document. 


Regards and thanks in advance. 
  
  




[PHP-DB] Best reporting Tool

2002-11-13 Thread Mohammad Saad
Hi, I wanted to ask a question, Whats the best way of developing reports in
PHP. I mean in case of ASP, developers use Crystal Reports but apparently
PHP doesn't support Crystal Reports. so is there any other tool for me? or
should I use conventional method of writing database queries, PHP paging and
HTML table formatting to generate reports. The reason I am asking is this,
that for a particular project I need to come up with around 175 reports,
Although am sure some of the reports formats will be the same so I can just
switch queries in those. but still is there any other better way out, are
Oracle Reports supported in PHP?

Thanks in Advance
Saad


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php