Re: AW: [PHP-DB] image resizing

2001-07-13 Thread Christopher Ostmo

Stefan Siefert pressed the little lettered thingies in this order...

 There are several possibilities to do this... first PHP has the possibility
 to use the GD - Libs (which doesn't support Gif's because of licence
 problems). The second (and in my opinion better) posibility is ImageMagick
 which are some programs to modify pictures (you have to call them externaly
 from your php - scripts) (www.imagemagick.org). I think, I have seen several
 Tutorials to do so (PHP/ImageMagick) but on the fly.. I don't find them in
 my bookmarks now...
 
 Hope this helps,
 
 Stefan Siefert
 
 -Ursprungliche Nachricht-
 Von: Adv. Systems Design [mailto:[EMAIL PROTECTED]]
 Gesendet: Montag, 9. Juli 2001 16:04
 An: [EMAIL PROTECTED]
 Betreff: [PHP-DB] image resizing
 
 
 Is there a way of sizing image resolution on the fly?
 
 TIA
 

If you have ImageMagick, you only need to use the mogrify command:
exec(/usr/local/bin/mogrify -geometry 300x300 image.jpg);

This isn't built in to PHP, but it works very well if you have access to it.

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of Internet time (1995)

For a good time,
http://www.AppIdeas.com/

-- 
PHP Database 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-DB] PHP Mysql apache economy hosting

2001-07-13 Thread Beau Lebens

i am using phpwebhosting.com, which is only 9.95US per month, so far they
have been really good.

have PHP4, MYSQL (one table with account, extras by request) 150mb storage,
but this is unmonitored, PO3 email account, subdomains etc etc - take a look
at their site :)

// -Original Message-
// From: Ken Sommers [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 13 July 2001 2:26 PM
// To: PHP DB Mailing List
// Subject: [PHP-DB] PHP Mysql apache economy hosting
// 
// 
// Hello,
// can anyone recommend a good
// PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.?
// what should I look for?
// how do I verify uptime?
// 
// thanks 
// Ken
// 
// 
// 
// 
// -- 
// PHP Database 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 Database 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-DB] PHP Mysql apache economy hosting

2001-07-13 Thread Darren Casey

 Hello,
 can anyone recommend a good
 PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.?
 what should I look for?
 how do I verify uptime?

http://www.php4hosting.com (Root access to MySQL on most accounts, latest
versions of PHP/MySQL)

Free hosts listed at http://www.alt-php-faq.org/links.htm

Regards
Darren


-- 
PHP Database 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-DB] upload problem ...

2001-07-13 Thread Steve Brett

many thanks i'll try that asap.

Steve

Xsarus Internetdiensten [EMAIL PROTECTED] wrote in message
002901c0fe68$48613d40$0201a8c0@xsarusxsarus2">news:002901c0fe68$48613d40$0201a8c0@xsarusxsarus2...
 He!

 Don't use the function 'copy', but 'move_uploaded_file'.

 Ready...
 Daniel Kieviet
 Xsarus Internetdiensten
 Holland
 [EMAIL PROTECTED]


 - Original Message -
 From: Andre P. [EMAIL PROTECTED]
 To: Steve Brett [EMAIL PROTECTED]
 Cc: php-db@lists. php. net (E-mail) [EMAIL PROTECTED]
 Sent: Monday, June 25, 2001 6:17 AM
 Subject: Re: [PHP-DB] upload problem ...


  Steve,
 
  When you use input type=file the web server uploads the file to a
  temporary directory which it must have write access to, i.e. the user
  that the httpd process is run as must have write access to /php/tmp.
 
  To my knowledge there is no way of allowing the httpd process to write
  to that directory using your ftp users/password. Bear in mind that you
  could change the temporary upload directory from /php/tmp to /tmp.
 
  do you have full access to you box or only an account?
 
  hope this helps
 
  ciao
  Andre.
 
  Steve Brett wrote:
 
  hi,
  
  i have a site and need to write a script to upload / download files so
 the
  database can be updated / backed up.
  
  i've tried setting up an input type=file ... and this works fine on my
  machine but php gives an eror onthe server saying that the /php/tmp dir
  cannot be written to by, i assume, the nobody account within whihc the
 web
  server runs.
  
  i need  to be bale to write to the httpd dir using php and then i can
get
  the db to import the files.
  
  i have an ftp username and password but don't know how to get php to
pass
  the authorisation the server. the site is already password protected
just
  using a table of username / passowrds.
  
  many thanks in advance
  
  Steve
  
  
  
  
 
 
 
 
  --
  PHP Database 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 Database 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-DB] upload problem ...

2001-07-13 Thread Darren Casey

 -Original Message-
 From: Steve Brett [mailto:[EMAIL PROTECTED]]
 Sent: 13 July 2001 11:05
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] upload problem ...


 many thanks i'll try that asap.

The directorys will still need the permissions set so anyone can read/write
to the directorys (Using chmod if using linux)

Darren



 Steve

 Xsarus Internetdiensten [EMAIL PROTECTED] wrote in message
 002901c0fe68$48613d40$0201a8c0@xsarusxsarus2">news:002901c0fe68$48613d40$0201a8c0@xsarusxsarus2...
  He!
 
  Don't use the function 'copy', but 'move_uploaded_file'.
 
  Ready...
  Daniel Kieviet
  Xsarus Internetdiensten
  Holland
  [EMAIL PROTECTED]
 
 
  - Original Message -
  From: Andre P. [EMAIL PROTECTED]
  To: Steve Brett [EMAIL PROTECTED]
  Cc: php-db@lists. php. net (E-mail) [EMAIL PROTECTED]
  Sent: Monday, June 25, 2001 6:17 AM
  Subject: Re: [PHP-DB] upload problem ...
 
 
   Steve,
  
   When you use input type=file the web server uploads the file to a
   temporary directory which it must have write access to, i.e. the user
   that the httpd process is run as must have write access to /php/tmp.
  
   To my knowledge there is no way of allowing the httpd process to write
   to that directory using your ftp users/password. Bear in mind that you
   could change the temporary upload directory from /php/tmp to /tmp.
  
   do you have full access to you box or only an account?
  
   hope this helps
  
   ciao
   Andre.
  
   Steve Brett wrote:
  
   hi,
   
   i have a site and need to write a script to upload /
 download files so
  the
   database can be updated / backed up.
   
   i've tried setting up an input type=file ... and this works
 fine on my
   machine but php gives an eror onthe server saying that the
 /php/tmp dir
   cannot be written to by, i assume, the nobody account within
 whihc the
  web
   server runs.
   
   i need  to be bale to write to the httpd dir using php and then i can
 get
   the db to import the files.
   
   i have an ftp username and password but don't know how to get php to
 pass
   the authorisation the server. the site is already password protected
 just
   using a table of username / passowrds.
   
   many thanks in advance
   
   Steve
   
   
   
   
  
  
  
  
   --
   PHP Database 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 Database 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 Database 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-DB] Chose ID from Table ?

2001-07-13 Thread Dobromir Velev

Hi,
If you're using MySQL you could try with mysql_insert_id()
http://www.php.net/manual/en/function.mysql-insert-id.php

Dobromir Velev

-Original Message-
From: Andreas Iwanowski [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Friday, July 13, 2001 2:12 PM
Subject: [PHP-DB] Chose ID from Table ?


Hello
How can i do this here:
I have a script, where i insert informations into a table.
I now want now to read out the ID those informations got.

Hot to do that ?

--


mfg, andy

-
In Memoriam - Jaques
www.amdclan.de/jaques
--



-- 
PHP Database 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 Database 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-DB] Escaping

2001-07-13 Thread Rankin, Randy

Thanks to all for your help. I had to step away for a while yesterday so I
am just now getting back to your responses.

Here is what I was having a problem with:
a href=\sales_location.php?Customer=$Customer\
target=bottom_right$Customer/a


Based on your responses, here is what I have now (this works!):
a href=\sales_location.php?Customer= . urlencode($Customer) .\
target=bottom_right$Customer/a


As you can see, urlencode did the trick. Thanks again everybody!!

Randy Rankin



-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 10:27 PM
To: Rankin, Randy; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Escaping 


Please explain the dynamic link .
is that in the documentation somewhere?

Kne
- Original Message -
From: Rankin, Randy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 12, 2001 8:18 AM
Subject: [PHP-DB] Escaping 


 Hello,

 I have a table in a MySQL DB (RH Linux/Apache) with a field called
 customer_name. Some of the customer names have an ampersand in them (ie; X

 X Supply). I am performing a select statement on this table to create a
 sales summary with customer name and total sales.

 This works fine; however, I am also creating a dynamic link on the
customer
 name so that the user can click on it to get a detailed report of sales to
 that customer. This works great EXCEPT for the customers with ampersands
in
 thier names. The result of clicking on these customers indicates a No
 Records found for X where X is the letter immediately preceding the
 ampersand.

 Does anyone know how to get around this?

 TIA,

 Randy Rankin

 --
 PHP Database 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 Database 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 Database 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-DB] PHP Mysql apache economy hosting

2001-07-13 Thread support


I recommend MissoulaWeb for $10/month.

  http://www.missoulaweb.com/testimonials.phtml
  http://www.missoulaweb.com/allfeatures.phtml
  http://www.missoulaweb.com/compare.phtml   (a chart)

As for verifying uptime, try using the tool at
http://uptime.netcraft.com/up/graph/

-- 
Allen Lee
http://MissoulaWeb.com
Hosting, Programming and Design



-- 
PHP Database 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] Ingres PHP

2001-07-13 Thread Frank Pietsch

Hello,

I'm trying to access Ingres II database servers.
But if I use the extension php_ingres.dll php.exe crashes (with and without
parsing a file).
I executed php.exe wih the Dependency Walker
(http://www.dependencywalker.com).
Here the last output of the log window after profiling:
...
LoadLibraryA(./extensions/php_ingres.dll) returned 0x00DE by thread 1.
GetProcAddress(0x00DE [c:\php\extensions\PHP_INGRES.DLL], get_module)
called from c:\winnt\system32\PHP4TS.DLL at address 0x10019DDF and
returned 0x00DE1000 by thread 1.
First chance exception 0xC005 (Access Violation) occurred in
c:\winnt\system32\PHP4TS.DLL at address 0x100969C9 by thread 1.
Second chance exception 0xC005 (Access Violation) occurred in
c:\winnt\system32\PHP4TS.DLL at address 0x100969C9 by thread 1.
Exited c:\php\PHP.EXE (process 0x428) with code 128 (0x80) by thread 1.

Second,
I tried a ODBC_CONNECT with PHP (without the extension php_ingres.dll).
But no success.
It's no problem to access INGRES-ODBC with Crystal Reports and JDBC.
Even if php.exe parse test.php it pop´s up a Errorwindow:
ODBC/OpenAPI Initialization Error:
IIapi_initialize() return code=8(out of memory)
Output on commandline: Trashed symbol table C:\oro\ingres\files\symbol.tbl
bWarning/b:  SQL error: [Microsoft][ODBC Driver Manager] Fehler beim
SQLAllocHandle-Aufruf f³r Treiber auf  SQL_HANDLE_ENV., SQL state IM004 in
SQLConnect in be:\php\condb.php/b on line b5/bbr

My environment: W2k SP2, Apache 1.3.20, PHP 4.0.6, Ingres II 2.5

I hope there's anyone can help me.

thanks
Frank Pietsch



-- 
PHP Database 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] RE: PHP Mysql apache economy hosting

2001-07-13 Thread Andrew Chase

I used Cedant.com to host my own site for a few months, and they were
excellent - no down time that I was aware of, and a handy web-based control
panel (and of course SSH shell access for anything not covered by the
control panel.)  Although they didn't have a large tech support phone bank
(Usually I'd leave a voice mail and get a call or e-mail back within a
couple of hours), their support was intelligent and very responsive.  I
think it was about $12.95/month for the plan I used, which included
PHP/MySQL on RedHat Linux 7.0 and plenty of traffic for my small needs.

-Andy

P.S.  I don't work for Cedant or anything, and the only reason I stopped
using them was that I got my own Linux/PHP/MySQL server going on an old
Pentium 200 at home - no 100% uptime guarantees, but I don't really get any
traffic to speak of so it's not a huge concern. ;-)

 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]

 Hello,
 can anyone recommend a good
 PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.?


-- 
PHP Database 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] Selecting userID

2001-07-13 Thread Brad R. C.

I have attached what I have so far. This version uses a table called
picture_upload and the field name is picture_name.. also in my user
table I have the same field name, but that is from past trying to get it to
work... crap

I got it to upload to the table just fine and copy the file from a temp
source to the image directory I have chosen. So it works... but! it will not
insert into the right userid field, so I took it out and just made it where
they can copy and paste the url into the old way.. defeats the purpose of
uploading but atleast it gives them a place to put their files if they don't
have one :)

Can you take a look at my code below, and tell me how we can make it Select
a userid from the person who is logged in so that that the url can be posted
in the right field. I will try to play with it a little more today, but I
have sun poisoning and I am itching and burning all over... what a pain.

This is for use with vb bulletin board software.. there is a user table with
userid for the id number of the user.. and I am sure I will have to include
the global.php file to find the bbuserinfo that is logged in.



 start code ---
TABLE cellSpacing=0 width=100% align=center border=0
bordercolordark=#00 cellpadding=0
TBODYtrTD bgColor=#00
  TABLE align=center bgColor=#FF border=1 cellPadding=0
cellSpacing=0
  width=100% bordercolor=#FF bordercolorlight=#FF
bordercolordark=#FF
TBODY
TR vAlign=top
  TD vAlign=top align=middle
TABLE borderColor=#00 cellSpacing=0 borderColorDark=#ff
cellPadding=5 width=100% bgColor=#ff
borderColorLight=#00
border=1 height=188

/TABLE
table border=1 width=100% cellspacing=0 cellpadding=0
height=17 bordercolorlight=#00 bordercolor=#00
bordercolordark=#3366CC bgcolor=#3366CC
  tr
TD bgcolor=#3366cc bordercolor=#3366cc
bordercolorlight=#3366CC height=17bfont color=#FF
face=Verdana size=1nbsp;Photo
  Upload Information/font/b
/TD
  /tr
/table
TABLE borderColor=#00 cellSpacing=0 borderColorDark=#ff
cellPadding=5 width=100% bgColor=#ff
borderColorLight=#00
border=1

  tr
td
table class=reg cellSpacing=0
cellPadding=0 width=100% border=0
  tr vAlign=top
font face=Verdana, Arial, Helvetica,
sans-serif size=2
td
  /font
font face=Verdana size=1bVERY, VERY
IMPORTANT - PLEASE READ!br
/b/fontfont face=Verdana size=1If
you
have quot;Turned Onquot; the picture
activation to show your photo, be reminded
that
it is shown to all members and guests that
come
to this site to look around and vote. If
there
is any information that you have given upon
your
part to this site that you don't want others
to
know about, please go into your user control
panel and change it. If you have any
problems
with users and/or guests of this site
because of
your photo or your actions, please notify
one of
the Administrators or Moderators. Also
please
try to limit photos to no more than 500
pixels
in width, and 75kb in size. Reason being is
that
you will probably get a better rating if it
does
not take forever for your picture to
download,
and you also don't want your face to take up
the
whole screen./font
/td
/tr
/table
  /td
  /tr
/TABLE!-- NEXT ---!-- NEXT ---
table border=1 width=100% cellspacing=0 cellpadding=0
height=18 bordercolorlight=#00 bordercolor=#00
bgcolor=#3366CC bordercolordark=#3366CC
  tr
  TD width=357 bgColor=#3366CC height=18 bordercolor=#3366CC
bordercolorlight=#3366CC bordercolordark=#3366CCfont face=Verdana
size=1nbsp;/fontbfont color=#FF face=Verdana
size=1Upload
Form/font/b/TD
  /tr
/table
TABLE borderColor=#00 cellSpacing=0 borderColorDark=#ff
cellPadding=5 width=100% bgColor=#ff
borderColorLight=#00
border=1

  tr
TD
 

RE: [PHP-DB] data consistency

2001-07-13 Thread Robert Klinkenberg

MySQL supports transactions so you can submit multiple SQL statements
and commit them all at once.

example of statement (from www.mysql.com)

BEGIN; 
SELECT @A:=SUM(salary) FROM table1 WHERE type=1; 
UPDATE table2 SET summmary=@A WHERE type=1; 
COMMIT; 

Robert Klinkenberg



 -Oorspronkelijk bericht-
 Van:  andRie Is [SMTP:[EMAIL PROTECTED]]
 Verzonden:Friday, July 13, 2001 2:19 AM
 Aan:  [EMAIL PROTECTED]
 Onderwerp:[PHP-DB] data consistency
 
 Hello php-db,
 
   is PHP / Mysql could handle multiple access into table to keep data
   consistency ?
   
 
  ,,,   
 (@-@)   
 +==---o00(_)00o-==+
 
 It is better to be defeated on principle than to win on lies.
 --Arthur Calwell
 -- 
 Best regards,
  andRie 
 
 
 -- 
 PHP Database 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 Database 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-DB] PHP Mysql apache economy hosting

2001-07-13 Thread John Starkey

Well that's mighty tacky of you.

On Fri, 13 Jul 2001, [EMAIL PROTECTED] wrote:


 I recommend MissoulaWeb for $10/month.

   http://www.missoulaweb.com/testimonials.phtml
   http://www.missoulaweb.com/allfeatures.phtml
   http://www.missoulaweb.com/compare.phtml   (a chart)

 As for verifying uptime, try using the tool at
 http://uptime.netcraft.com/up/graph/




-- 
PHP Database 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-DB] Selecting userID

2001-07-13 Thread Matthew Loff


Brad--

I see what you're trying to do.  Here's how this issue with a site I
did, perhaps this will help:

Eliminate the database of images all together.  Create an image that
says No Picture Available, and save it as /images/no_photo.jpg.
When (if) a user uploads a file, have it rename the file as
/home/addicted/public_html/board/ranking/images/$user_id.jpg.  Then,
place a call in your php page to:

IMG SRC=image.php?$user_id  


And in the image.php file, have it check to see if the image actually
exists:  (this is assuming $user_id is an integer)

?php

header(Content-Type: image/jpeg);

if(is_file(/home/addicted/public_html/board/ranking/images/ .
(int)$HTTP_POST_VARS[QUERY_STRING] . .jpg))
header(Location: /images/ .
(int)$HTTP_POST_VARS[QUERY_STRING] . .jpg);
else
header(Location: /images/no_photo.jpg);

?

Good luck!


-Original Message-
From: Brad R. C. [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 13, 2001 12:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Selecting userID


I have attached what I have so far. This version uses a table called
picture_upload and the field name is picture_name.. also in my user
table I have the same field name, but that is from past trying to get it
to work... crap

I got it to upload to the table just fine and copy the file from a temp
source to the image directory I have chosen. So it works... but! it will
not insert into the right userid field, so I took it out and just made
it where they can copy and paste the url into the old way.. defeats the
purpose of uploading but atleast it gives them a place to put their
files if they don't have one :)

Can you take a look at my code below, and tell me how we can make it
Select a userid from the person who is logged in so that that the url
can be posted in the right field. I will try to play with it a little
more today, but I have sun poisoning and I am itching and burning all
over... what a pain.

This is for use with vb bulletin board software.. there is a user table
with userid for the id number of the user.. and I am sure I will have to
include the global.php file to find the bbuserinfo that is logged in.



 start code ---
TABLE cellSpacing=0 width=100% align=center border=0
bordercolordark=#00 cellpadding=0 TBODYtrTD
bgColor=#00
  TABLE align=center bgColor=#FF border=1 cellPadding=0
cellSpacing=0
  width=100% bordercolor=#FF bordercolorlight=#FF
bordercolordark=#FF
TBODY
TR vAlign=top
  TD vAlign=top align=middle
TABLE borderColor=#00 cellSpacing=0
borderColorDark=#ff
cellPadding=5 width=100% bgColor=#ff
borderColorLight=#00
border=1 height=188

/TABLE
table border=1 width=100% cellspacing=0
cellpadding=0 height=17 bordercolorlight=#00
bordercolor=#00 bordercolordark=#3366CC bgcolor=#3366CC
  tr
TD bgcolor=#3366cc bordercolor=#3366cc
bordercolorlight=#3366CC height=17bfont color=#FF
face=Verdana size=1nbsp;Photo
  Upload Information/font/b
/TD
  /tr
/table
TABLE borderColor=#00 cellSpacing=0
borderColorDark=#ff
cellPadding=5 width=100% bgColor=#ff
borderColorLight=#00
border=1

  tr
td
table class=reg cellSpacing=0
cellPadding=0 width=100% border=0
  tr vAlign=top
font face=Verdana, Arial, Helvetica,
sans-serif size=2
td
  /font
font face=Verdana size=1bVERY,
VERY IMPORTANT - PLEASE READ!br
/b/fontfont face=Verdana
size=1If you
have quot;Turned Onquot; the picture
activation to show your photo, be
reminded that
it is shown to all members and guests
that come
to this site to look around and vote. If
there
is any information that you have given
upon your
part to this site that you don't want
others to
know about, please go into your user
control
panel and change it. If you have any
problems
with users and/or guests of this site
because of
your photo or your actions, please
notify one of
the Administrators or Moderators. Also
please
try to limit photos to no more than 500
pixels
in width, and 75kb in size. Reason being
is that
you will probably get a better rating if
it does
not take forever 

[PHP-DB] Re: upload problem ...

2001-07-13 Thread Jonathan Hilgeman


File 1 (whateverform.php):

FORM ENCTYPE=multipart/form-data ACTION=fileupload-destination.php
METHOD=POST
INPUT TYPE='File' NAME='alfredoUpload'
/FORM



File 2 (fileupload-destination.php):

if (is_uploaded_file($alfredoUpload))
{
// Uncomment the following line ONLY if you're on Red Hat 7.0
// $Fix_RH7_Upload = fix_php_rh7_upload_bug($alfredoUpload);
// Move to directory
$filename = basename ($alfredoUpload_name);
move_uploaded_file($alfredoUpload, /home/mydirectory/uploadfolder/ .
$filename);
}
// #
// Fix PHP Upload Bug on Red Hat 7.0
// #
function fix_php_rh7_upload_bug($tmp)
{
$infile=fopen($tmp,r); // Open the file for the copy
$outfile=fopen($tmp.new,w); // create a new temp file
$header=fgets($infile,255); //get the 1st line (netscape sometimes doesn't
add a Content-type line)
//if its more than just a \r\n sequence then
if (strlen($header)2) $header=fgets($infile,255); //get next line also
while(!feof($infile))
{ // Loop through the remaining file
$temp=fread($infile,128);
fwrite($outfile,$temp,strlen($temp)); //copying contents to new temp file
}
fclose($outfile);
fclose($infile);
copy($tmp.new,$tmp); //replace the original with our new bug fixed file
unlink($tmp.new); //and delete the new file
return filesize($tmp); //return a true file size
}


You can post the upload to the same file if you want (so File 1 AND File 2
are whateverform.php). I just split them up for this example. I don't take
credit for the fix_php_rh7_upload_bug function. That was posted by someone
else on the PHP documentation.

- Jonathan


-Original Message-
From: comp.mail.sendmail [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 10:28 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] upload problem ...

Could anyone send me the actual code for doing the files upload to
a linux box with php. I know the form for the upload but not the php file
that
does the upload .
Thanks everyone.



-- 
PHP Database 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] PHP calling Javascript

2001-07-13 Thread Kevin Johnson



Hi.

I was wondering how to call a javascript function within PHP?
Any ideas of solutions.

Thanks in advance.

Kevin Johnson
Jr. System Administrator
Erogo, Inc.
www.erogo.com

Contact Info:
Email: [EMAIL PROTECTED]
Office: (714) 832- x150
Cell: (714) 454-6763


-- 
PHP Database 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] CGI or API installation?

2001-07-13 Thread Ken Sommers

Hello,
How to tell if php4 is installed as a CGI or API module) installation?
will phpinfo() tell me?
thanks ,
Ken


-- 
PHP Database 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-DB] RE: PHP Mysql apache economy hosting

2001-07-13 Thread Indri

Try http://www.aletiahosting.com/. I have my sites hosted by them.

Excellent support especially the ones via AIM/ICQ. The people are always
around to answer your questions.

Plans start at $9.95/month.

Hope this helps.

Best wishes,
Indri

 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 
 Hello,
 can anyone recommend a good
 PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.?


-- 
PHP Database 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-DB] display errors

2001-07-13 Thread Matthew Loff


I'm assuiming this means you're pulling the name from the DB and putting
it as the value of a text input, as in:

INPUT TYPE=TEXT NAME=name VALUE=$name

The quotes should fix that problem.  


-Original Message-
From: Christopher Hebert [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 12, 2001 4:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] display errors


i am using php3 and mysql to develop a scheuler app. i have a column
name name (varchar 40)

i am pulling the value into a text field with a name=name and value
=$name on a php page.

the problem is for ie.

name=chris hebert

i get chris in my text field.

it stops displying the data at the space.

thoughts.

CSHebert







-- 
PHP Database 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 Database 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]




Odp: [PHP-DB] Interbase/PHP/Apache implimentation

2001-07-13 Thread Jarek Zgoda

Od: "Jordan" [EMAIL PROTECTED]
Temat: [PHP-DB] Interbase/PHP/Apache implimentation


 So my question is this:  Can DBMS support be enabled using the
extension=php_interbase.dll directive
 in the php.ini file (as opposed to MySQL, where support is built in) ONLY
while in CGI mode?  Will
 the distribution version of php4apache.dll not look at the php.ini file,
to enable Interbase
 support?

 If that is the case, is there anywhere one might find a version of the
php4apache.dll file which
 enables Interbase support?
 I will use CGI if I must, but my preference is to use the Apache
Module

I have 2 installations: on NT4 at work and W98 at home, both working as a
module. Except of OS the configuration is same: Apache 1.3.19, PHP 4.0.5,
Borland's IB 6.0.1. If you are interested, i can send you my php.ini files
privately, although this one from my work in tuesday.

Cheers
Jarek Zgoda


-- 
PHP Database 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]