[PHP] table troubles

2001-10-30 Thread Nikola Veber

Hi !

I'm making a web site which allows user to add his own news, or other data to the page 
via the form. The user inputs the data into the textarea and the data is placed into 
a 
table. The problem is that all the text is placed into a single line !
Is there a html catch to prevent this, or I'll have to break the string into the 
smaller 
parts ? This is not so good, because of the screen resolution ...

Help !!!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] table troubles

2001-10-30 Thread Morten Winkler Jørgensen

NV Hi !

NV I'm making a web site which allows user to add his own news, or other data to the 
page 
NV via the form. The user inputs the data into the textarea and the data is placed 
into a 
NV table. The problem is that all the text is placed into a single line !
NV Is there a html catch to prevent this, or I'll have to break the string into the 
smaller 
NV parts ? This is not so good, because of the screen resolution ...

NV Help !!!


TEXTAREA WORDWRAP= PHYSICAL or VIRTUAL ...

Physical inserts newlines into the text whenever needed
Virtual just wraps the text in the area.



-- 
Kind regards,
  Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Fatcow and MySQL-Front

2001-10-30 Thread Nikola Karoviæ

Hi,
can't you do that with phpMyAdmin. If you dont have that on fatcow, you can
put it your self and then load a database file.
-
volim popit, volim zagalamit

- Original Message -
From: René Fournier [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: 30. listopad 2001 00:04
Subject: [PHP] Fatcow and MySQL-Front


 Hi All,

 Little problem:  I want to transfer my MySQL database--a collection of 10
or
 so tables, with data--to my Fatcow account.  They provide some lame MySQL
 tools, but nothing to faciliate moving an existing database, full of data,
 to their server.  I tried using MySQL-Front to connect to their server,
but
 it was rejected for some reason (their tech support acknowledged that
 MySQL-Front doesn't work with Fatcow (?)).  Can anyone recommend a way for
 me to get my database and data onto Fatcow?  I have asked their Tech
 Support, but they weren't very supportive...

 Much appreciated.

 ...Rene


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] virtual

2001-10-30 Thread Nikola Karoviæ

you could try using require(/cgi-bin/folder/program.pl); instead
-
volim popit, volim zagalamit
- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 30. listopad 2001 04:41
Subject: [PHP] virtual


 What would cause a fatal error using virtual(/cgi-bin/folder/program.pl);
?

 TIA
 Gary


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] table troubles

2001-10-30 Thread Nikola Veber

Hi !

I'm making a web site which allows user to add his own news, or other data to the page 
via the form. The user inputs the data into the textarea and the data is placed into 
a 
table. The problem is that all the text is placed into a single line !
Is there a html catch to prevent this, or I'll have to break the string into the 
smaller 
parts ? This is not so good, because of the screen resolution ...

Help !!!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] cookie, port 80

2001-10-30 Thread php-general

How can i send a cookie and specify the server port ?

(i try www.mydomain.com:2000 but don't work)

franck


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] unsubscribe josh@gfunk007.com

2001-10-30 Thread Josh McDonald

unsubscribe [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] DB wrapper

2001-10-30 Thread Alberto

Any1 knows about a good class for DB abstraction? I need some scripts to
work with mysql/pgsql.

Thnx



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: DB wrapper

2001-10-30 Thread _lallous

try http://phpclasses.upperdesign.com


Alberto [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Any1 knows about a good class for DB abstraction? I need some scripts to
 work with mysql/pgsql.

 Thnx





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Greetings from Online Email Telphone Psychics at absolutelypsychic.com

2001-10-30 Thread Jackie W

Hi  Greetings from http://www.absolutelypsychic.com I hope you are doing well.

Our site has Professional, Ethical, and Accurate Psychics, Astrologers and
Tarot Card readers that have been tested by management to assure
authenticity. Our readers do not promise any false prophesies nor do they
tell you what you want to hear - they have counseling skills, and
professionals.

 In fact, one of our readers' has a TV Show called Chartalk - those clips are
on our website. This gives you the opportunity to check his work out for free
 to observe. Including the predicting the WTC explosion - check it out - you
can see the clip is old and its verifiable through MNN in NYC.

Our prices are also very modest, we do not charge a fortune, nor are we
anywhere near a 900 line - we have experience in working on those and on
other sites and tailored to make this a good experience for everyone.

We hold chat parties where you can get mini readings as well.

Feel free to surf our site at any time there's plenty of information on there
to show you what we are about.

If you have any questions, please feel free to write back  to assist you any
way possible.

We do say please become more aware of our field, if anyone ever says to you
that they can cleanse you of problems, the thing they are going to cleanse is
your wallet !Don't fall for it!

Thanks
Love  Light
Jackie
http://www.absolutelypsychic.com
 
To remove please email back to [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: DB wrapper

2001-10-30 Thread Julio Nobrega Trabalhando

  There are a few:

  I use and I believe more in Pear. Metabase is huge. PhpLib, simple but
effective. ADODB, nicely done.

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
Alberto [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Any1 knows about a good class for DB abstraction? I need some scripts to
 work with mysql/pgsql.

 Thnx





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ICQ activelist on PHP???

2001-10-30 Thread NetView Media

Isen't there an active ActiveList on ICQ where you can talk/chat about
PHP-programming?

/ReinerICQ: 22245643





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: downloading images

2001-10-30 Thread Moloko

 Save the full size images as a file format that will not open automatically
in the browser, such as TIF or BMP, then the image will automatically start
downloading. Though I would't really worry about it, in my experience, most
users seem fairly comfortable with the the old 'save picture as' command.


--
Moloko
'When the going gets weird, the weird turn pro' - Dr Gonzo
GCM/CS/IT/MC d-- S++:- a-- C++ U--- P+ L !E W+++$ N+ K+ w+++$ M+ PS+++ PE-
PGP- t+ 5- X-- R* tv++ b+++ DI D G e h-- r++ y++


Heidi Belal [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hey,
 I'd like users to be able to download images from on
 my site.  The images are pretty big, so i've made
 thumbnails for each.  I can display each thumbnail,
 but how can i get it so that once the user clicks on
 the thumbnail, they get to download the whole image.
 I'd like it to work without having the user to right




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Dir-list - FTP with fopen?

2001-10-30 Thread Reiner

If the FTP-module (ftp_nlist) is not enabled, how do I get a directorylist
from a remote dir?

/ReinerICQ: 22245643



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] query string

2001-10-30 Thread Richard Baskett

Ok I am pulling my hair out!  Why if I pass error=5 through a query string
like index.htm?error=5 and then echo it, it's correct, but when I do
error=25 it echos 2T and when I do error=500 it echos 5TP?  What the heck is
going on here?  I pass strings easy enough and I cant remember ever having
this problem... What's going on!!? :)

Rick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sybase_query

2001-10-30 Thread André Castanheira

Hi,
How can I get the error message from sybase_query ?

It sends the message to the browser, but I'd like to treat it.

Obrigado,
André Castanheira
Carioca Engenharia S.A.
+55 21 3891-2200 r; 2325

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] close windows

2001-10-30 Thread André Castanheira

Hi,

Is there a php command to close a window or return to the previous one ?

Obrigado,
André Castanheira
Carioca Engenharia S.A.
+55 21 3891-2200 r; 2325

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Different fonts in PHP generated images

2001-10-30 Thread Daniel BI

Hi all!

Does anyone know how to put a text in other font
than latin ones (Chinese, for example),
on a PHP generated image? Do I need to install
some new fonts?  A different freetype library?

Any clue greatly appreciated :)

Daniel BI


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Fatcow and MySQL-Front

2001-10-30 Thread Wesley Furgiuele

Rene:

This is a pain with FatCow -- I just went through this myself.

The only method I was finally able to use was to SELECT ... INTO
OUTFILE for all my tables; manually recreate the tables using their
MySQL tools; then LOAD DATA INFILE for each of the outfiles I had
created.

Overall, their support has been adequate in terms of response time,
but what was annoying about this issue is that they spent more time
trying to explain to me how I should be transferring the data (a
method which wasted approximately two hours of my time) rather than
just helping me import the data.  For the price, I don't care if they
don't offer telnet access, but the least they could do is issue a
mysqlimport command for their customers who are transferring
websites.  Seems like bad business practice to not offer a method of
facilitating data transfer, but what do I know...


Wes




At 4:04 PM -0700 10/29/01, René Fournier wrote:
Hi All,

Little problem:  I want to transfer my MySQL database--a collection of 10 or
so tables, with data--to my Fatcow account.  They provide some lame MySQL
tools, but nothing to faciliate moving an existing database, full of data,
to their server.  I tried using MySQL-Front to connect to their server, but
it was rejected for some reason (their tech support acknowledged that
MySQL-Front doesn't work with Fatcow (?)).  Can anyone recommend a way for
me to get my database and data onto Fatcow?  I have asked their Tech
Support, but they weren't very supportive...

Much appreciated.

...Rene


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] String handling with special char?

2001-10-30 Thread Andrew Cowles

Hi Guys  Gals,

Sorry to re-post this but I'm still stuck and have had no reply.
I receive via HTTP GET a string variable in encoded HEX format, for
example;

script.php?text=%0A%01%00%B1%B2

My problem is that PHP sees the first occurance of %00 as a field
terminator and so anything after it is ignored.

How can I access the full string? In C there is an alternative string
handling module which can be used (as C also uses it as a terminator).
How can I do this with PHP?
Please, please, please help if you can.
Best wishes,

Andy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query string

2001-10-30 Thread Frewuill Rodriguez

hey take it easy men.. it's not you.. it's the encoding.. what's happening
is that =20 =25 etc means a special caracther  blank space etc.. try
using url_encode() function to pass your parameters.. something like this
would help

$parameters = url_encode(error=25);
index.htm?$parameters

hope this helps
- Original Message -
From: Richard Baskett [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 9:02 AM
Subject: [PHP] query string


 Ok I am pulling my hair out!  Why if I pass error=5 through a query string
 like index.htm?error=5 and then echo it, it's correct, but when I do
 error=25 it echos 2T and when I do error=500 it echos 5TP?  What the heck
is
 going on here?  I pass strings easy enough and I cant remember ever having
 this problem... What's going on!!? :)

 Rick


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] String handling with special char?

2001-10-30 Thread Frewuill Rodriguez

just use url_encode() to encode your parameters and then pass them

It's just like richard basket problem a few emails behind

$parameters = url_encode(error=25);
index.htm?$parameters

Hope this helps

- Original Message - 
From: Andrew Cowles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 8:40 AM
Subject: [PHP] String handling with special char?


 Hi Guys  Gals,
 
 Sorry to re-post this but I'm still stuck and have had no reply.
 I receive via HTTP GET a string variable in encoded HEX format, for
 example;
 
 script.php?text=%0A%01%00%B1%B2
 
 My problem is that PHP sees the first occurance of %00 as a field
 terminator and so anything after it is ignored.
 
 How can I access the full string? In C there is an alternative string
 handling module which can be used (as C also uses it as a terminator).
 How can I do this with PHP?
 Please, please, please help if you can.
 Best wishes,
 
 Andy
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Zipping a folder on a win2000 server with php4.06

2001-10-30 Thread Stefan Rusterholz

Hi

Does someone out there know, how I can zip a folder with some files in it?
It should be readable for Winzip.

Enviroment: Win2000 Server.
VB was available if useful.
Additional Components (applications, dll's or whatever) could be loaded if needed.

I didn't find a usable entry in the manual, so if you tell me to rtfm - please point 
me to the corresponding entry also :)

Thanks in advance

Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--



Re: [PHP] table troubles

2001-10-30 Thread Frewuill Rodriguez

just define a width for your table

- Original Message -
From: Nikola Veber [EMAIL PROTECTED]
To: php forum [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 5:04 PM
Subject: [PHP] table troubles


 Hi !

 I'm making a web site which allows user to add his own news, or other data
to the page
 via the form. The user inputs the data into the textarea and the data is
placed into a
 table. The problem is that all the text is placed into a single line !
 Is there a html catch to prevent this, or I'll have to break the string
into the smaller
 parts ? This is not so good, because of the screen resolution ...

 Help !!!




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] close windows

2001-10-30 Thread Richard S. Crawford

window.close()

It's JavaScript.

PHP is a server-side language and cannot affect anything on the browser itself.

PHP cannot:
1.  Close a browser window
2.  Spawn new windows
3.  Produce pop-up boxes
4.  Do form verification before the form is submitted
5.  Do anything to a page after it is loaded
6.  Disable the back button
7.  Change the right-click menu
8.  Do image roll-overs
9.  Dyanimically refresh a page which is already loaded
10. Make text blink

All of the above need to be accomplished with JavaScript or regular HTML.

I believe that this is the fourth e-mail to this list that I've seen over 
the past three days that asked how to perform a traditional JavaScript 
function with PHP.  PHP is a great language for back end functionality and 
for creating web pages on the fly, but once a page has been loaded into the 
client browser, PHP loses all control over the page.  Any more 
functionality that you wish to install on your page must be done with 
JavaScript.


At 05:07 AM 10/30/2001, André Castanheira wrote:
Hi,

Is there a php command to close a window or return to the previous one ?

Obrigado,
André Castanheira
Carioca Engenharia S.A.
+55 21 3891-2200 r; 2325

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Sliante,
Richard S. Crawford

http://www.mossroot.com
mailto:[EMAIL PROTECTED]
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupéry

Push the button, Max!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] String handling with special char?

2001-10-30 Thread Andrew Cowles

Hi Frewuill,

Thanks for the mail.
The parameters are passed from an end user via HTTP GET and on receipt I
use urlencode($parametername) but, the parameter only contains data up to
the 1st occurance of %00 and then ends.

Calling the following code with 'script.php?text=%0A%01%00%B1%B2' would
output '%0A%01' only.

?
$text=urlencode($text);
echo($text);
?

Am I missing something in your solution?
Any ideas?
Best wishes,

Andy



On Tue, 30 Oct 2001, Frewuill Rodriguez wrote:

 just use url_encode() to encode your parameters and then pass them
 
 It's just like richard basket problem a few emails behind
 
 $parameters = url_encode(error=25);
 index.htm?$parameters
 
 Hope this helps
 
 - Original Message - 
 From: Andrew Cowles [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 30, 2001 8:40 AM
 Subject: [PHP] String handling with special char?
 
 
  Hi Guys  Gals,
  
  Sorry to re-post this but I'm still stuck and have had no reply.
  I receive via HTTP GET a string variable in encoded HEX format, for
  example;
  
  script.php?text=%0A%01%00%B1%B2
  
  My problem is that PHP sees the first occurance of %00 as a field
  terminator and so anything after it is ignored.
  
  How can I access the full string? In C there is an alternative string
  handling module which can be used (as C also uses it as a terminator).
  How can I do this with PHP?
  Please, please, please help if you can.
  Best wishes,
  
  Andy
  
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Fatcow and MySQL-Front

2001-10-30 Thread René Fournier

Sorry, stupid question, but how do I load phpMyAdmin onto Fatcow?  Won't
that be as time-consuming as recreating all the tables in my database by
hand, using their lame tools?  (If there is an easy way, please let me know.
Thanks.)

...Rene

 -Original Message-
 From: Nikola Karoviæ [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 30, 2001 1:34 AM
 To: best list in da whole world
 Subject: Re: [PHP] Fatcow and MySQL-Front


 Hi,
 can't you do that with phpMyAdmin. If you dont have that on
 fatcow, you can
 put it your self and then load a database file.
 -
 volim popit, volim zagalamit

 - Original Message -
 From: René Fournier [EMAIL PROTECTED]
 To: Php-General [EMAIL PROTECTED]
 Sent: 30. listopad 2001 00:04
 Subject: [PHP] Fatcow and MySQL-Front


  Hi All,
 
  Little problem:  I want to transfer my MySQL database--a
 collection of 10
 or
  so tables, with data--to my Fatcow account.  They provide some
 lame MySQL
  tools, but nothing to faciliate moving an existing database,
 full of data,
  to their server.  I tried using MySQL-Front to connect to their server,
 but
  it was rejected for some reason (their tech support acknowledged that
  MySQL-Front doesn't work with Fatcow (?)).  Can anyone
 recommend a way for
  me to get my database and data onto Fatcow?  I have asked their Tech
  Support, but they weren't very supportive...
 
  Much appreciated.
 
  ...Rene
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] String handling with special char?

2001-10-30 Thread Frewuill Rodriguez

well then you have to work on client side...doing urlenconde after receive
parameters is useless. So i guess your client (end user) is not using a html
form but sending parameters via HTTP GET as you said..

if you were using a html form you won't have this problem... so if you want
to pass the parameters via HTTP GET then you client (end user or whatever)
should do a little work like replace

% by %25

so i you want to send

'script.php?text=%0A%01%00%B1%B2'

what you should send in order to work properly

'script.php?text= %250A%2501%2500%25B1%25B2'

Note that all % were changed by %25.

I tested it and it worked.

Hope this helps





- Original Message -
From: Andrew Cowles [EMAIL PROTECTED]
To: Frewuill Rodriguez [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 9:23 AM
Subject: Re: [PHP] String handling with special char?


 Hi Frewuill,

 Thanks for the mail.
 The parameters are passed from an end user via HTTP GET and on receipt I
 use urlencode($parametername) but, the parameter only contains data up to
 the 1st occurance of %00 and then ends.

 Calling the following code with 'script.php?text=%0A%01%00%B1%B2' would
 output '%0A%01' only.

 ?
 $text=urlencode($text);
 echo($text);
 ?

 Am I missing something in your solution?
 Any ideas?
 Best wishes,

 Andy



 On Tue, 30 Oct 2001, Frewuill Rodriguez wrote:

  just use url_encode() to encode your parameters and then pass them
 
  It's just like richard basket problem a few emails behind
 
  $parameters = url_encode(error=25);
  index.htm?$parameters
 
  Hope this helps
 
  - Original Message -
  From: Andrew Cowles [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, October 30, 2001 8:40 AM
  Subject: [PHP] String handling with special char?
 
 
   Hi Guys  Gals,
  
   Sorry to re-post this but I'm still stuck and have had no reply.
   I receive via HTTP GET a string variable in encoded HEX format, for
   example;
  
   script.php?text=%0A%01%00%B1%B2
  
   My problem is that PHP sees the first occurance of %00 as a field
   terminator and so anything after it is ignored.
  
   How can I access the full string? In C there is an alternative string
   handling module which can be used (as C also uses it as a terminator).
   How can I do this with PHP?
   Please, please, please help if you can.
   Best wishes,
  
   Andy
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] String handling with special char?

2001-10-30 Thread Andrew Cowles

Thanks Frewuill,

You are a STAR!

Andy

On Tue, 30 Oct 2001, Frewuill Rodriguez wrote:

 well then you have to work on client side...doing urlenconde after receive
 parameters is useless. So i guess your client (end user) is not using a html
 form but sending parameters via HTTP GET as you said..
 
 if you were using a html form you won't have this problem... so if you want
 to pass the parameters via HTTP GET then you client (end user or whatever)
 should do a little work like replace
 
 % by %25
 
 so i you want to send
 
 'script.php?text=%0A%01%00%B1%B2'
 
 what you should send in order to work properly
 
 'script.php?text= %250A%2501%2500%25B1%25B2'
 
 Note that all % were changed by %25.
 
 I tested it and it worked.
 
 Hope this helps
 
 
 
 
 
 - Original Message -
 From: Andrew Cowles [EMAIL PROTECTED]
 To: Frewuill Rodriguez [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, October 30, 2001 9:23 AM
 Subject: Re: [PHP] String handling with special char?
 
 
  Hi Frewuill,
 
  Thanks for the mail.
  The parameters are passed from an end user via HTTP GET and on receipt I
  use urlencode($parametername) but, the parameter only contains data up to
  the 1st occurance of %00 and then ends.
 
  Calling the following code with 'script.php?text=%0A%01%00%B1%B2' would
  output '%0A%01' only.
 
  ?
  $text=urlencode($text);
  echo($text);
  ?
 
  Am I missing something in your solution?
  Any ideas?
  Best wishes,
 
  Andy
 
 
 
  On Tue, 30 Oct 2001, Frewuill Rodriguez wrote:
 
   just use url_encode() to encode your parameters and then pass them
  
   It's just like richard basket problem a few emails behind
  
   $parameters = url_encode(error=25);
   index.htm?$parameters
  
   Hope this helps
  
   - Original Message -
   From: Andrew Cowles [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, October 30, 2001 8:40 AM
   Subject: [PHP] String handling with special char?
  
  
Hi Guys  Gals,
   
Sorry to re-post this but I'm still stuck and have had no reply.
I receive via HTTP GET a string variable in encoded HEX format, for
example;
   
script.php?text=%0A%01%00%B1%B2
   
My problem is that PHP sees the first occurance of %00 as a field
terminator and so anything after it is ignored.
   
How can I access the full string? In C there is an alternative string
handling module which can be used (as C also uses it as a terminator).
How can I do this with PHP?
Please, please, please help if you can.
Best wishes,
   
Andy
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
  
  
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Win98 + Apache + PHP4

2001-10-30 Thread p.whiter

Hi

I have the above configuration installed along with mySQL, all works fine on
my local machine except for error/warning messages whenever previewing the
page in my browser where I am calling/setting a cookie variable...

Does anyone know if there are any config settings I can change anywhere to
prevent this??

Thanks
Paul



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Win98 + Apache + PHP4

2001-10-30 Thread Matt Williams

 I have the above configuration installed along with mySQL, all
 works fine on
 my local machine except for error/warning messages whenever previewing the
 page in my browser where I am calling/setting a cookie variable...

A little more info re the error message would be useful.


Make sure there is no whitespace before you try and set you cookie This
includes included files also

M:


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] virtual

2001-10-30 Thread Gary

Tried that, same result. looks like I am going to have to strip off the 
php from that page and change it to shtml

Gary

Nikola karoviæ wrote:

 you could try using require(/cgi-bin/folder/program.pl); instead
 -
 volim popit, volim zagalamit
 - Original Message -
 From: Gary [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: 30. listopad 2001 04:41
 Subject: [PHP] virtual
 
 
 
What would cause a fatal error using virtual(/cgi-bin/folder/program.pl);

 ?
 
TIA
Gary




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Win98 + Apache + PHP4

2001-10-30 Thread Frewuill Rodriguez

check your php.ini and look for /tmp dir and change it for  c:\php or
c:\temp or c:\windows\temp or whatever you want
- Original Message -
From: p.whiter [EMAIL PROTECTED]
To: PHP - GENERAL [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 11:20 AM
Subject: [PHP] Win98 + Apache + PHP4


 Hi

 I have the above configuration installed along with mySQL, all works fine
on
 my local machine except for error/warning messages whenever previewing the
 page in my browser where I am calling/setting a cookie variable...

 Does anyone know if there are any config settings I can change anywhere to
 prevent this??

 Thanks
 Paul



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] lesson in NOT how to run your php website ...

2001-10-30 Thread DL Neil

  I teach law at a university  .. I also run the website here ...
 
 Thankfully Tasmania is not considered part of Australia. :)
 
 *troll bait away*

=but are you trolling for bad lawyer jokes to wind up brendan, or inviting the rest to 
take on the Aussies?

=Tasmania advertises itself as the bit under, down-under
separatist revenge on mainlander ignorance?

=mind you, the words ignorance and Aussie in the same sentence...
=dn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] \n's

2001-10-30 Thread Mike Frazer

Remember, those functions have return values.  Gotta assign the return to a
variable!

$variable = [replacement_function]($args ... );

They don't change the value of the variable in the argument list, they take
that value and put a new value in a new memory space.  Unfortunately, they
don't throw an error when you don't assign the return to a variable so it
can often be hard to catch.

Mike


Speedboy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  quick problem... I don't seem to be able to strip \n's out of a string
  of text:

 str_replace(\n, , $line);





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Zipping a folder on a win2000 server with php4.06

2001-10-30 Thread Julio Nobrega

  Well, you could use exec(); or system(); to call a command line zipping
application to compress the directory.

--


  Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Stefan Rusterholz [EMAIL PROTECTED] wrote in message
003701c1614b$2ab8cc40$3c01a8c0@quasimodo">news:003701c1614b$2ab8cc40$3c01a8c0@quasimodo...
Hi

Does someone out there know, how I can zip a folder with some files in it?
It should be readable for Winzip.

Enviroment: Win2000 Server.
VB was available if useful.
Additional Components (applications, dll's or whatever) could be loaded if
needed.

I didn't find a usable entry in the manual, so if you tell me to rtfm -
please point me to the corresponding entry also :)

Thanks in advance

Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] editor for working with php

2001-10-30 Thread EDUMEXICO

Use Emacs, I think this is the best IDE.

On Thu, Oct 25, 2001 at 11:10:36PM -0500, Ray Todd Stevens wrote:
 I ahve been using go-live (4.0) to edit pages containing php scripts.  
 this is not really working well.  Is there a better way or a better editor 
 to use for this?
 
 Ray Todd Stevens Specialists in Network and Security 
 Consulting
 Senior ConsultantSoftware audit service available
 Stevens Services
 Suite 21
 3754 Old State Rd 37 N
 Bedford, IN 47421
 (812) 279-9394
 [EMAIL PROTECTED]
 
 Thought for the day:
 Bagpipes (n): an octopus wearing a kilt.
 
 
 For PGP public key send message with subject 
 please send PGP key
 
 If this message refers to an attachment the attachment
 may arrive as a seperate mail message depending on the
 type of mail client and gateway software you are using.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13

 PGP signature


Re: [PHP] Win98 + Apache + PHP4

2001-10-30 Thread p.whiter

Thanks for the replies, I think it has more to do with configuration
settings than anything else as all the scripts work fine on remote Linux
server, it is just on my win98 set-up the problem occurs..

I am looking in the php.ini, file the only reference to a tmp directory I
can see is for file uploads, not too sure what I should add change to set a
temp directory for cookies??

Thanks
Paul

- Original Message -
From: Frewuill Rodriguez [EMAIL PROTECTED]
To: p.whiter [EMAIL PROTECTED]; PHP - GENERAL
[EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 3:28 PM
Subject: Re: [PHP] Win98 + Apache + PHP4


: check your php.ini and look for /tmp dir and change it for  c:\php or
: c:\temp or c:\windows\temp or whatever you want
: - Original Message -
: From: p.whiter [EMAIL PROTECTED]
: To: PHP - GENERAL [EMAIL PROTECTED]
: Sent: Tuesday, October 30, 2001 11:20 AM
: Subject: [PHP] Win98 + Apache + PHP4
:
:
:  Hi
: 
:  I have the above configuration installed along with mySQL, all works
fine
: on
:  my local machine except for error/warning messages whenever previewing
the
:  page in my browser where I am calling/setting a cookie variable...
: 
:  Does anyone know if there are any config settings I can change anywhere
to
:  prevent this??
: 
:  Thanks
:  Paul


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] editor for working with php

2001-10-30 Thread Henrik Hudson

No, use VIM :) There are PHP highlight rules available for it, look on the 
VIM site (www.vim.org)

On Tuesday 30 October 2001 08:43, EDUMEXICO wrote:
  Use Emacs, I think this is the best IDE.

  On Thu, Oct 25, 2001 at 11:10:36PM -0500, Ray Todd Stevens wrote:
   I ahve been using go-live (4.0) to edit pages containing php scripts.
   this is not really working well.  Is there a better way or a better
   editor to use for this?
   
   Ray Todd Stevens Specialists in Network and Security
   Consulting
   Senior ConsultantSoftware audit service available
   Stevens Services
   Suite 21
   3754 Old State Rd 37 N
   Bedford, IN 47421
   (812) 279-9394
   [EMAIL PROTECTED]
  
   Thought for the day:
   Bagpipes (n): an octopus wearing a kilt.
  
  
   For PGP public key send message with subject
   please send PGP key
  
   If this message refers to an attachment the attachment
   may arrive as a seperate mail message depending on the
   type of mail client and gateway software you are using.
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Henrik Hudson
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Zipping a folder on a win2000 server with php4.06

2001-10-30 Thread Stefan Rusterholz

Well, I would do that but I don't know such an application.
Please, can you suggest me one?

Stefan Rusterholz, [EMAIL PROTECTED]

- Original Message -
From: Julio Nobrega [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 4:40 PM
Subject: [PHP] Re: Zipping a folder on a win2000 server with php4.06


   Well, you could use exec(); or system(); to call a command line zipping
 application to compress the directory.

 --


   Julio Nobrega.

 Um dia eu chego lá:
 http://sourceforge.net/projects/toca

 Stefan Rusterholz [EMAIL PROTECTED] wrote in message
 003701c1614b$2ab8cc40$3c01a8c0@quasimodo">news:003701c1614b$2ab8cc40$3c01a8c0@quasimodo...
 Hi

 Does someone out there know, how I can zip a folder with some files in it?
 It should be readable for Winzip.

 Enviroment: Win2000 Server.
 VB was available if useful.
 Additional Components (applications, dll's or whatever) could be loaded if
 needed.

 I didn't find a usable entry in the manual, so if you tell me to rtfm -
 please point me to the corresponding entry also :)

 Thanks in advance

 Stefan Rusterholz, [EMAIL PROTECTED]
 --
 interaktion gmbh
 Stefan Rusterholz
 Zürichbergstrasse 17
 8032 Zürich
 --
 T. +41 1 253 19 55
 F. +41 1 253 19 56
 W3 www.interaktion.ch
 --


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Win98 + Apache + PHP4

2001-10-30 Thread Matt Williams


 Thanks for the replies, I think it has more to do with configuration
 settings than anything else as all the scripts work fine on remote Linux
 server, it is just on my win98 set-up the problem occurs..
 
 I am looking in the php.ini, file the only reference to a tmp directory I
 can see is for file uploads, not too sure what I should add 
 change to set a
 temp directory for cookies??

Line 629 on my php.ini 

session.save_path = /tmp

try c:\\tmp or c:/tmp

create the dir first

M:



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Zipping a folder on a win2000 server with php4.06

2001-10-30 Thread Matt Williams


 Well, I would do that but I don't know such an application.
 Please, can you suggest me one?
 

pkzip of course :)

M:

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP General Archive

2001-10-30 Thread John S. Huggins


Hello folks.

I am yet another person having difficulty with 4.0.6 and GD graphic
support.  It has been a while since I have been on this list so I want to
search the archives of this group.

Where are the archives?  I remember some archive last year with a black
background.

Thanks.

**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Weird caching problem with PHP4/Apache

2001-10-30 Thread René Fournier

Having successfully uploaded my PHP4+MySQL site finally to Fatcow (and the
MySQL stuff IS there--thanks for the help), I'm now left with making it
actually work online.  One curious problem:

For every page in the site (*.php4), I include three parts, a header.inc
(common to all), a body.inc (unique to each .php4 file), and a footer.inc
(common to all).  One of the things the header.inc file does is generate
select a background image randomly.  Very simple, and it works on my local
machine.  But as soon as I look at the page online, it seems Fatcow
(Apache/Zend?)caches the header.inc file--that is, the results of the php
script inside it, which generates the random background.  I say this because
no matter how many pages I look at, refreshing them, etc., I always get sent
the same original background image.  Even if I replace now the random
background image function in header.inc with the explicit name of a
different file, it STILL displays the same one.  Weird?  Is there some way
to ensure that each PHP4 file/script is interpreted every single time, and
not cached (as it seems)??

...Rene


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP General Archive

2001-10-30 Thread Matt Williams

http://www.progressive-comp.com/Lists/?l=php3-generalr=1w=2

M: 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem getting imagemagick to work with php...

2001-10-30 Thread Brian Aitken

Hiya

I need to be able to automatically change the format and size of an image
when a user uploads it and using imagemagick's tools seems like the way to
go about it.

Unfortunately the server I'm using is Windows based and it doesn't have
imagemagick installed.  I downloaded the Windows imagemagick binaries and
the tools work fine locally from the dos prompt.

I hoped that uploading these files to a directory on the server would allow
my PHP script to use the tools, but either I'm typing in the wrong commands
or the tools won't work on the server.

When I try this little test script:
*

$file1 = \\images\\gladius.tiff;
$file2 = \\images\\gladius.jpg;

$command = \\imagemagick\\convert .$file1. .$file2;
$result = system($command);
if ($result)
{
 echo(Conversion Done!brimg src = gladius.jpg);
}

*

I get:
Warning: Unable to fork [\imagemagick\convert \images\gladius.tiff
\images\gladius.jpg] in 

I've tried using unix slashes and single slashes.  I've also tried running
the script in the imagemagick directory - I didn't get the 'fork' error but
the system function returned false.  I also tried using exec(), passthru()
and backticks but none of them worked (backticks gave a weird CGI error
message).

Anyone know what I'm doing wrong?  Does Imagemagick need to be installed in
some special place on the server?

Thanks
Brian



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Zipping a folder on a win2000 server with php4.06

2001-10-30 Thread Julio Nobrega Trabalhando

  Well, (things are going pretty good, aren't they ;-))

  Oh, old Dos memories coming

  Got it, pkzip was the name:

http://www.google.com/search?sourceid=navclientq=pkzip

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
Stefan Rusterholz [EMAIL PROTECTED] wrote in message
004301c1615a$4a01d6f0$3c01a8c0@quasimodo">news:004301c1615a$4a01d6f0$3c01a8c0@quasimodo...
 Well, I would do that but I don't know such an application.
 Please, can you suggest me one?

 Stefan Rusterholz, [EMAIL PROTECTED]

 - Original Message -
 From: Julio Nobrega [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 30, 2001 4:40 PM
 Subject: [PHP] Re: Zipping a folder on a win2000 server with php4.06


Well, you could use exec(); or system(); to call a command line
zipping
  application to compress the directory.
 
  --
 
 
Julio Nobrega.
 
  Um dia eu chego lá:
  http://sourceforge.net/projects/toca
 
  Stefan Rusterholz [EMAIL PROTECTED] wrote in message
  003701c1614b$2ab8cc40$3c01a8c0@quasimodo">news:003701c1614b$2ab8cc40$3c01a8c0@quasimodo...
  Hi
 
  Does someone out there know, how I can zip a folder with some files in
it?
  It should be readable for Winzip.
 
  Enviroment: Win2000 Server.
  VB was available if useful.
  Additional Components (applications, dll's or whatever) could be loaded
if
  needed.
 
  I didn't find a usable entry in the manual, so if you tell me to rtfm -
  please point me to the corresponding entry also :)
 
  Thanks in advance
 
  Stefan Rusterholz, [EMAIL PROTECTED]
  --
  interaktion gmbh
  Stefan Rusterholz
  Zürichbergstrasse 17
  8032 Zürich
  --
  T. +41 1 253 19 55
  F. +41 1 253 19 56
  W3 www.interaktion.ch
  --




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Weird caching problem with PHP4/Apache

2001-10-30 Thread Julio Nobrega Trabalhando

  These lines will do what you asked, but I am unsure if they will resolve
your problem (since I don't know Fatcow and how they configured the server).
Anyway, here it is:


header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');// Date in the past
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
  // always modified
header ('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
header ('Pragma: no-cache');  // HTTP/1.0

  PS: Got it from the manual, header(); function :-)
  Check the online comments if any problems happen, since there are many
various flavors of servers and clients...

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
René fournier [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Having successfully uploaded my PHP4+MySQL site finally to Fatcow (and the
 MySQL stuff IS there--thanks for the help), I'm now left with making it
 actually work online.  One curious problem:

 For every page in the site (*.php4), I include three parts, a header.inc
 (common to all), a body.inc (unique to each .php4 file), and a footer.inc
 (common to all).  One of the things the header.inc file does is generate
 select a background image randomly.  Very simple, and it works on my local
 machine.  But as soon as I look at the page online, it seems Fatcow
 (Apache/Zend?)caches the header.inc file--that is, the results of the php
 script inside it, which generates the random background.  I say this
because
 no matter how many pages I look at, refreshing them, etc., I always get
sent
 the same original background image.  Even if I replace now the random
 background image function in header.inc with the explicit name of a
 different file, it STILL displays the same one.  Weird?  Is there some way
 to ensure that each PHP4 file/script is interpreted every single time, and
 not cached (as it seems)??

 ...Rene




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: DB wrapper

2001-10-30 Thread Manuel Lemos

Hello,

Alberto wrote:
 
 Any1 knows about a good class for DB abstraction? I need some scripts to
 work with mysql/pgsql.

If you are looking for a database abstraction package that lets you
write applications that are absolutely database independent, ie, you
don't need to handle database differences in your application, Metabase
is the way to go.

Just download it from here:

http://phpclasses.UpperDesign.com/browse.html/package/20

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem getting imagemagick to work with php...

2001-10-30 Thread Mark

On Tue, 30 Oct 2001 16:05:42 -, Brian Aitken wrote:
Hiya

I need to be able to automatically change the format and size of an
image
when a user uploads it and using imagemagick's tools seems like the
way to
go about it.

Unfortunately the server I'm using is Windows based and it doesn't
have
imagemagick installed.  I downloaded the Windows imagemagick
binaries and
the tools work fine locally from the dos prompt.

I hoped that uploading these files to a directory on the server
would allow
my PHP script to use the tools, but either I'm typing in the wrong
commands
or the tools won't work on the server.

When I try this little test script:
*

$file1 = \\images\\gladius.tiff;
$file2 = \\images\\gladius.jpg;

$command = \\imagemagick\\convert .$file1. .$file2;
$result = system($command);
if ($result)
{
 echo(Conversion Done!brimg src = gladius.jpg);
}

it looks like you're getting the path wrong.
try it like this:

echo `c:\\imagemagick\\convert c:\\images\\gladius.tiff
c:\\images\\gladius.jpg`;

in unix you can redirect stderr into stdout to see any error messages
like so:
echo `convert $file1 $file2 21';

you can't do this in windows, but I remember finding a dos program
called stderr.exe that you can pipe commands into that does the same
thing.

one possibility that comes to mind is maybe you don't have write
access to the temp directory convert uses.

also try checking apache's error log and posting the results.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Weird caching problem with PHP4/Apache

2001-10-30 Thread René Fournier

Thanks for the help, but I'm afraid it hasn't solved the caching problem, at
least not with respect to the PHP random function...  It's not as if the
entire page get's cached, since there is an SQL query that selects a random
row from a table--and that is random.  But the PHP part of it--that is,
where the background image of a table row is randomly selected--is static.
Refreshing doesn't help, nor does this code, which I put in my header.inc
file:

?php
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');// Date in the past
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
  // always modified
header ('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
header ('Pragma: no-cache');  // HTTP/1.0
?html
head
titleMy Site/title
META HTTP-EQUIV=Expires CONTENT=0
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
link rel=stylesheet href=../common/styles.css type=text/css
script language=JavaScript
!--


You'll notice that I've got both that header function AND a meta tag, each
of which should tell Apache not to cache, but here's what I think is
happening:  Apache is NOT caching, since the SQL select statements are
running randomly.  I think the cache problem is with PHP/Zend, since I'm
using PHP4.  So...  Is there a way to force PHP to reexecute every time
without configuring the server differently (since I can't)??


 -Original Message-
 From: Julio Nobrega Trabalhando
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 30, 2001 9:31 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Weird caching problem with PHP4/Apache


   These lines will do what you asked, but I am unsure if they will resolve
 your problem (since I don't know Fatcow and how they configured
 the server).
 Anyway, here it is:


 header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');// Date in the past
 header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
   // always modified
 header ('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
 header ('Pragma: no-cache');  // HTTP/1.0

   PS: Got it from the manual, header(); function :-)
   Check the online comments if any problems happen, since there are many
 various flavors of servers and clients...

 --

 Julio Nobrega

 A hora está chegando:
 http://toca.sourceforge.net
 René fournier [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Having successfully uploaded my PHP4+MySQL site finally to
 Fatcow (and the
  MySQL stuff IS there--thanks for the help), I'm now left with making it
  actually work online.  One curious problem:
 
  For every page in the site (*.php4), I include three parts, a
 header.inc
  (common to all), a body.inc (unique to each .php4 file), and a
 footer.inc
  (common to all).  One of the things the header.inc file does is generate
  select a background image randomly.  Very simple, and it works
 on my local
  machine.  But as soon as I look at the page online, it seems Fatcow
  (Apache/Zend?)caches the header.inc file--that is, the results
 of the php
  script inside it, which generates the random background.  I say this
 because
  no matter how many pages I look at, refreshing them, etc., I always get
 sent
  the same original background image.  Even if I replace now the random
  background image function in header.inc with the explicit name of a
  different file, it STILL displays the same one.  Weird?  Is
 there some way
  to ensure that each PHP4 file/script is interpreted every
 single time, and
  not cached (as it seems)??
 
  ...Rene
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP to MySQL and Date field

2001-10-30 Thread Jason

Here is my problem once again... =P I am wondering if I should change the
date table to something other than date... maybe something like date_1?
Would doing that resolve my issue, because of the fact that the date
variable in php is function? Thanks in advance...
Jason

/* Form to supply variables */
form name=auth method=post action=http://path/to/search.php;
  pSearch for Ads/p
  First name:
  input type=text name=fname
  br
  Last name:
  input type=text name=lname
  br
  Area Code:nbsp;
  input type=text name=phonea size=3
maxlength=3
  Phone:
  input type=text name=phone size=8
maxlength=8
  br
  Date:
  input type=text name=date
  br
  p
input type=submit name=login
value=Submit
input type=reset name=reset value=Reset
  /p
/form

Once user clicks submit button it links to this php script to connect, query
and display results... eveything works fine except for the date variables.
If anyone with a little more know how can point me out the error I would
greatly appriciate it.

/* php script to connect, query and display results */
?php

mysql_connect (db_host, db_username, db_password) or die(Couldn't
connect!);

mysql_select_db (db_name) or die(Couldn't select database);

if ($fname == )
{$fname = '%';}
if ($lname == )
{$lname = '%';}
if (phonea == )
{$phonea = '%';}
if ($phone == )
{$phone = '%';}
if ($date == )
{$date = '%';}

$result = mysql_query (SELECT * FROM ads
 WHERE fname LIKE '%$fname%' AND lname LIKE
'%$lname%' AND phonea LIKE '%$phonea%' AND phone LIKE '%$phone%' AND date
LIKE '%$date%');

if ($row = mysql_fetch_array($result)) {

do {
  PRINT Your search results: brbr;
  PRINT bFirst Name: /b ;
  print $row[fname];
  print (br);
  PRINT bLast Name: /b ;
  print $row[lname];
  print (br);
  PRINT bAddress: /b ;
  print $row[address];
  print (br);
  PRINT bCity: /b ;
  print $row[city];
  print (br);
  PRINT bState: /b ;
  print $row[state];
  print (br);
  PRINT bZip: /b ;
  print $row[zip];
  print (br);
  PRINT bArea Code: /b ;
  print $row[phonea];
  print (br);
  PRINT bPhone: /b ;
  print $row[phone];
  print (br);
  PRINT bEmail: /b ;
  print $row[email];
  print (br);
  PRINT bWeeks: /b ;
  print $row[weeks];
  print (br);
  PRINT bCity 1: /b ;
  print $row[cty1];
  print (br);
  PRINT bCity 2: /b ;
  print $row[cty2];
  print (br);
  PRINT bCity 3: /b ;
  print $row[cty3];
  print (br);
  PRINT bAd: /b ;
  print $row[ad];
  print (br);
  PRINT bTotal: /b ;
  print $row[total];
  print (br);
  PRINT bNumber of weeks: /b ;
  print $row[num];
  print (br);
  PRINT bDate: /b ;
  print $row[date];
  print (br);
  PRINT bTime: /b ;
  print $row[time];
  print (br);
  print (hr);
} while($row = mysql_fetch_array($result));
} else {print Sorry, no records were found!;}

?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Bug ? Script download problem if user abort download

2001-10-30 Thread Gianluca Morello

I have a download script on IIS 5 and Php 4.0.6 as cgi:

 $filename=PDF_PATH.$codfile..pdf;
  $fp=fopen($filename,rb);
  if ($fp)
  {
   header(Content-type: application/octet-stream\n );
   header(Content-transfer-encoding: binary\n);
   header(Content-length:  . filesize($filename) . \n);
   header(Content-disposition: attachment; filename=.$codfile..pdf\n);
   $contents=;
   while (!feof($fp))
   {
$contents .= fread($fp, 1000);
   }
   fclose($fp);
   print($contents);


the script works very well.
But if the user press the Cancel button in the browser download dialog, the
current php process stop working. If i try to load a new page another php
process is spawned, but do nothing.
If i look in the task manager i see my php processes running (without doing
nothing).
When the timeout occurs the php engine continue wotking correctly.

If i close the browser while php is hang, and i start a new browser session
the php pages are correctly processed.


I try several other methods :
readfile,fpassthru,fread($fp,filesize),read and print a small chunks of
data, but nothing change, when the user abort the download operation the php
hang.

This behaviour is very similar to the following bug:
http://bugs.php.net/?id=8215 , that appears to be closed





--
Gianluca Morello
Editek S.r.l.
http://www.editek.it
Via Vitruvio, 43 - Milano
Mail: [EMAIL PROTECTED]
Tel. : 02-671166208
Fax : 02-67493766



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: header(Location:);

2001-10-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Alberto) wrote:

  Ok, it works fine for me, i can redirection, but I don't want the browser to
  load another page, I want to IF A THEN RUN A.PHP, IF B THEN RUN B.PHP, I
  know i can use include('a.php') or require('a.php') but I'm sure theres a
  way to say php parser to run one or another script without changing URL to
  the client.

use include as you say or html frames.

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: header(Location:);

2001-10-30 Thread Steve Cayford


On Tuesday, October 30, 2001, at 11:41  AM, Henrik Hansen wrote:

 [EMAIL PROTECTED] (Alberto) wrote:

 Ok, it works fine for me, i can redirection, but I don't want the 
 browser to
 load another page, I want to IF A THEN RUN A.PHP, IF B THEN RUN 
 B.PHP, I
 know i can use include('a.php') or require('a.php') but I'm sure 
 theres a
 way to say php parser to run one or another script without changing 
 URL to
 the client.

 use include as you say or html frames.


Yeah, why not
if($A) {
include('a.php');
} elseif ($B) {
include('b.php');
}

 --
 Henrik Hansen

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Installing ODBC

2001-10-30 Thread webmaster uva

Hello,

I have problems compiling libiodbc-3.0.5
I have tried to compile being root and being a normal user and I get the same 
error.
I execute  
$ ./configure --prefix=/usr/local --exec-prefix=/usr/local 
--with-iodbc-inidir=/etc --build=i686 
and it works properly (I think)
when I execute 
$ make
I get the next error. 

*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
gcc -shared  catalog.lo connect.lo dlf.lo dlproc.lo execute.lo fetch.lo hdbc.lo 
henv.lo herr.lo hstmt.lo info.lo itrace.lo misc.lo prepare.lo result.lo odbc3.lo   
-Wl,-soname -Wl, -Wl,-retain-symbols-file -Wl,./iodbc.exp -o .libs/
/usr/i386-slackware-linux/bin/ld: cannot open output file .libs/: Is a directory
collect2: ld returned 1 exit status
gmake[1]: *** [libiodbc.la] Error 1
gmake[1]: Leaving directory `/opt/src/libiodbc-3.0.5/iodbc'
gmake: *** [all-recursive] Error 1

Please, could you help me?

I am trying to install it on a linux machine. 

I am trying to connect that linux machine with Apache and PHP with a Windows NT with 
SQL-Server. 
Would I need any other software on the Linux or the NT machines?

Thanks

Regards.
Félix García Renedo
  mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  Tfn: 983-423000 Ext. 26520
  Fax: 983-423271
Centro de Telecomunicaciones e Informatica
Universidad de Valladolid
España




RE: [PHP] Installing ODBC

2001-10-30 Thread Andrew Hill

Hi,

You should compile --with-iodbc pointing to the odbcsdk directory, not just
the libiodbc file.
The SDK is available at www.iodbc.org.

You will also need your LD_LIBRARY_PATH varible set to include the directory
where libiodbc is.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: webmaster uva [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 30, 2001 12:53 PM
 To: php
 Subject: [PHP] Installing ODBC


 Hello,

 I have problems compiling libiodbc-3.0.5
 I have tried to compile being root and being a normal user
 and I get the same error.
 I execute
 $ ./configure --prefix=/usr/local
 --exec-prefix=/usr/local --with-iodbc-inidir=/etc --build=i686
 and it works properly (I think)
 when I execute
 $ make
 I get the next error.

 *** Warning: inter-library dependencies are not known to be supported.
 *** All declared inter-library dependencies are being dropped.
 *** The inter-library dependencies that have been dropped here will be
 *** automatically added whenever a program is linked with this library
 *** or is declared to -dlopen it.
 gcc -shared  catalog.lo connect.lo dlf.lo dlproc.lo execute.lo
 fetch.lo hdbc.lo henv.lo herr.lo hstmt.lo info.lo itrace.lo
 misc.lo prepare.lo result.lo odbc3.lo   -Wl,-soname -Wl,
 -Wl,-retain-symbols-file -Wl,./iodbc.exp -o .libs/
 /usr/i386-slackware-linux/bin/ld: cannot open output file .libs/:
 Is a directory
 collect2: ld returned 1 exit status
 gmake[1]: *** [libiodbc.la] Error 1
 gmake[1]: Leaving directory `/opt/src/libiodbc-3.0.5/iodbc'
 gmake: *** [all-recursive] Error 1

 Please, could you help me?

 I am trying to install it on a linux machine.

 I am trying to connect that linux machine with Apache and PHP
 with a Windows NT with SQL-Server.
 Would I need any other software on the Linux or the NT machines?

 Thanks

 Regards.
 Félix García Renedo
   mailto:[EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
   Tfn: 983-423000 Ext. 26520
   Fax: 983-423271
 Centro de Telecomunicaciones e Informatica
 Universidad de Valladolid
 España





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP+MySQL=Help(?)

2001-10-30 Thread turtle

I am trying to pass a variable to a popup window, to do a search in a
database, and display an image based on the results...  Here is what I have
messed up so far (this is the 1st time I have used php/mysql  no
userID/Pswd on local host)

The script that passes the variable (variable does pass to 2nd html doc)

script language=Javascript!--
function popImg1() {
window.open('../../assets/img760/img.php?getimg=alfstag1','img','toolbar=0,l
ocation=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,copyhist
ory=0,width=800,height=600,left=0,top=0')
//--
/script

The php/mysql connect  search (have tested the connect and it works db
name=img760 table=img)

?
$link = mysql_connect('localhost')or die (Could not connect);
mysql_select_db('img760')or die (Could not select database);
$query = select ('imglocation','height','width') from img where
imgname=$getimg;
$imglocation = 'imglocation';
$height = 'height';
$width = 'width';
?

The display of the image

td align=centera href=javascript:void(0) img src=? echo
$imglocation ? width=? echo $width ? height=? echo $height ?
border=0/a/td

I have been able to pass these variables directly in the url and display the
image. trying to do it with a DB look up all I get in the code is the
literal not the variable (img scr=imglocation width=widthetc) ...

Where am I going wrong?  I have fiddled and changed until I have about
exhausted the possibilities... (Apache server on Win2k if it makes any
difference should not...)

What is a good reference book on PHP/MySQL... ???  I have one but obviously
it was a bad choice (title/author to remain unspoken. forever)

Thanks
Mike









-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 10:13 am, turtle wrote:

 ?
 $link = mysql_connect('localhost')or die (Could not connect);
 mysql_select_db('img760')or die (Could not select database);
 $query = select ('imglocation','height','width') from img where
 imgname=$getimg;
 $imglocation = 'imglocation';
 $height = 'height';
 $width = 'width';
 ?

You need to read the manual on the mysql functions.

Specifically, functions like mysql_fetch_array, mysql_fetch_row, 
mysql_result.  You're setting $imglocation to a string, not a returned result 
from mysql.  You need to use one of the three functions I mentioned to retun 
an actual mysql result.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Quick array question

2001-10-30 Thread David Yee

Hi.  Is there an array function that deletes an array element (that's not at the 
beginning or the end of the array) and return the resultant array?  E.g. this is what 
I want to do:

$a = array(1, 2, 3, 4, 5);

$b = array_element_delete_function($a, 2);

$b now has 4 elements with the following values: (1, 2, 4, 5)

Thanks.

David



Re: [PHP] need coments...

2001-10-30 Thread Kurt Lieber

Well, my first comment would be to not send attachments to mailing lists.  

--kurt

On Tuesday 30 October 2001 11:40 am, Galkov Vladimir wrote:
 Good day!

 I try to wrote Web-interface for DNS. Only simple test version now. I'd
 like to listen your comets to make real good and useful thing. mail me you
 coments
 please

 Galkov Vladimir
 ICQ 84873967

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Quick array question

2001-10-30 Thread Matt Williams

Just found this in the manual notes

http://www.php.net/manual/en/ref.array.php

To delete an element from an array in an easy way, use
unset($array[element]);...

Funny those... manuals

M: 

 -Original Message-
 From: David Yee [mailto:[EMAIL PROTECTED]]
 Sent: 30 October 2001 19:03
 To: [EMAIL PROTECTED]
 Subject: [PHP] Quick array question
 
 
 Hi.  Is there an array function that deletes an array element 
 (that's not at the beginning or the end of the array) and return 
 the resultant array?  E.g. this is what I want to do:
 
 $a = array(1, 2, 3, 4, 5);
 
 $b = array_element_delete_function($a, 2);
 
 $b now has 4 elements with the following values: (1, 2, 4, 5)
 
 Thanks.
 
 David
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Quick array question

2001-10-30 Thread David Yee

That doesn't seem to do what I want.  That would only unset the value for
the element, but the element is still there.  E.g.

$a = array(1,2,3,4,5)

unset($a[2]);

$a now = (1, 2, NULL, 4, 5), but I want (1, 2, 3, 4).

David

- Original Message -
From: Matt Williams [EMAIL PROTECTED]
To: David Yee [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 10:49 AM
Subject: RE: [PHP] Quick array question


 Just found this in the manual notes

 http://www.php.net/manual/en/ref.array.php

 To delete an element from an array in an easy way, use
 unset($array[element]);...

 Funny those... manuals

 M:

  -Original Message-
  From: David Yee [mailto:[EMAIL PROTECTED]]
  Sent: 30 October 2001 19:03
  To: [EMAIL PROTECTED]
  Subject: [PHP] Quick array question
 
 
  Hi.  Is there an array function that deletes an array element
  (that's not at the beginning or the end of the array) and return
  the resultant array?  E.g. this is what I want to do:
 
  $a = array(1, 2, 3, 4, 5);
 
  $b = array_element_delete_function($a, 2);
 
  $b now has 4 elements with the following values: (1, 2, 4, 5)
 
  Thanks.
 
  David
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Quick array question

2001-10-30 Thread David Yee

Got it- thanks Philip.

David

- Original Message -
From: Philip Olson [EMAIL PROTECTED]
To: David Yee [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 11:27 AM
Subject: Re: [PHP] Quick array question


 Check out this post:

   http://marc.theaimsgroup.com/?l=php-generalm=100096614905023

 Which reads:

 Here's an example using unset() and array_splice(), notice the subtle
 difference:

 ?php

 $foo = array('a','b','c');

   unset($foo[1]);

   print_r($foo);// [0] = a [2] = c

 $bar = array('a','b','c');

   $piece = array_splice ($bar, 1 ,1);

   print_r($piece);  // [0] = b

   print_r($bar);// [0] = a [1] = c

 ?

 Okay, no need to check the old post now :)  Check out :

   http://uk.php.net/array_slice
   http://uk.php.net/array_splice

 regards,
 Philip Olson


 On Tue, 30 Oct 2001, David Yee wrote:

  That doesn't seem to do what I want.  That would only unset the value
for
  the element, but the element is still there.  E.g.
 
  $a = array(1,2,3,4,5)
 
  unset($a[2]);
 
  $a now = (1, 2, NULL, 4, 5), but I want (1, 2, 3, 4).
 
  David
 
  - Original Message -
  From: Matt Williams [EMAIL PROTECTED]
  To: David Yee [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Tuesday, October 30, 2001 10:49 AM
  Subject: RE: [PHP] Quick array question
 
 
   Just found this in the manual notes
  
   http://www.php.net/manual/en/ref.array.php
  
   To delete an element from an array in an easy way, use
   unset($array[element]);...
  
   Funny those... manuals
  
   M:
  
-Original Message-
From: David Yee [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2001 19:03
To: [EMAIL PROTECTED]
Subject: [PHP] Quick array question
   
   
Hi.  Is there an array function that deletes an array element
(that's not at the beginning or the end of the array) and return
the resultant array?  E.g. this is what I want to do:
   
$a = array(1, 2, 3, 4, 5);
   
$b = array_element_delete_function($a, 2);
   
$b now has 4 elements with the following values: (1, 2, 4, 5)
   
Thanks.
   
David
   
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Quick array question

2001-10-30 Thread David Yee

Well for that example I'm using 0 as the index for the first element of the
array, so deleting element #2 results in 3 being deleted.  BTW to correct
myself in the second example I gave I want:

$a = (1,2,4,5) instead of (1,2,3,4).

 $a = array(1,2,3,4,5)

 unset($a[2]);

 $a now = (1, 2, NULL, 4, 5), but I want (1, 2, 3, 4).

Thanks.

David

- Original Message -
From: Sam Masiello [EMAIL PROTECTED]
To: David Yee [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 10:53 AM
Subject: Re: [PHP] Quick array question



 Very interesting delete function..

 I assume $b should have values (1,3,4,5), not (1,2,4,5) :)

 --Sam



 - Original Message -
 From: David Yee [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 30, 2001 2:03 PM
 Subject: [PHP] Quick array question


 Hi.  Is there an array function that deletes an array element (that's not
at
 the beginning or the end of the array) and return the resultant array?
E.g.
 this is what I want to do:

 $a = array(1, 2, 3, 4, 5);

 $b = array_element_delete_function($a, 2);

 $b now has 4 elements with the following values: (1, 2, 4, 5)

 Thanks.

 David





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread turtle

.
No reading that section of the manual did me no good.  I do not understand
other than I cannot store the results as a variable.

Is there any of what I have done that is usable?

A recommendation for a book that covers this would be helpful...  the manual
on this area is way to abbreviated for someone who has only used PHP for 2
weeks.

Mike


Kurt Lieber [EMAIL PROTECTED] wrote in message
E15ydj6-0003KZ-00@z8">news:E15ydj6-0003KZ-00@z8...
 On Tuesday 30 October 2001 10:13 am, turtle wrote:

  ?
  $link = mysql_connect('localhost')or die (Could not connect);
  mysql_select_db('img760')or die (Could not select database);
  $query = select ('imglocation','height','width') from img where
  imgname=$getimg;
  $imglocation = 'imglocation';
  $height = 'height';
  $width = 'width';
  ?

 You need to read the manual on the mysql functions.

 Specifically, functions like mysql_fetch_array, mysql_fetch_row,
 mysql_result.  You're setting $imglocation to a string, not a returned
result
 from mysql.  You need to use one of the three functions I mentioned to
retun
 an actual mysql result.

 --kurt





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 11:58 am, turtle wrote:
 No reading that section of the manual did me no good.  I do not understand
 other than I cannot store the results as a variable.

yes, you can. 


 Is there any of what I have done that is usable?

yes, there is. see below.  It's probably not solid enough to cut 'n' paste, 
but it at least shows you how to get return results from mysql.

 A recommendation for a book that covers this would be helpful...  the
 manual on this area is way to abbreviated for someone who has only used PHP
 for 2 weeks.

Beginning PHP4 by Wrox



?
 $link = mysql_connect('localhost')or die (Could not connect);
 mysql_select_db('img760')or die (Could not select database);
 $query = select imglocation,height,width from img where
imgname=$getimg; //you haven't defined $getimg anywhere that I can see
// also need to enclose it in quotes: '$getimg'
  $results = mysql_fetch_array($query); //new line
 $imglocation = $reults['imglocation']; 
 $height = $results['height'];
 $width = $results['width'];
?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Tree View

2001-10-30 Thread Ing. Gustavo Edelstein

Hi,
Has anybody a snippet or something to build a treeview with data from a
MySQL table ?
Thanks,

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Tree View

2001-10-30 Thread Philip Hallstrom

Check www.zend.com in the code gallery...

On Tue, 30 Oct 2001, Ing. Gustavo Edelstein wrote:

 Hi,
 Has anybody a snippet or something to build a treeview with data from a
 MySQL table ?
 Thanks,

 Ing. Gustavo A. Edelstein
 Tech. Mgr.
 Equiplus Argentina S.A.
 __
 Visit us On Line at www.equiplus.com
 Email addresses:
 Operations: [EMAIL PROTECTED]
 Consulting: [EMAIL PROTECTED]
 Technical: [EMAIL PROTECTED]
 Web related: [EMAIL PROTECTED]
 General: [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] does array sorted like you show in example?

2001-10-30 Thread Galkov Vladimir

Good day!
;-) does array sorted like you show in example?
then the shortest way will be:

$a = array_element_delete_function($a, 2);
...
function array_element_delete_function($a, $ind)
{
$a[$ind] = $a[0];
unset($a[0]);
return sort($a);
}

ofcourse if count($a) not criticaly large

Galkov Vladimir
[EMAIL PROTECTED]
ICQ 84873967



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] virtual

2001-10-30 Thread Nikola Karoviæ

no wait, try require or  but not using apsolute path like
require(../../cgi-bin/folder/program.pl); for eg.

-
volim popit, volim zagalamit



- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 30. listopad 2001 16:30
Subject: Re: [PHP] virtual


 Tried that, same result. looks like I am going to have to strip off the
 php from that page and change it to shtml

 Gary

 Nikola karoviæ wrote:

  you could try using require(/cgi-bin/folder/program.pl); instead
  -
  volim popit, volim zagalamit
  - Original Message -
  From: Gary [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: 30. listopad 2001 04:41
  Subject: [PHP] virtual
 
 
 
 What would cause a fatal error using
virtual(/cgi-bin/folder/program.pl);
 
  ?
 
 TIA
 Gary
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Mail Handling Question

2001-10-30 Thread Reggie White

Hi. I'm new to PHP, and forgive me if I sound ridiculous but I have to ask.
I'll be as clear as possible.

I'm trying to do mail handling in php. I know already about the  mail( )
function, but what it does isn't exactly what I need.
I have an html form that posts the contents of it's field to a php document.
The php document is an html template of a formal letter where the contents
of the form are passed into the letter as variables where appropriate. The
user is able to preview the letter when they are done modifying it.

Now here's where I'm stuck. When the user is finished previewing the html
letter, I want two things to happen: When the user submits, I want the page
itself (with the variable in it) to be emailed to a specified recipient. I
also want a blind copy of specific information from the form to be email to
me for reporting purposes.

Is this possible? and how?

Thanks everyone,
Reginald White




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Mail Handling Question

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 01:56 pm, Reggie White wrote:
 Now here's where I'm stuck. When the user is finished previewing the html
 letter, I want two things to happen: When the user submits, I want the page
 itself (with the variable in it) to be emailed to a specified recipient. I
 also want a blind copy of specific information from the form to be email to
 me for reporting purposes.

 Is this possible? and how?


Sure -- when you include the variables in the form letter, also include them 
as hidden form fields.  Then, when the user submits the form, you have all 
those same variables that you can do whatever with. 

Another alternative to hidden form fields would be to use url variables and 
put them in the ACTION=... part of your form tag.  (i.e. form 
action=foo.php?var1=1var2=2...)

Then, you can simply use the mail() handler as you would normally.

hth

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: does array sorted like you show in example?

2001-10-30 Thread Galkov Vladimir

Good day!

my fingersrun faster my head ;-) ofcourse... MUST be  (not in one string...)

function array_element_delete_function($a, $ind)
{
 $a[$ind] = $a[0];
 unset($a[0]);
 sort($a); // 
 return $a;   // 

}

-
Galkov Vladimir
[EMAIL PROTECTED]
ICQ 8487396



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Mail Handling Question

2001-10-30 Thread Mike Frazer

Create a template file with the letter text in it and something like
%%variable%% where the variable text would go.

After you've done that, set up your preview page like:

html
body
form action=script.php method=post
!-- Do this for each variable in the letter or one big variable for
$contents --
!-- but keep in mind there's a size limit on variables being passed --
input type=hidden name=variable value=?php echo $variable ?

?php
// Reads all the lines of the file into an array and
// then joins the lines into one variable
$contents = join(, file(letter.txt));

// Do one line like this for each variable
$contents = str_replace(%%variable%%, $variable, $contents);

print $contents;
?

input type=submit value=Send Message
/form

/body
/html

If you set the HIDDEN tags to individual variables as opposed to $contents,
remember that you still need to do the following code again to send the
message:

$contents = join(, file(letter.txt));
$contents = str_replace(%%variable%%, $variable, $contents);

Hope that helps.

Mike Frazer




Reggie White [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi. I'm new to PHP, and forgive me if I sound ridiculous but I have to
ask.
 I'll be as clear as possible.

 I'm trying to do mail handling in php. I know already about the  mail( )
 function, but what it does isn't exactly what I need.
 I have an html form that posts the contents of it's field to a php
document.
 The php document is an html template of a formal letter where the contents
 of the form are passed into the letter as variables where appropriate. The
 user is able to preview the letter when they are done modifying it.

 Now here's where I'm stuck. When the user is finished previewing the html
 letter, I want two things to happen: When the user submits, I want the
page
 itself (with the variable in it) to be emailed to a specified recipient. I
 also want a blind copy of specific information from the form to be email
to
 me for reporting purposes.

 Is this possible? and how?

 Thanks everyone,
 Reginald White






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Searchengine friendly URLs

2001-10-30 Thread Chris Hayes

I heard google does follow links with the ?var=value part, others don't.

So some people now work with 
page.html/var/value/var2/value2

don't ask me how it works though



--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --


 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Searchengine friendly URLs

2001-10-30 Thread Joseph Blythe

Not sure if you have seen this, it has been around for a while:

http://www.phpbuilder.com/columns/tim2526.php3

Regards,

Joseph

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 27 October 2001 3:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Searchengine friendly URLs


Hi there,

I heared that search engines are not following things after the question
mark. Now I looked arround and noticed, that some sites yust have numbers
behind the .php extension. How does this work? Can anybody make an example
and list advantages and disadvantages?

Thanx,

Andy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread turtle

.
It is starting to make sense.  I see the correlation between the manual
example and the code you show.  Surprisingly (and equally confusing) the
book I have also uses a while loop with mysql_fetch_array to display a list.

The getimg variable comes in from the javasript function on the other page
embedded in the url:
window.open('../../assets/img760/img.php?getimg=alfstag1')
the variable content is the field (imgname) that I use to find the record.

I have been passing all of the variables manually via the url but it would
be best if I used a database as there are around 400 to show and changes in
a db are easier than in the html head.

This may be the problem as I now get supplied argument not valid mysql
result on this line.
$query = select imglocation,height,width from img where imgname='$getimg';

Thank you for taking the time with me on this.  I will see if I can find the
remaining problems and get to coding the 400+ pages that I need to get this
into.

It looks like I might be able to use the GetImageSize function to do this
same thing?  maybe?  All I am doing is getting the location (url) of an
image and its height and width for an img src=  statement.  maybe I am
making this into a bigger job than necessary??  I think I have been working
on it too long today and I need a long walk.

Anyway, thank you again for taking the time and for the book recommendation.

Mike


Kurt Lieber [EMAIL PROTECTED] wrote in message
E15yfMr-0003fP-00@z8">news:E15yfMr-0003fP-00@z8...
 On Tuesday 30 October 2001 11:58 am, turtle wrote:
  No reading that section of the manual did me no good.  I do not
understand
  other than I cannot store the results as a variable.

 yes, you can.


  Is there any of what I have done that is usable?

 yes, there is. see below.  It's probably not solid enough to cut 'n'
paste,
 but it at least shows you how to get return results from mysql.

  A recommendation for a book that covers this would be helpful...  the
  manual on this area is way to abbreviated for someone who has only used
PHP
  for 2 weeks.

 Beginning PHP4 by Wrox



 ?
  $link = mysql_connect('localhost')or die (Could not connect);
  mysql_select_db('img760')or die (Could not select database);
  $query = select imglocation,height,width from img where
   imgname=$getimg; //you haven't defined $getimg anywhere that I can
see
 // also need to enclose it in quotes: '$getimg'
   $results = mysql_fetch_array($query); //new line
  $imglocation = $reults['imglocation'];
  $height = $results['height'];
  $width = $results['width'];
 ?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] table troubles

2001-10-30 Thread David Robley

On Tue, 30 Oct 2001 19:13, Morten Winkler Jørgensen wrote:
 NV Hi !

 NV I'm making a web site which allows user to add his own news, or
 other data to the page NV via the form. The user inputs the data into
 the textarea and the data is placed into a NV table. The problem is
 that all the text is placed into a single line ! NV Is there a html
 catch to prevent this, or I'll have to break the string into the
 smaller NV parts ? This is not so good, because of the screen
 resolution ...

 NV Help !!!


 TEXTAREA WORDWRAP= PHYSICAL or VIRTUAL ...

 Physical inserts newlines into the text whenever needed
 Virtual just wraps the text in the area.

And of course you'll need to use nl2br() if you want the text to break in 
a HTML page.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Without Time, everything would happen at once.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problems inserting single quote into Oracle database

2001-10-30 Thread Kevin Dewsnup

I am having problems with inserting single quote's
into an oracle 8.1.7 database through a form.

When inserting 'its' it works fine.

When inserting 'it's' I get this error:
OCIParse: ORA-01756: quoted string not properly
terminated in blah... 

So then I try 'it''s' (which works in SQL*Plus) I get
this error:
OCIStmtExecute: ORA-00911: invalid character in
blah...

Thank's in advance!

-Kevin

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] show png in the browser

2001-10-30 Thread Luz Lopez

Hi All

I configured the php with thelibrary GD, zlib, jpeg and libpng, I hae a 
program that generate a image, I can to save this png image but in my 
borwser I can't to see this image, the browser send me to save to my hard 
disk this image.

I need to show this image in the browser, How can I do it?

Thanks in Advanced,

Regards,

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] show png in the browser

2001-10-30 Thread Tyler Longren

It might just be your browser.  I've viewed png's in IE before and it tried
to make me download them instead of displaying them.

Tyler

- Original Message -
From: Luz Lopez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 12:38 AM
Subject: [PHP] show png in the browser


 Hi All

 I configured the php with thelibrary GD, zlib, jpeg and libpng, I hae a
 program that generate a image, I can to save this png image but in my
 borwser I can't to see this image, the browser send me to save to my hard
 disk this image.

 I need to show this image in the browser, How can I do it?

 Thanks in Advanced,

 Regards,

 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 02:53 pm, you wrote:
 It is starting to make sense.  I see the correlation between the manual
 example and the code you show.  Surprisingly (and equally confusing) the
 book I have also uses a while loop with mysql_fetch_array to display a
 list.

You would use a while loop if/when you have multiple records to retrive.  
From your original code example, it seemed as though you would only have one 
record.  (though, for safety's sake, you should code a LIMIT into your sql 
statement)


 This may be the problem as I now get supplied argument not valid mysql
 result on this line.
 $query = select imglocation,height,width from img where
 imgname='$getimg';

Two things to try:

1.  Run that exact query on a mysql command line, substituting whatever 
variable name you're trying to pass in the URL.  Often times, I find that I 
tihnk I have a PHP problem when, in fact, I screwed up my query syntax 
somewhere.

2.  Explicitly define $getimg as something you know to be a valid image.  If 
that works, then you know it isn't getting passed from the url properly.  

 It looks like I might be able to use the GetImageSize function to do this
 same thing?  maybe?  All I am doing is getting the location (url) of an
 image and its height and width for an img src=  statement.  maybe I
 am making this into a bigger job than necessary??  I think I have been
 working on it too long today and I need a long walk.

Actually, yes you can.  

$myImgSize = getImageSize('/unix/path/to/my/file.jpg'); should return the 
image sizes in an array.  You should then be able to do something like:

img src=file.jpg $myImgSize[3]

Which should automatically include height/width parameters.  (see this 
function on the php site for more info -- also, that's untested, off-the-cuff 
code I just wrote.  Might not work perfectly. :)

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mysql prob w/ php

2001-10-30 Thread sc

Hi;

i keep getting an error of: Warning: Supplied argument is not a valid MySQL
result resource in /datascripts/insertdata.php on line 17...

Line 17 is: $row = mysql_fetch_assoc($test);

and here is the rest of it (not all of it though):

for ($p = 1; $p = 24; $p++) {
$test = mysql_db_query(melbourne, SELECT * FROM 'Port$p' WHERE
'Port$p'.date='$yesterday');
$row = mysql_fetch_assoc ($test);
$yindata = $row['switchin'];
$youtdata = $row['switchout'];
$dinPort = '$inPort$p' - $yindata;
$doutPort = '$outPort$p'  - $youtdata;

Can anyone help me overcome this prob? i've prob missed something without
thinking but i cant seem to get it...

Thx.

sc







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problems inserting single quote into Oracle database

2001-10-30 Thread David Robley

On Wed, 31 Oct 2001 11:01, Kevin Dewsnup wrote:
 I am having problems with inserting single quote's
 into an oracle 8.1.7 database through a form.

 When inserting 'its' it works fine.

 When inserting 'it's' I get this error:
 OCIParse: ORA-01756: quoted string not properly
 terminated in blah...

 So then I try 'it''s' (which works in SQL*Plus) I get
 this error:
 OCIStmtExecute: ORA-00911: invalid character in
 blah...

 Thank's in advance!

 -Kevin

Backslash works for mysql. Have a look at the addslashes (for putting 
into Oracle) and stripslashes (for displaying data retrieved) functions, 
also the magic_quotes settings in your php.ini.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   My lucky color just faded.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] show png in the browser

2001-10-30 Thread David Robley

On Wed, 31 Oct 2001 11:08, Luz Lopez wrote:
 Hi All

 I configured the php with thelibrary GD, zlib, jpeg and libpng, I hae a
 program that generate a image, I can to save this png image but in my
 borwser I can't to see this image, the browser send me to save to my
 hard disk this image.

 I need to show this image in the browser, How can I do it?

 Thanks in Advanced,

 Regards,

You may need to send a header including the correct mime type.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Help endangered species - adopt a KGB operative.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mysql php prob...

2001-10-30 Thread sc

Hi;

i keep getting an error of: Warning: Supplied argument is not a valid MySQL
result resource in /datascripts/insertdata.php on line 17...

Line 17 is: $row = mysql_fetch_assoc($test);

and here is the rest of it (not all of it though):

for ($p = 1; $p = 24; $p++) {
$test = mysql_db_query(melbourne, SELECT * FROM 'Port$p' WHERE
'Port$p'.date='$yesterday');
$row = mysql_fetch_assoc ($test);
$yindata = $row['switchin'];
$youtdata = $row['switchout'];
$dinPort = '$inPort$p' - $yindata;
$doutPort = '$outPort$p'  - $youtdata;

Can anyone help me overcome this prob? i've prob missed something without
thinking but i cant seem to get it...

Thx.

sc




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php mysql prob...

2001-10-30 Thread sc

Hi;

i keep getting an error of: Warning: Supplied argument is not a valid MySQL
result resource in /datascripts/insertdata.php on line 17...

Line 17 is: $row = mysql_fetch_assoc($test);

and here is the rest of it (not all of it though):

for ($p = 1; $p = 24; $p++) {
$test = mysql_db_query(melbourne, SELECT * FROM 'Port$p' WHERE
'Port$p'.date='$yesterday');
$row = mysql_fetch_assoc ($test);
$yindata = $row['switchin'];
$youtdata = $row['switchout'];
$dinPort = '$inPort$p' - $yindata;
$doutPort = '$outPort$p'  - $youtdata;

Can anyone help me overcome this prob? i've prob missed something without
thinking but i cant seem to get it...

Thx.

sc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread David Robley

On Wed, 31 Oct 2001 11:25, sc wrote:
 Hi;

 i keep getting an error of: Warning: Supplied argument is not a valid
 MySQL result resource in /datascripts/insertdata.php on line 17...

 Line 17 is: $row = mysql_fetch_assoc($test);

 and here is the rest of it (not all of it though):

 for ($p = 1; $p = 24; $p++) {
 $test = mysql_db_query(melbourne, SELECT * FROM 'Port$p' WHERE
 'Port$p'.date='$yesterday');
 $row = mysql_fetch_assoc ($test);
 $yindata = $row['switchin'];
 $youtdata = $row['switchout'];
 $dinPort = '$inPort$p' - $yindata;
 $doutPort = '$outPort$p'  - $youtdata;

 Can anyone help me overcome this prob? i've prob missed something
 without thinking but i cant seem to get it...

 Thx.

 sc

Er, want to be a little patient? That is three requests in seven minutes?

Your query is probably broken - do some error checking after your 
database call with mysql_error() and see what the problem is.

Guess; the table name.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   I know all the wherefores, said Tom wisely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread Jason Brooke

Or the single quotes around the table name in the sql string 


 Your query is probably broken - do some error checking after your 
 database call with mysql_error() and see what the problem is.
 
 Guess; the table name.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread sc

Yeah sorry about that, didn't mean to send out 3...

Ok i got it working... thanks for all the replys...

-sc


David Robley [EMAIL PROTECTED] wrote in message
01103111392904.28397@www">news:01103111392904.28397@www...
 On Wed, 31 Oct 2001 11:25, sc wrote:
  Hi;
 
  i keep getting an error of: Warning: Supplied argument is not a valid
  MySQL result resource in /datascripts/insertdata.php on line 17...
 
  Line 17 is: $row = mysql_fetch_assoc($test);
 
  and here is the rest of it (not all of it though):
 
  for ($p = 1; $p = 24; $p++) {
  $test = mysql_db_query(melbourne, SELECT * FROM 'Port$p' WHERE
  'Port$p'.date='$yesterday');
  $row = mysql_fetch_assoc ($test);
  $yindata = $row['switchin'];
  $youtdata = $row['switchout'];
  $dinPort = '$inPort$p' - $yindata;
  $doutPort = '$outPort$p'  - $youtdata;
 
  Can anyone help me overcome this prob? i've prob missed something
  without thinking but i cant seem to get it...
 
  Thx.
 
  sc

 Er, want to be a little patient? That is three requests in seven minutes?

 Your query is probably broken - do some error checking after your
 database call with mysql_error() and see what the problem is.

 Guess; the table name.

 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

I know all the wherefores, said Tom wisely.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread David Robley

On Wed, 31 Oct 2001 11:47, Jason Brooke wrote:
 Or the single quotes around the table name in the sql string

  Your query is probably broken - do some error checking after your
  database call with mysql_error() and see what the problem is.
 
  Guess; the table name.

That's what I meant - but I was hoping he'd do a bit of work :-)
-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   This is Borg. ESC is futile CTRL is inevitable

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] show png in the browser

2001-10-30 Thread Luz Lopez

Hi David, of course, I send of header: header(Content-type: image/png);
But the send me to save the file

Thanks,

Regards,



From: David Robley [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Luz Lopez [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] show png in the browser
Date: Wed, 31 Oct 2001 11:28:02 +1030

On Wed, 31 Oct 2001 11:08, Luz Lopez wrote:
  Hi All
 
  I configured the php with thelibrary GD, zlib, jpeg and libpng, I hae a
  program that generate a image, I can to save this png image but in my
  borwser I can't to see this image, the browser send me to save to my
  hard disk this image.
 
  I need to show this image in the browser, How can I do it?
 
  Thanks in Advanced,
 
  Regards,

You may need to send a header including the correct mime type.

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

Help endangered species - adopt a KGB operative.


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread sc

ok i thought it would be working, but on testing it more it still isn't
going for me i took off the ' ' from the table name and its still coming
up with an error on line 17 with the same error message... the mysql_error()
isn't echoing anything that has gone wrong.. (did before)..

Any ideas?

thx.

-sc
Jason Brooke [EMAIL PROTECTED] wrote in message
043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a...
 Or the single quotes around the table name in the sql string


  Your query is probably broken - do some error checking after your
  database call with mysql_error() and see what the problem is.
 
  Guess; the table name.






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] show png in the browser

2001-10-30 Thread Jim Lucas

what type of browser are you using to view this image?

jim
- Original Message -
From: Luz Lopez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 1:56 AM
Subject: Re: [PHP] show png in the browser


 Hi David, of course, I send of header: header(Content-type: image/png);
 But the send me to save the file

 Thanks,

 Regards,



 From: David Robley [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Luz Lopez [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: [PHP] show png in the browser
 Date: Wed, 31 Oct 2001 11:28:02 +1030
 
 On Wed, 31 Oct 2001 11:08, Luz Lopez wrote:
   Hi All
  
   I configured the php with thelibrary GD, zlib, jpeg and libpng, I hae
a
   program that generate a image, I can to save this png image but in my
   borwser I can't to see this image, the browser send me to save to my
   hard disk this image.
  
   I need to show this image in the browser, How can I do it?
  
   Thanks in Advanced,
  
   Regards,
 
 You may need to send a header including the correct mime type.
 
 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
 
 Help endangered species - adopt a KGB operative.


 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread sc

mysql_error returns nothing, mysql_errno returns 0
Jim Lucas [EMAIL PROTECTED] wrote in message
03ad01c161b0$026caee0$[EMAIL PROTECTED]">news:03ad01c161b0$026caee0$[EMAIL PROTECTED]...
 mysql_error()  and mysql_errno()  return the value.

 $error = mysql_error($dblink);
 $errno = mysql_errno($dblink);
 or
 echo mysql_error($dblink);
 echo mysql_errno($dblink);

 jim
 - Original Message -
 From: sc [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 30, 2001 6:01 PM
 Subject: Re: [PHP] php  mysql prob...


  ok i thought it would be working, but on testing it more it still isn't
  going for me i took off the ' ' from the table name and its still
 coming
  up with an error on line 17 with the same error message... the
 mysql_error()
  isn't echoing anything that has gone wrong.. (did before)..
 
  Any ideas?
 
  thx.
 
  -sc
  Jason Brooke [EMAIL PROTECTED] wrote in message
  043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a...
   Or the single quotes around the table name in the sql string
  
  
Your query is probably broken - do some error checking after your
database call with mysql_error() and see what the problem is.
   
Guess; the table name.
  
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] date problem

2001-10-30 Thread Steve Tsai

For reference:
OS: OpenBSD 2.9
Web Server: Apache1.3.19
PHP Version: 4.0.6

My problem is that date() and all the other time functions return GMT instead 
of localtime.  system(date) returns the correct localtime.  Those functions 
used to return localtime since GMT.  The problem seems to have started after 
daylight savings time changed.  I hope someone has an idea of what's wrong 
and how to fix it.  As for now, I'm adding time() - 3600 * 8 to all my 
scripts right now.

Steve

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php mysql prob...

2001-10-30 Thread Jim Lucas

are you pass the two functions you return link from mysql_connect()  or
mysql_pconnect() ??

jim
- Original Message -
From: sc [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 6:15 PM
Subject: Re: [PHP] php  mysql prob...


 mysql_error returns nothing, mysql_errno returns 0
 Jim Lucas [EMAIL PROTECTED] wrote in message
 03ad01c161b0$026caee0$[EMAIL PROTECTED]">news:03ad01c161b0$026caee0$[EMAIL PROTECTED]...
  mysql_error()  and mysql_errno()  return the value.
 
  $error = mysql_error($dblink);
  $errno = mysql_errno($dblink);
  or
  echo mysql_error($dblink);
  echo mysql_errno($dblink);
 
  jim
  - Original Message -
  From: sc [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, October 30, 2001 6:01 PM
  Subject: Re: [PHP] php  mysql prob...
 
 
   ok i thought it would be working, but on testing it more it still
isn't
   going for me i took off the ' ' from the table name and its still
  coming
   up with an error on line 17 with the same error message... the
  mysql_error()
   isn't echoing anything that has gone wrong.. (did before)..
  
   Any ideas?
  
   thx.
  
   -sc
   Jason Brooke [EMAIL PROTECTED] wrote in message
   043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a...
Or the single quotes around the table name in the sql string
   
   
 Your query is probably broken - do some error checking after your
 database call with mysql_error() and see what the problem is.

 Guess; the table name.
   
   
   
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] show png in the browser

2001-10-30 Thread Luz Lopez

Hi,

I use Internet Explorer 5.003 Windows 2000 Profesional

Regards,


From: Jim Lucas [EMAIL PROTECTED]
To: Luz Lopez [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] show png in the browser
Date: Tue, 30 Oct 2001 18:00:09 -0800

what type of browser are you using to view this image?

jim
- Original Message -
From: Luz Lopez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 1:56 AM
Subject: Re: [PHP] show png in the browser


  Hi David, of course, I send of header: header(Content-type: 
image/png);
  But the send me to save the file
 
  Thanks,
 
  Regards,
 
 
 
  From: David Robley [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: Luz Lopez [EMAIL PROTECTED], [EMAIL PROTECTED]
  Subject: Re: [PHP] show png in the browser
  Date: Wed, 31 Oct 2001 11:28:02 +1030
  
  On Wed, 31 Oct 2001 11:08, Luz Lopez wrote:
Hi All
   
I configured the php with thelibrary GD, zlib, jpeg and libpng, I 
hae
a
program that generate a image, I can to save this png image but in 
my
borwser I can't to see this image, the browser send me to save to my
hard disk this image.
   
I need to show this image in the browser, How can I do it?
   
Thanks in Advanced,
   
Regards,
  
  You may need to send a header including the correct mime type.
  
  --
  David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
  CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
  
  Help endangered species - adopt a KGB operative.
 
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread turtle


Kurt Lieber

 You would use a while loop if/when you have multiple records to retrive.
 From your original code example, it seemed as though you would only have
one
 record.  (though, for safety's sake, you should code a LIMIT into your sql
 statement)


Yes I only need one image location with height and width from the db file



  This may be the problem as I now get supplied argument not valid mysql
  result on this line.
  $query = select imglocation,height,width from img where
  imgname='$getimg';

 Two things to try:

 1.  Run that exact query on a mysql command line, substituting whatever
 variable name you're trying to pass in the URL.  Often times, I find that
I
 tihnk I have a PHP problem when, in fact, I screwed up my query syntax
 somewhere.



Doing a command line query at a mysql prompt brings back the correct data
select imglocation,height,width from img where imgname='alfstag1'
returns:
./alf_760stag1.jpg (the image location)
544 (the height)
760 (the width)

 2.  Explicitly define $getimg as something you know to be a valid image.
If
 that works, then you know it isn't getting passed from the url properly.

  It looks like I might be able to use the GetImageSize function to do
this
  same thing?  maybe?  All I am doing is getting the location (url) of an
  image and its height and width for an img src=  statement.  maybe
I
  am making this into a bigger job than necessary??  I think I have been
  working on it too long today and I need a long walk.

 Actually, yes you can.

 $myImgSize = getImageSize('/unix/path/to/my/file.jpg'); should return the
 image sizes in an array.  You should then be able to do something like:

 img src=file.jpg $myImgSize[3]

 Which should automatically include height/width parameters.  (see this
 function on the php site for more info -- also, that's untested,
off-the-cuff
 code I just wrote.  Might not work perfectly. :)

 --kurt

I found the GetImageSize while digging around the manual and tried to work
it in without success.  I have so far this evening re-written this with
separate mysql_connect, mysql_select_db, and mysql_query functions and
tested after each and that is as far as I can get without errors.  I have
tried mysql_fetch_array, mysql_fetch_object, and mysql_fetch_row...  all
have failed for some reason  I am testing with an if (variable) set message
then echo each message in the body...  Here is a URL of a page where I pass
the same variables manually and use them in the popup to give you an idea of
what I am trying do to with a database holding this info
http://www.bronze-gallery.com/French_Sculptors/Alfred_Barye/Stag_Scratching/
stag_scratching.html click on either image to get to the php popup this
declares and passes the 3 variables in the url.

so far the light bulb has not clicked on. The php4 book you recommended
is on order

Mike





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >