RE: [PHP] Multiple languages

2001-07-15 Thread Maxim Maletsky


The best way to do it definitely is:

make several files with an array like:

file: lang.eng.inc:

$dict = Array();
$dict['name'] = 'Name';
$dict['button']['red'] = 'Red Button';


file: lang.ita.inc:

$dict = Array();
$dict['name'] = 'il nome';
$dict['button']['red'] = 'il bottone rosso';


file: lang.spa.inc:

$dict = Array();
$dict['name'] = 'nombre';
$dict['button']['red'] = 'er botone roso';


file: lang.rus.inc:

$dict = Array();
$dict['name'] = 'Imya';
$dict['button']['red'] = 'Krassnaya knopka';


file: lang.jap.inc:

$dict = Array();
$dict['name'] = 'Onamae';
$dict['button']['red'] = 'Aka no battonu';



and so on... and so on...



then, in your scripts before any output (no, not a rule, just otherwise
makes few sense)...

1. ... include a config file where the language is set.
oh well, you can use any way you wish, cookies, sessions, get variables,
whatever, as long as you can set a language of preference to the script.

2. include lang.$lang.inc;

3. In case you need something within a function or class just define
variable $dict as global.


Hare we go.
This is the less resource consuming way, all you need is to set the language
prefence correctly and work on keeping track of it.


any code?
Hmm, you could try to look into applications like phpmyadmin or Jinnie...
but the difference here is, most of these doing a little mistake - they
create a bunch of new variables for every phrase. Better do it with an
array.




Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com









-Original Message-
From: Inércia Sensorial [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Multiple languages


  Hi All,

  I want to enable multiple languages on one of my scripts, so
administrators or visitors can choose in what language they want to browse
the site. I have seen a few ways to do it, like with switch, define or
querying databases.

  But, considering performance, what is the best way to make a script with
multiple languages?

  Thanks for any ideas.


--

  Julio Nobrega.

You're asking me will my love grow, I don't know.



--
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] Session Question

2001-07-15 Thread Tom Malone

I'm new to Apache (and PHP) and was unable to find anything approaching an
answer to this problem in the Apache documentation. In fact, I'm not even
sure if I'm having a problem with Apache or with PHP. I am trying to use
sessions to track users on my site and write information to a file. I'm not
requiring them to login or anything - all I really want to know is which
users are visiting different pages on my site so I can judge the
effectiveness of my design. Anyway the problem is - I'm using the following
script:

?
session_start();
session_register(origin);
session_register(ip_address);
session_register(browser);
session_register($id);
$id = session_id();
$origin = $HTTP_REFERER;
$ip_address = $REMOTE_ADDR;
$browser = $HTTP_USER_AGENT;
$sessn_root = /***/sessn-log; //substituted asteriks for actual path here
if(!file_exists($sessn_root/$id.txt)):
$sessn_data = $id\n $ip_address\n $browser\n $origin\n;
else:
$sessn_data = $origin\n;
endif;
$fp = fopen($sessn_root/$id.txt, a);
fputs($fp, $sessn_data);
fclose($fp);
$includes = ***/includes; //substituted asteriks for actual path here
$page = $includes/index.inc;
include($includes/template.html.php);
?

and i get the following error:

Warning:
fopen(/home/tgmalone/sessn-log/0bbaf33ab1c1f9d714e2244459979ec7.txt,a) -
Permission denied in /home/tgmalone/public_html/index.php on line 17

The problem is obvious, but I've been searching, searching and wracking my
inadequate brain for a solution and can't find one - can anyone help me find
a solution/workaround?

Thanks,
Tom Malone


-- 
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] output plain HTML for CD Rom

2001-07-15 Thread Justin French

Hi,

I have a client who wishes to publish some catalogues to CD Rom.  Of
course they can't be placed onto a CD using PHP code (because it would
require the CD user to have PHP installed!!), but PHP/MySQL is
definately the best way to build the content, since the same data is
being used for online content as well.

So I guess my question is, what;s the best way to creat a static site
from dynamic content.  If it was a small site, i'd just access every
page, view the source, copy it, and save to file, but the catalogues may
get up over 1000 pages!!

It also occurs to me that this would be helpfull in building dynamic
sites monthly, but publishing a static site to the web, which would have
better luck with search engines, and maybe even with server load / caching.


I could make a script which builds / wrote HTML files to disc, no
problem, but if the pages already exist dynamically, I thought there
might be a way to write the HTML source (same as sent to the browser) to
a HTML file


Thanks

Justin French

-- 
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 Digest 15 Jul 2001 07:38:53 -0000 Issue 756

2001-07-15 Thread php-general-digest-help


php-general Digest 15 Jul 2001 07:38:53 - Issue 756

Topics (messages 57901 through 57922):

Loop an INSERT 10 rows from a Form
57901 by: David

Select IN array?
57902 by: Chris Lott
57904 by: Chris Lott
57918 by: James Tan

Problem with FORM, SELECT and SUBMIT - select value never shows up
57903 by: Warrick Wilson \(Avignon Reg'd Kennels\)

phpLinks
57905 by: Greg Donald

Re: Variable name declarations?
57906 by: Kent Sandvik

Re: postgres and php
57907 by: Nuno Silva

Re: Best Choice
57908 by: Evan Nemerson

Re: Alternative to phpMyAdmin
57909 by: Evan Nemerson
57913 by: Matthew Loff

cURL to secure page...
57910 by: Glenn Shope

RPM Install #6 still doesn't work
57911 by: Gaylen Fraley

Re: Australian Developers -- Contract/Partnership Oppourtunity
57912 by: Justin French

ereg() help, plz
57914 by: McShen

Exec, system, passthru didn't work
57915 by: Reuben D Budiardja

Multiple languages
57916 by: Inércia Sensorial
57920 by: Maxim Maletsky

Re: OOP Problems
57917 by: James Tan

Anybody using Miva or hosted at Hosting4All?
57919 by: Daniel Baldoni

Session Question
57921 by: Tom Malone

output plain HTML for CD Rom
57922 by: Justin French

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



The form is no problem but how do INSERT 10 ROWS with one insert
statement. I figure some kind of loop like I did with the form.

When form is submitted:
$query = INSERT INTO songs VALUES ('$id',
'$songname','$rating','$video', '$album_id', '$movie');
   $result = mysql_db_query(movies, $query);

if ($result) {
// worked



This is the form:
form enctype=multipart/form-data method=post
action=?php echo $PHP_SELF ?
?
$i = 1;
  while ($i = $songsinalbum) {
?

TR
TD align=rightID:   /TDTDinput type=text name=id value=? echo
$i; ? size=3br/TD
TD align=rightSongname:  /TDTDinput type=text name='songname'
size=30br/TD
TD align=rightRating:   /TDTDinput type=text name='rating'
value='***' size=5 maxsize=5br/TD
TD align=rightVideo ID:   /TDTDinput type=text name='video'
size=2 maxsize=3br/TD
TD align=rightAlbum ID:   /TDTDinput type=text name='album_id'
value=? echo $id; ? size=2 maxsize=3br/TD
TD align=rightMovie ID:   /TDTDinput type=text name='movie'
size=2 maxsize=3br/TD/TR

?
$i++;
};

?
input type=submit name=submit value=Upload
/form
/TABLE





I have an array of id numbers ($catids). I would like to select from the
mysql database all records where cid is in that array.

This syntax fails:
select * from categories
where cid in $catids

What is the correct way to do this? It can be done outside of a loop, can't
it?

c




 I have an array of id numbers ($catids). 

 This syntax fails:
 select * from categories
 where cid in $catids

Never mind. I was being stupid. For the record, one needs to implode(,,
$catids) and then use that in the WHERE statement, i.e. where cid in
($catids)

c




dear chris,

mysql does not support 'in' clause at the momment...
the only way to this is to use the loop to generate the sql syntax..
orr.. use the implode function... to join the array into 1 string separated by
the first parameter...

$catsql = implode(or cid=, $catids);
$catsql  = ((strlen(catsql)0)? substr(catsql, 3, strlen(catsql)): );

$catsql = select * from categories where  . $catsql;

Chris Lott wrote:

 I have an array of id numbers ($catids). I would like to select from the
 mysql database all records where cid is in that array.

 This syntax fails:
 select * from categories
 where cid in $catids

 What is the correct way to do this? It can be done outside of a loop, can't
 it?

 c





I'm a new PHP/mySQL user (all of about 10 hours so far, working thru some
web-based tutorial stuff and using resources on the Internet). I have the
following problem:

You can try the code out at
http://www.bond.net/~warrickw/zone6jrs/testsel.php

I want to have a form that lists values in a SELECT menu. Eventually I
will go back to populating the form from a database. I've been working
backwards and I am down to basic HTML and a little bit of PHP to look at the
submitted values.

The problem is my page NEVER, NOT EVER recognizes the value for the
myhandlerlist SELECT menu. If I submit by GET, it shows up in the URL
address, but isn't recognized. I added a second SELECT, and THAT got
recognized, and it recognizes my INPUT elements, but no way can I get a
value for the myhandlerlist.

I did some searching thru the archives and generally on the Internet, and
found lots of people posting similar sorts of problems, but the proposed
solutions I saw all dealt with building the lists dynamically.  

[PHP] phpMyAdmin No Error No Output

2001-07-15 Thread Prachait Saxena

HI,

I had downloaded a new version 2.2 of phpMyAdmin from the site. and placed
it on my site on the Internet.

but i am getting no error and no output 

can any one tell me why this is happning .???
bye

--





Prachait Saxena
Offical ( [EMAIL PROTECTED] )
Personal ( [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] access pop3 without IMAP

2001-07-15 Thread Prachait Saxena

Hi,

I want to check mail of a pop account. without using imap.

Can any one know how to do that.

kindly send it in details.
bye

--

Prachait Saxena
Offical ( [EMAIL PROTECTED] )
Personal ( [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] Session Question

2001-07-15 Thread Christopher Ostmo

Tom Malone pressed the little lettered thingies in this order...

 I'm new to Apache (and PHP) and was unable to find anything approaching an
 answer to this problem in the Apache documentation. In fact, I'm not even
 sure if I'm having a problem with Apache or with PHP. I am trying to use
 sessions to track users on my site and write information to a file. I'm not
 requiring them to login or anything - all I really want to know is which
 users are visiting different pages on my site so I can judge the
 effectiveness of my design. Anyway the problem is - I'm using the following
 script:
 
 ?
 session_start();
 session_register(origin);
 session_register(ip_address);
 session_register(browser);
 session_register($id);
 $id = session_id();
 $origin = $HTTP_REFERER;
 $ip_address = $REMOTE_ADDR;
 $browser = $HTTP_USER_AGENT;
 $sessn_root = /***/sessn-log; //substituted asteriks for actual path here
 if(!file_exists($sessn_root/$id.txt)):
  $sessn_data = $id\n $ip_address\n $browser\n $origin\n;
 else:
  $sessn_data = $origin\n;
 endif;
 $fp = fopen($sessn_root/$id.txt, a);
 fputs($fp, $sessn_data);
 fclose($fp);
 $includes = ***/includes; //substituted asteriks for actual path here
 $page = $includes/index.inc; include($includes/template.html.php); ?
 
 and i get the following error:
 
 Warning:
 fopen(/home/tgmalone/sessn-log/0bbaf33ab1c1f9d714e2244459979ec7.txt,a)
 - Permission denied in /home/tgmalone/public_html/index.php on line 17
 
 The problem is obvious, but I've been searching, searching and wracking my
 inadequate brain for a solution and can't find one - can anyone help me
 find a solution/workaround?
 

The output file (or directory in this case) need to be writable by the web 
server.

This sort of operation is rather insecure, but if you must log to a text file, 
either make the output directory owned by the web server process 
(usually nobody) or make the output directory world writable.

If you have root access and your httpd process is owned by nobody 
you can issue the following command from a prompt:
chown -R nobody /home/tgmalone/sessn-log

You must have root access to use chown.  If you do not have root 
access, you'll need to use chmod to make the directory world writable:
chmod -R 777 /home/tgmalone/sessn-log

Neither of these solutions is very secure.  If you have the option, you 
should log these entries into a database.

Good luck...

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)

Business Applications:
http://www.AppIdeas.com/

Open Source Applications:
http://open.AppIdeas.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]




Re: [PHP] Anybody using Miva or hosted at Hosting4All?

2001-07-15 Thread Greg Donald

 Is anybody on this list hosting an e-commerce site with Hosting4All?
 Or, has anybody had any experience with the Miva Engine which
 Hosting4All provide free of charge (i.e. as part of the
 subscription fee)?


I used Miva before.  It was slower than java...  It sucked. 


destiney - (des-ti-ny) - n. 1. deity of all things html, 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...

It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://destiney.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] Re: mysql error

2001-07-15 Thread Leon

Maybe you run out of diskspace??

Greets, Leon

Elias wrote:

 Table is full?

 did you try searching MySql.com for Table is full error message?

 Andreas ) [EMAIL PROTECTED] wrote in message
 000c01c10b81$c765aa60$8d0a@devel01">news:000c01c10b81$c765aa60$8d0a@devel01...
 hi all,

 my script was now working for month but now
 suddenly get this error:

 The table 'SQL90cb_0' is full

 SELECT DISTINCT t1.id,t1.textd FROM tblEntry AS t1,tblTopic AS t2 ORDER BY
 t2.named,t1.textd
 anyone know whats the problem ?

 thank you

 andreas


-- 
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] www.oosha.com/phpdev/ - mailing list

2001-07-15 Thread Brett Shaw

Oosha.com's PhpDEV has got a mailing list if you would like to joing please
see below: -

To subscribe to the mailinglist, simply send a message with the word
'subscribe' in the Subject: field to the -request address of that list

To: [EMAIL PROTECTED]
Subject: subscribe

To subscribe to the digest, simply send a message with the word 'subscribe'
in the Subject: field to the following address.
To: [EMAIL PROTECTED]
Subject: subscribe

To send email to the mailinglist, write to the following address:
To: [EMAIL PROTECTED]

To unsubscribe from the mailinglist, simply send a message with the word
'unsubscribe' in the Subject: field to the -request address of that list
To: [EMAIL PROTECTED]
Subject: unsubscribe

To unsubscribe from the digest, write a email like this:
To: [EMAIL PROTECTED]
Subject: unsubscribe


[EMAIL PROTECTED]
[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] Anybody using Miva or hosted at Hosting4All?

2001-07-15 Thread hunter

what do you need to know about Miva? Its got a GUI front end to allow
you to construct your store, it has support for many ecoms (like
authorizenet, etc), decent scripting language through mivascript, etc.
--
Daniel Baldoni wrote:
 
 G'day folks,
 
 We've got a web-application ready to install and everything looks okay except
 that the client has chosen Hosting4all as their web-hoster.  They
 (Hosting4all) don't have a version of PHP linked with cURL and we need to
 process credit card information.  Again, the client has chosen a payment
 processor and, as expected, secure-HTTP is required.
 
 All fair enough - the payment script has been written and works on our
 servers.  Of course, it'll fail dismally on Hosting4All's servers.
 
 My question is...
 
 Is anybody on this list hosting an e-commerce site with Hosting4All?
 Or, has anybody had any experience with the Miva Engine which
 Hosting4All provide free of charge (i.e. as part of the
 subscription fee)?
 
 Any help would be much appreciated.  Thanks in advance.
 
 Ciao.
 
 --
 ---+-
 Daniel Baldoni BAppSc, PGradDipCompSci |  Technical Director
 require 'std/disclaimer.pl'|  LcdS Pty. Ltd.
 ---+  856B Canning Hwy
 Phone/FAX:  +61-8-9364-8171|  Applecross
 Mobile: 041-888-9794   |  WA 6153
 URL:http://www.lcds.com.au/|  Australia
 ---+-
 Any time there's something so ridiculous that no rational systems programmer
  would even consider trying it, they send for me.; paraphrased from King Of
  The Murgos by David Eddings.  (I'm not good, just crazy)
 
 --
 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]

-- 
Michael B. Weiner, Linux+, Linux+ SME
Systems Administrator/Partner
The UserFriendly Network (UFN)
--
Linux Registered User #94900Have you been counted?
http://counter.li.org

PGP: 30 1D CC BA 30 30 63 35  CD 58 E0 89 A9 17 CC C0  8C 55 F7 72

.Escape the 'Gates' of Hell
  `:::'  ...  ..
   :::  *  `::.::'
   ::: .::  .:.::.  .:: .::  `::. :'
   :::  ::   ::  ::  ::  :::::.
   ::: .::. .::  ::.  `. .:'  ::.
...:::.::'   ...
--
 S/MIME Cryptographic Signature


[PHP] does php have a response.flush function

2001-07-15 Thread Andrew Austin

Does php have a funciton like reponse.flush in asp

aa

-- 
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] Message from hunter Problems

2001-07-15 Thread ReDucTor

hey,
 That message sent here, by hunter the Re: [PHP] Anybody using Miva or hosted at 
..., i open it in outlook, and my outlook frezzes...any one know why? :)
 - James ReDucTor Mitchell



Re: [PHP] does php have a response.flush function

2001-07-15 Thread Philip Murray

Hi  Andrew,

It's flush();

http://nz.php.net/manual/en/function.flush.php

Cheers
 -  -- -  -   -
Philip Murray - [EMAIL PROTECTED] 
http://www.open2view.com - Open2View.com
- -  -- -   -

- Original Message - 
From: Andrew Austin [EMAIL PROTECTED]
To: Php Lists (E-mail) [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 12:40 AM
Subject: [PHP] does php have a response.flush function


 Does php have a funciton like reponse.flush in asp
 
 aa
 
 -- 
 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] Message from hunter Problems

2001-07-15 Thread hunter

yes it was signedand outlook doesnt handle that well

ReDucTor wrote:
 
 hey,
  That message sent here, by hunter the Re: [PHP] Anybody using Miva or hosted at 
..., i open it in outlook, and my outlook frezzes...any one know why? :)
  - James ReDucTor Mitchell

-- 
Michael B. Weiner, Linux+, Linux+ SME
Systems Administrator/Partner
The UserFriendly Network (UFN)
--
Linux Registered User #94900Have you been counted?
http://counter.li.org

PGP: 30 1D CC BA 30 30 63 35  CD 58 E0 89 A9 17 CC C0  8C 55 F7 72

.Escape the 'Gates' of Hell
  `:::'  ...  ..
   :::  *  `::.::'
   ::: .::  .:.::.  .:: .::  `::. :'
   :::  ::   ::  ::  ::  :::::.
   ::: .::. .::  ::.  `. .:'  ::.
...:::.::'   ...
--

-- 
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 Inserting Array of Rows from form

2001-07-15 Thread David

I am trying to insert an array of rows or values from a PHP form into a
MySQL database. There are six columns in the table songs: id, songname,
rating, video, album_id, movie.

Here is what I get when I submit the form
Add songs for Record Array
INSERT INTO songs VALUES (' 1, blah', ' ***', ' 45', ' 2', ' ')
id[0]=: 2 this is debug code
INSERT Failed, check the code.this is debug code

The problem seems to be with this part:

for ($i=0; $i= $songsinalbum; $i++) {
  $vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
'$album_id[$i]',
'$movie[$i]');
}

// $vals=preg_replace(^,, , $vals);
$vals=preg_replace('/^,/', '', $vals); // chop leading comma


Complete code:
When the user presses submit on the form this part executes:

  mysql_connect(192.168.0.1, mysqluser, mypassword);

$vals=' ';
for ($i=0; $i= $songsinalbum; $i++) {
  $vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
'$album_id[$i]',
'$movie[$i]');
}

// $vals=preg_replace(^,, , $vals);
$vals=preg_replace('/^,/', '', $vals); // chop leading comma

$qry=INSERT INTO songs VALUES $vals;

echo $qry;

$res=mysql_query($qry);


Here is part of the form:

?
$i = 1;
 while ($i = $songsinalbum) {
?

TD align=rightID:   /TDTDinput type=text name=id[]
size=3br/TD

TD align=rightSongname:  /TDTDinput type=text name=songname[]
size=30br/TD
?
$i++;
};




-- 
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: Anybody using Miva or hosted at Hosting4All?

2001-07-15 Thread Daniel Baldoni

G'day again,

hunter said:
 what do you mean, arbitrary? Yes, miva can connect to SSL pages and
 sites, thats how its transactional piece works, and is actually
 required. In fact as i recall, you have to have an SSL certificate in
 order to complete the install/configuration/setup for a virtual(ly)
 hosted site.

Sorry, I should've been clearer.

The client's site has been developed using typical PHP (only requiring GD,
MySQL and cURL).  But, the hosting company chosen by the client doesn't
include cURL support.

The only page in the site that establishes an outgoing link is the payment
page - which needs to create a single secure HTTP link to one of the payment
gateway's servers.

So, I guess my question is, how can I replicate the functionality of...

$link = curl_init (https://gateway-srvr/);
curl_setopt ($link, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($link, CURLOPT_POST, 1);
curl_setopt ($link, CURLOPT_POSTFIELDS, );
curl_setopt ($link, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec ($link);
curl_close ($link);

As you can probably guessed, I've never done any work with Miva before.  Any
help would be much appreciated.

Ciao.

-- 
---+-
Daniel Baldoni BAppSc, PGradDipCompSci |  Technical Director
require 'std/disclaimer.pl'|  LcdS Pty. Ltd.
---+  856B Canning Hwy
Phone/FAX:  +61-8-9364-8171|  Applecross
Mobile: 041-888-9794   |  WA 6153
URL:http://www.lcds.com.au/|  Australia
---+-
Any time there's something so ridiculous that no rational systems programmer
 would even consider trying it, they send for me.; paraphrased from King Of
 The Murgos by David Eddings.  (I'm not good, just crazy)

-- 
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 Inserting Array of Rows from form

2001-07-15 Thread Hank Marquardt

For one, as you've written it you have a mismatch of columns vs. fields --

You're combining id and name into one field for the insert -- thus you have
five fields trying to be inserted into a table with six elemets.

You should have a print of the mysql_error() in your debug code ... I bet if
you did that's what it would tell you:)

On Sun, Jul 15, 2001 at 07:17:00AM -0600, David wrote:
 I am trying to insert an array of rows or values from a PHP form into a
 MySQL database. There are six columns in the table songs: id, songname,
 rating, video, album_id, movie.
 
 Here is what I get when I submit the form
 Add songs for Record Array
 INSERT INTO songs VALUES (' 1, blah', ' ***', ' 45', ' 2', ' ')
 id[0]=: 2 this is debug code
 INSERT Failed, check the code.this is debug code
 
 The problem seems to be with this part:
 
 for ($i=0; $i= $songsinalbum; $i++) {
   $vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
 '$album_id[$i]',
 '$movie[$i]');
 }
 
 // $vals=preg_replace(^,, , $vals);
 $vals=preg_replace('/^,/', '', $vals); // chop leading comma
 
 
 Complete code:
 When the user presses submit on the form this part executes:
 
   mysql_connect(192.168.0.1, mysqluser, mypassword);
 
 $vals=' ';
 for ($i=0; $i= $songsinalbum; $i++) {
   $vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
 '$album_id[$i]',
 '$movie[$i]');
 }
 
 // $vals=preg_replace(^,, , $vals);
 $vals=preg_replace('/^,/', '', $vals); // chop leading comma
 
 $qry=INSERT INTO songs VALUES $vals;
 
 echo $qry;
 
 $res=mysql_query($qry);
 
 
 Here is part of the form:
 
 ?
 $i = 1;
  while ($i = $songsinalbum) {
 ?
 
 TD align=rightID:   /TDTDinput type=text name=id[]
 size=3br/TD
 
 TD align=rightSongname:  /TDTDinput type=text name=songname[]
 size=30br/TD
 ?
 $i++;
 };
 
 
 
 
 -- 
 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]

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net

Web  Database Development in PHP, MySQL/PostgreSQL
Small Office Networking Solutions - Debian GNU/Linux  FreeBSD
PHP Instructor - HTML Writers Guild http://www.hwg.org
*** PHP II The Cool Stuff starts July 16, 2001
*** http://www.hwg.org/services/classes/p181.1.html


-- 
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] ereg() help, plz

2001-07-15 Thread Thomas R. Powell

Try this,

while ($file_name = readdir($dir2)) {

if ($file_name!=.  $file_name!=..  $file_name!=head.jpg  
!ereg(^tn_,$file_name)) {
$files[]=$file_name; 
}
}
$numfiles = count($files);
for ($i=$g; $i$numfiles; $i++){ 
echo $files[$i]; 
}

Tom

At 09:45 PM 7/14/01 -0400, you wrote:
hi,

I wanna print out all files in a directory. But i wanna exclude ., ..,
head.jpg, and all files that start with tn_

Here is my script, but it didn't work. Please help me to solve this problem.
Thank You.

-my script-
while ($file_name = readdir($dir2))

if (($file_name!=.  $file_name!=..  $file_name!=head.jpg 
$file_name!=ereg(^tn_,$file_name) ))

$files[]=$file_name;
}

$numfiles = count($files);

for ($i=$g; $i$numfiles; $i++){
echo $files[$i];
}

-





-- 
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] Re: Select IN array?

2001-07-15 Thread teo

Hi James!
On Sun, 15 Jul 2001, James Tan wrote:

 dear chris,
 
 mysql does not support 'in' clause at the momment...
 the only way to this is to use the loop to generate the sql syntax..
 orr.. use the implode function... to join the array into 1 string separated by
 the first parameter...

huh?
teo@teo:/x  mysql test 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 155 to server version: 3.23.39

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql desc stock;
++-+--+-+-+---+
| Field  | Type| Null | Key | Default | Extra |
++-+--+-+-+---+
| item   | varchar(17) | YES  | | NULL|   |
| num| varchar(4)  | YES  | | NULL|   |
| weight | varchar(7)  | YES  | | NULL|   |
| price  | varchar(7)  | YES  | | NULL|   |
| date   | datetime| YES  | | NULL|   |
++-+--+-+-+---+
5 rows in set (0.00 sec)

mysql select * from stock where num in (1,3);
+--+--++---+-+
| item | num  | weight | price | date|
+--+--++---+-+
| foo  | 1| 2kg| 123   | 2001-06-24 21:08:04 |
| bar  | 3| 7kg| 1234  | 2001-06-24 21:08:13 |
+--+--++---+-+
2 rows in set (0.00 sec)

  I have an array of id numbers ($catids). I would like to select from the
  mysql database all records where cid is in that array.
 
  This syntax fails:
  select * from categories
  where cid in $catids
do :
$catids = implode(',',$catids);
$qs =SELECT * FROM categories WHERE cid IN ($catids);

-- teodor

-- 
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] Variable name declarations?

2001-07-15 Thread teo

Hi Kent!
On Sat, 14 Jul 2001, Kent Sandvik wrote:

 
  function sum_array( $input_array )
  {
  var $index;
  var $sum = 0;
 
  for( $index = 0; $index  count( $input_array ); $index++ )
  $sum += $input_array[ $index ];
 
  return $sum;
  }
 
 The array variable issue has indeed bitten me a couple of times, so now all
 my arrays are called $something_arr. It would nice to introduce more
 runtime checking of array types and complaints in case non-array values are
 used in functions. But otherwise the strong type checking will just cause
 more problems and more overhead with calls. I don't know if the example
 above will help that much, but you could already write similar code in
 functions to make sure that the values are declared on top, to make things
 clearer.
 
you can add:
!is_array($input_array)  ($input_array = array($input_array);
before your for() loop, if the client of sum_array() doesn't guarentee to
provide only arrays.

-- teodor

-- 
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] but mysql? (was: postgres and php)

2001-07-15 Thread teo

Hi Nuno!
On Sat, 14 Jul 2001, Nuno Silva wrote:

 
 hi there!
 
 the operators you want are ~ and ~* and !~ and !~*.
 select name from table where name ~* 'test';

any idea of something like this in MySQL? I was used to pg and I have no idea
of something equivalent in My.
 
 to see all operators availlable type \do in psql's interactive mode ;)
 
 Regards,
 Nuno Silva
 
 Derek wrote:
 
-- teodor

-- 
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] lack of error

2001-07-15 Thread Jon Yaggie

i am generating an image.  Everything is going fine except this one image.  it shows 
only as a broken image.  even if you go directly too the file all you get is a broken 
image.  with out an error of some sort i am baffled where to start.  any one got an 
idea what may cause such?  here is the url you can try it.

http://www.hvacsites.com/SiteBuilder/logo.php?tmpcolor=_dredlogo_text=sdfdsdfasfdlogo_style=1








Thank You,
 
Jon Yaggie
www.design-monster.com
 
And they were singing . . . 
 
'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code
 
101 little bugs in the code . . .'
 
And it continued until they reached 0





[PHP] Can anyone explain what this does?

2001-07-15 Thread Kurt Lieber

I'm sure this is a simple one, but I've never seen it before:

$this-file = $file;

I'm specifically confused about the - operator and what that does.  

I looked in the online documentation under operators, but didn't find
anything.  Ideally, if someone can point me to the location in the
documentation that talks about this so I can get more info, I'd
appreciate it.

Thanks.

--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] Can anyone explain what this does?

2001-07-15 Thread Patrik Wallstrom

On Sun, 15 Jul 2001, Kurt Lieber wrote:

 I'm sure this is a simple one, but I've never seen it before:

 $this-file = $file;

 I'm specifically confused about the - operator and what that does.

 I looked in the online documentation under operators, but didn't find
 anything.  Ideally, if someone can point me to the location in the
 documentation that talks about this so I can get more info, I'd
 appreciate it.

It is not an operator, it is how you reference objects in php. $this is
the object that you are current using, and you are referencing the
objects variable $file with $this-file. For more on classes and objects,
read here:
http://php.net/manual/en/language.oop.php

--
 patrik wallstrom |  f o o d f i g h t
 tel: +46-8-6188428   |  s t o c k h o l m
 gsm: +46-708405080   |  - - - - - - - - -


-- 
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: Can anyone explain what this does?

2001-07-15 Thread James Tan

hi kurt lieber,

ok, did u gone through the tutorial on oop with php??

$this stands for the class reference and file is one of the variable
inside the class...
u can specify this only in the function of the same class...

regards,

James

Kurt Lieber wrote:

 I'm sure this is a simple one, but I've never seen it before:

 $this-file = $file;

 I'm specifically confused about the - operator and what that does.

 I looked in the online documentation under operators, but didn't find
 anything.  Ideally, if someone can point me to the location in the
 documentation that talks about this so I can get more info, I'd
 appreciate it.

 Thanks.

 --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: lack of error

2001-07-15 Thread James Tan

hi jon yaggi,

i've notice some _ in your link, is the get header sent correctly??
u did not put in your source here, pls do...
we are helpless to u without your code...

regards,

James

Jon Yaggie wrote:

 i am generating an image.  Everything is going fine except this one image.  it shows 
only as a broken image.  even if you go directly too the file all you get is a broken 
image.  with out an error of some sort i am baffled where to start.  any one got an 
idea what may cause such?  here is the url you can try it.

 
http://www.hvacsites.com/SiteBuilder/logo.php?tmpcolor=_dredlogo_text=sdfdsdfasfdlogo_style=1

 Thank You,

 Jon Yaggie
 www.design-monster.com

 And they were singing . . .

 '100 little bugs in the code
 100 bugs in the code
 fix one bug, compile it again
 101 little bugs in the code

 101 little bugs in the code . . .'

 And it continued until they reached 0



[PHP] Re: Problem Inserting Array of Rows from form

2001-07-15 Thread James Tan

dear david,

did u know u do not need to put single quote to enclose number type value??

notice ur field select syntax:

INSERT INTO songs VALUES (' 1  // -- 1 is not enclosed with end quote...
thus makes only 5 fields, not 6
, blah', ' ***', ' 45', ' 2', ' ')
id[0]=: 2

try
INSERT INTO songs VALUES ('1', 'blah', ' ***', ' 45', ' 2', ' ')
id[0]=: 2

hope it helps,

regards,

James

David wrote:

 I am trying to insert an array of rows or values from a PHP form into a
 MySQL database. There are six columns in the table songs: id, songname,
 rating, video, album_id, movie.

 Here is what I get when I submit the form
 Add songs for Record Array
 INSERT INTO songs VALUES (' 1, blah', ' ***', ' 45', ' 2', ' ')
 id[0]=: 2 this is debug code
 INSERT Failed, check the code.this is debug code

 The problem seems to be with this part:

 for ($i=0; $i= $songsinalbum; $i++) {
   $vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
 '$album_id[$i]',
 '$movie[$i]');
 }

 // $vals=preg_replace(^,, , $vals);
 $vals=preg_replace('/^,/', '', $vals); // chop leading comma

 Complete code:
 When the user presses submit on the form this part executes:

   mysql_connect(192.168.0.1, mysqluser, mypassword);

 $vals=' ';
 for ($i=0; $i= $songsinalbum; $i++) {
   $vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
 '$album_id[$i]',
 '$movie[$i]');
 }

 // $vals=preg_replace(^,, , $vals);
 $vals=preg_replace('/^,/', '', $vals); // chop leading comma

 $qry=INSERT INTO songs VALUES $vals;

 echo $qry;

 $res=mysql_query($qry);

 Here is part of the form:

 ?
 $i = 1;
  while ($i = $songsinalbum) {
 ?

 TD align=rightID:   /TDTDinput type=text name=id[]
 size=3br/TD

 TD align=rightSongname:  /TDTDinput type=text name=songname[]
 size=30br/TD
 ?
 $i++;
 };


-- 
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] lack of error

2001-07-15 Thread Jon Yaggie

wonderful i hope ti is the only problem left:)



Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0


- Original Message -
From: Andrew Brampton [EMAIL PROTECTED]
To: Jon Yaggie [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 10:31 PM
Subject: Re: [PHP] lack of error


 Well if you manually go to that image with a telnet program you can see
 exactly what is returned... and this is what I get:

 br
 bWarning/b:  Could not find/open font in
 b/home/www/hvacsites.com/SiteBuilder/logo.php/b on line b74/bbr
  Ï Ó ?JFIF ??  ? ?   ? CREATOR: gd-jpeg v1.0 (using IJG JPEG v62),
default
 quality
  ? ??
 ?2!?!22 ?  ß ?? ?
?
 ??
 ??
 ? ? Á? ???  ?}??? !1A??Qaq¶2ü#B??§RЭ$3bré
 and a lot more ASCII characters

 If you fix the error on lin 74, then I think it will work :)

 Andrew

 - Original Message -
 From: Jon Yaggie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, July 15, 2001 4:11 PM
 Subject: [PHP] lack of error


 i am generating an image.  Everything is going fine except this one image.
 it shows only as a broken image.  even if you go directly too the file all
 you get is a broken image.  with out an error of some sort i am baffled
 where to start.  any one got an idea what may cause such?  here is the url
 you can try it.


http://www.hvacsites.com/SiteBuilder/logo.php?tmpcolor=_dredlogo_text=sdfds
 dfasfdlogo_style=1








 Thank You,

 Jon Yaggie
 www.design-monster.com

 And they were singing . . .

 '100 little bugs in the code
 100 bugs in the code
 fix one bug, compile it again
 101 little bugs in the code

 101 little bugs in the code . . .'

 And it continued until they reached 0





-- 
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: access pop3 without IMAP

2001-07-15 Thread James Tan

hi prachait saxena,

I'm trying to build the same too...

u can use the socket function to manupulate pop protocol at port 110
refer to the rfc link in the documentation for pop :)

hope it helps...

regards,

James

Prachait Saxena wrote:

 Hi,

 I want to check mail of a pop account. without using imap.

 Can any one know how to do that.

 kindly send it in details.
 bye

 --

 Prachait Saxena
 Offical ( [EMAIL PROTECTED] )
 Personal ( [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] Problem Inserting Array of Rows from form

2001-07-15 Thread David

I did add mysql_error which helped me solve part of the problem: I was missing a
single quote in the $val line after $id[$i] and before songname :  Here is the
corrected code but there is still a problem,

 $vals .=, ('$id[$i]', '$songname[$i]', '$rating[$i]', '$video[$i]',
'$album_id[$i]',
'$movie[$i]');

old code was:
$vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
 '$album_id[$i]',

Now the problem is it only inserts one row into the table, when there should be
more than one row inserted.

Here is the updated code and a sample entry:

?
if (isset($songname) isset($rating)){
   mysql_connect(24.1.15.33, webuser, );
  echo $id[0];

$vals='';
for ($i=0; $i= $songsinalbum; $i++) {
  $vals .=, ('$id[$i]', '$songname[$i]', '$rating[$i]', '$video[$i]',
'$album_id[$i]',
'$movie[$i]');
}

$vals=preg_replace('/^,/', '', $vals); // chop leading comma

$qry=INSERT INTO songs VALUES $vals;

echo $qry;

$result = mysql_db_query(movies, $qry);
// $res=mysql_query(movies, $qry);
$error_number = mysql_errno();
$error_msg = mysql_error();
echo MySQL error $error_number: $error_msg;

Here is part of the form:
TD align=rightSongname:  /TDTDinput type=text name=songname[]
size=30br/TD


Results:
Add songs for Record Array
2INSERT INTO songs VALUES (' 2', ' test', ' ***', ' ', ' 1', ' ')MySQL error 0:
id[0]=: 3
ID[1]: 3
Songname[1]: test
Rating[1]: ***
Video[1]:
Album ID[1]: 1

test was added to the database

Hank Marquardt wrote:

 For one, as you've written it you have a mismatch of columns vs. fields --

 You're combining id and name into one field for the insert -- thus you have
 five fields trying to be inserted into a table with six elemets.

 You should have a print of the mysql_error() in your debug code ... I bet if
 you did that's what it would tell you:)

 On Sun, Jul 15, 2001 at 07:17:00AM -0600, David wrote:
  I am trying to insert an array of rows or values from a PHP form into a
  MySQL database. There are six columns in the table songs: id, songname,
  rating, video, album_id, movie.
 
  Here is what I get when I submit the form
  Add songs for Record Array
  INSERT INTO songs VALUES (' 1, blah', ' ***', ' 45', ' 2', ' ')
  id[0]=: 2 this is debug code
  INSERT Failed, check the code.this is debug code
 
  The problem seems to be with this part:
 
  for ($i=0; $i= $songsinalbum; $i++) {
$vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
  '$album_id[$i]',
  '$movie[$i]');
  }
 
  // $vals=preg_replace(^,, , $vals);
  $vals=preg_replace('/^,/', '', $vals); // chop leading comma
 
 
  Complete code:
  When the user presses submit on the form this part executes:
 
mysql_connect(192.168.0.1, mysqluser, mypassword);
 
  $vals=' ';
  for ($i=0; $i= $songsinalbum; $i++) {
$vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
  '$album_id[$i]',
  '$movie[$i]');
  }
 
  // $vals=preg_replace(^,, , $vals);
  $vals=preg_replace('/^,/', '', $vals); // chop leading comma
 
  $qry=INSERT INTO songs VALUES $vals;
 
  echo $qry;
 
  $res=mysql_query($qry);
 
 
  Here is part of the form:
 
  ?
  $i = 1;
   while ($i = $songsinalbum) {
  ?
 
  TD align=rightID:   /TDTDinput type=text name=id[]
  size=3br/TD
 
  TD align=rightSongname:  /TDTDinput type=text name=songname[]
  size=30br/TD
  ?
  $i++;
  };
 
 
 
 
  --
  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]

 --
 Hank Marquardt [EMAIL PROTECTED]
 http://web.yerpso.net

 Web  Database Development in PHP, MySQL/PostgreSQL
 Small Office Networking Solutions - Debian GNU/Linux  FreeBSD
 PHP Instructor - HTML Writers Guild http://www.hwg.org
 *** PHP II The Cool Stuff starts July 16, 2001
 *** http://www.hwg.org/services/classes/p181.1.html

 --
 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] problem

2001-07-15 Thread [EMAIL PROTECTED]

I have a form with a bunch of text fields in it. The name of the fields is
the rowid of items in my data base:

FORM METHOD=post ACTION=edit.php3

textarea name=23 class=field/textarea
textarea name=2 class=field/textarea
textarea name=15 class=field/textarea

input type=Submit name=save value=submit

FORM

Now, I want to change all of the items in the DB where a rowid was submited.

Is there an easy way to do this?

Susan





-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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]




Re: [PHP] Re: Problem Inserting Array of Rows from form

2001-07-15 Thread David

I will try without single quotes for the id and other fields which have numeric
values.  For the original issue I was missing two single quotes. I was missing
a
single quote in the $val line after $id[$i] and before songname : I really
don't need the quote for id since it is a numeric value. Here is the
corrected code but there is still a problem,

 $vals .=, ('$id[$i]', '$songname[$i]', '$rating[$i]', '$video[$i]',
'$album_id[$i]',
'$movie[$i]');

old code was:
$vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
 '$album_id[$i]',

Now the problem is it only inserts one row into the table, when there should be

more than one row inserted.

Here is the updated code and a sample entry:

?
if (isset($songname) isset($rating)){
   mysql_connect(24.1.15.33, webuser, );
  echo $id[0];

$vals='';
for ($i=0; $i= $songsinalbum; $i++) {
  $vals .=, ('$id[$i]', '$songname[$i]', '$rating[$i]', '$video[$i]',
'$album_id[$i]',
'$movie[$i]');
}

$vals=preg_replace('/^,/', '', $vals); // chop leading comma

$qry=INSERT INTO songs VALUES $vals;

echo $qry;

$result = mysql_db_query(movies, $qry);
// $res=mysql_query(movies, $qry);
$error_number = mysql_errno();
$error_msg = mysql_error();
echo MySQL error $error_number: $error_msg;

Here is part of the form:
TD align=rightSongname:  /TDTDinput type=text name=songname[]
size=30br/TD


Results:
Add songs for Record Array
2INSERT INTO songs VALUES (' 2', ' test', ' ***', ' ', ' 1', ' ')MySQL error 0:

id[0]=: 3
ID[1]: 3
Songname[1]: test
Rating[1]: ***
Video[1]:
Album ID[1]: 1

test was added to the database

James Tan wrote:

 dear david,

 did u know u do not need to put single quote to enclose number type value??

 notice ur field select syntax:

 INSERT INTO songs VALUES (' 1  // -- 1 is not enclosed with end quote...
 thus makes only 5 fields, not 6
 , blah', ' ***', ' 45', ' 2', ' ')
 id[0]=: 2

 try
 INSERT INTO songs VALUES ('1', 'blah', ' ***', ' 45', ' 2', ' ')
 id[0]=: 2

 hope it helps,

 regards,

 James

 David wrote:

  I am trying to insert an array of rows or values from a PHP form into a
  MySQL database. There are six columns in the table songs: id, songname,
  rating, video, album_id, movie.
 
  Here is what I get when I submit the form
  Add songs for Record Array
  INSERT INTO songs VALUES (' 1, blah', ' ***', ' 45', ' 2', ' ')
  id[0]=: 2 this is debug code
  INSERT Failed, check the code.this is debug code
 
  The problem seems to be with this part:
 
  for ($i=0; $i= $songsinalbum; $i++) {
$vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
  '$album_id[$i]',
  '$movie[$i]');
  }
 
  // $vals=preg_replace(^,, , $vals);
  $vals=preg_replace('/^,/', '', $vals); // chop leading comma
 
  Complete code:
  When the user presses submit on the form this part executes:
 
mysql_connect(192.168.0.1, mysqluser, mypassword);
 
  $vals=' ';
  for ($i=0; $i= $songsinalbum; $i++) {
$vals .=, ('$id[$i], $songname[$i]', '$rating[$i]', '$video[$i]',
  '$album_id[$i]',
  '$movie[$i]');
  }
 
  // $vals=preg_replace(^,, , $vals);
  $vals=preg_replace('/^,/', '', $vals); // chop leading comma
 
  $qry=INSERT INTO songs VALUES $vals;
 
  echo $qry;
 
  $res=mysql_query($qry);
 
  Here is part of the form:
 
  ?
  $i = 1;
   while ($i = $songsinalbum) {
  ?
 
  TD align=rightID:   /TDTDinput type=text name=id[]
  size=3br/TD
 
  TD align=rightSongname:  /TDTDinput type=text name=songname[]
  size=30br/TD
  ?
  $i++;
  };

 --
 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]OT I know, but WTF...

2001-07-15 Thread Chris Cocuzzo

hey-

I know this is off topic, but I figured i'd ask to see if other people were
experiencing similar problems. I'm having trouble accessing web sites/pages
that are secure(https...obviously). I tried changing everything around in IE
6, but so far nothing is working...any ideas?

the error is the normal, annoying, page can't be found or dns error bull.

chris


-- 
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] Question about strlen I think

2001-07-15 Thread Dennis Kaandorp

Hello,
On my site users can submit ftp's.
Is there a way to replace the spaces between the paths?
This is what I mean:
/uploads//by/   /dennis/
must become
/uploads/4sp/by/3spdennis/

Thnx,
Dennis


-- 
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:[PHP] Session Question

2001-07-15 Thread Tom Malone

Thanks Christopher!

I chmoded the directory to 777 like you said, and it worked fine, but then I
took your advice regarding security and put all the data in a MySQL
database. Thank you very much for your help!

Tom Malone


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

2001-07-15 Thread teo

Hi zerosumzero!
On Sun, 15 Jul 1979, [EMAIL PROTECTED] wrote:

 I have a form with a bunch of text fields in it. The name of the fields is
 the rowid of items in my data base:
 
 FORM METHOD=post ACTION=edit.php3
 
 textarea name=23 class=field/textarea
 textarea name=2 class=field/textarea
 textarea name=15 class=field/textarea
 
 input type=Submit name=save value=submit
 
 FORM
 
 Now, I want to change all of the items in the DB where a rowid was submited.
 
 Is there an easy way to do this?

here's a hint:

 FORM METHOD=post ACTION=edit.php3
 
 textarea name=f[23] class=field/textarea
 textarea name=f[2] class=field/textarea
 textarea name=f[15] class=field/textarea
 
 input type=Submit name=save value=submit
 
 FORM

$f = $HTTP_POST_VARS['f']; // if you have register globals off

foreach ($f as $rowid = $content) {
$rowid = (int)$rowid;
// add some sanity checks on $content here
$qs = UPDATE idunnowhat SET content='$content' WHERE rowid=$rowid;
$db-query($qs); // provided that $db is an database connection object or
   something 
}

dere u go

-- teodor

-- 
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] Pass variables with PHP_SELF?

2001-07-15 Thread David

How do you pass a variable that was passed from one form to another form
and then to PHP_SELF?   The first part works fine: I passed a variable
from one form to another page with a form using
blah.php?id=$idsongsinalbum=$songsinalbumbut when someone submits
the second form the value of $songsinalbum is not passed when using
PHP_SELF. Do I have to pass to another page? I want to use PHP_SELF




-- 
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] $($row[0])

2001-07-15 Thread [EMAIL PROTECTED]

If I have a form with fields named by rowid, is there a way to call the
string, by the name of each rowid on the next page?


$($row[0])

won't work ...


-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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]




Re: [PHP] $($row[0])

2001-07-15 Thread Rasmus Lerdorf

 If I have a form with fields named by rowid, is there a way to call the
 string, by the name of each rowid on the next page?

 $($row[0])

 won't work ...

${$row[0]}

Well-documented here:
http://php.net/manual/en/language.variables.variable.php

-Rasmus


-- 
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] Pass variables with PHP_SELF?

2001-07-15 Thread Maxim Maletsky


try submitting this page to $REQUEST_URI

form action=?=$REQUEST_URI? ... 


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-Original Message-
From: David [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Pass variables with PHP_SELF?


How do you pass a variable that was passed from one form to another form
and then to PHP_SELF?   The first part works fine: I passed a variable
from one form to another page with a form using
blah.php?id=$idsongsinalbum=$songsinalbumbut when someone submits
the second form the value of $songsinalbum is not passed when using
PHP_SELF. Do I have to pass to another page? I want to use PHP_SELF




-- 
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] MySQL Connect Timing out?

2001-07-15 Thread Chris Anderson

I have an include file that includes my mysql connect information. Its sole purpose is 
to login to mysql. Strangely on my Win9x development system with apache, sometimes, 
almost randomly, the connection will time out. Then if I press refresh it works 
prefectly. I am only connecting once per page and am closing my connections when done. 
Does this sound like a MySQL or Apache onfiguration problem? Or is there something I'm 
missing. Thanks 



[PHP] Confusion abounds here

2001-07-15 Thread Tom Malone

I just renamed a directory on my webserver (apache) and then did a
searchreplace in my text editor to update all my files then uploaded them.
Now I am getting the following error on a page I am using to display all the
rows in a database that contains session data:

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/tgmalone/public_html/admin/logs.php:1) in
/home/tgmalone/public_html/admin/logs.php on line 1

but I'm not trying to send any headers! (or am I?)

Confused!
Tom Malone


-- 
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]OT I know, but WTF...

2001-07-15 Thread Chris Cocuzzo

platform: win 98 se
browser: IE 6 public beta
proxie: not using one or whatever
connection: LAN-mediaone

-Original Message-
From: DAve Goodrich [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP]OT I know, but WTF...


Browser?
Platform?
Proxie?
Connection type?

DAve

on 7/15/01 9:08 AM, Chris Cocuzzo at [EMAIL PROTECTED] wrote:

 hey-

 I know this is off topic, but I figured i'd ask to see if other people
were
 experiencing similar problems. I'm having trouble accessing web
sites/pages
 that are secure(https...obviously). I tried changing everything around in
IE
 6, but so far nothing is working...any ideas?

 the error is the normal, annoying, page can't be found or dns error bull.

 chris


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655
[EMAIL PROTECTED]
http://www.rblc.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] Wget and PHP

2001-07-15 Thread Clayton Dukes



Is there a utility available that will get PHP 
based websites?
Wget doesn't do it

TIA!

Clayton DukesCCNA, CCDA, CCDP, CCNPDownload 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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] Re: Confusion abounds here

2001-07-15 Thread Inércia Sensorial

  Spaces or new lines can give this problem also. For example (left numbers
are lines):

1.
2.?php
3.session_start();
4.?

  Might give errors because of the first line (wich is empty). Check if the
file logs.php doesn't have this problem.

--

  Julio Nobrega.

Because happiness is a warm gun
Bang-bang shoot-shoot

Tom Malone [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I just renamed a directory on my webserver (apache) and then did a
 searchreplace in my text editor to update all my files then uploaded
them.
 Now I am getting the following error on a page I am using to display all
the
 rows in a database that contains session data:

 Warning: Cannot send session cache limiter - headers already sent (output
 started at /home/tgmalone/public_html/admin/logs.php:1) in
 /home/tgmalone/public_html/admin/logs.php on line 1

 but I'm not trying to send any headers! (or am I?)

 Confused!
 Tom Malone




-- 
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] Confusion abounds here

2001-07-15 Thread Maxim Maletsky

PHP sends them automatically, at the first output you do.

But that's irrelevant. What I think you did, is you replacing something
created an output (could be some character or even a blank spaced or a
newline before ?) in file logs.php

just make sure that file starts from ? at the very top-left. (and of course
no echo's before you do session_start())


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Tom Malone [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:54 AM
To: PHP Users
Subject: [PHP] Confusion abounds here


I just renamed a directory on my webserver (apache) and then did a
searchreplace in my text editor to update all my files then uploaded them.
Now I am getting the following error on a page I am using to display all the
rows in a database that contains session data:

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/tgmalone/public_html/admin/logs.php:1) in
/home/tgmalone/public_html/admin/logs.php on line 1

but I'm not trying to send any headers! (or am I?)

Confused!
Tom Malone


--
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] Wget and PHP

2001-07-15 Thread DAve Goodrich

Wget works just fine for me here. The one problem I see is if you need to
complete a form for entry, session login, then it can be a problem. I solve
that by allowing a no login on our development box behind the firewall.

I'm sure it could be done use a post (php has a post class I believe) since
wget can read url inputs from a file.

What doesn't work on your end?

DAve

on 7/15/01 9:59 AM, Clayton Dukes at [EMAIL PROTECTED] wrote:

 Is there a utility available that will get PHP based websites?
 Wget doesn't do it
 
 TIA!
 
 Clayton Dukes
 CCNA, CCDA, CCDP, CCNP
 Download Free Essays, Term Papers and Cisco Training from
 http://www.gdd.net http://www.gdd.net
 
 

--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.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]




Re: [PHP]OT I know, but WTF...

2001-07-15 Thread DAve Goodrich

on 7/15/01 9:43 AM, Chris Cocuzzo at [EMAIL PROTECTED] wrote:

 platform: win 98 se
 browser: IE 6 public beta
   
That is your problem. Tried MS website?

DAve

 proxie: not using one or whatever
 connection: LAN-mediaone
 
 -Original Message-
 From: DAve Goodrich [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 15, 2001 12:40 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP]OT I know, but WTF...
 
 
 Browser?
 Platform?
 Proxie?
 Connection type?
 
 DAve
 
 on 7/15/01 9:08 AM, Chris Cocuzzo at [EMAIL PROTECTED] wrote:
 
 hey-
 
 I know this is off topic, but I figured i'd ask to see if other people
 were
 experiencing similar problems. I'm having trouble accessing web
 sites/pages
 that are secure(https...obviously). I tried changing everything around in
 IE
 6, but so far nothing is working...any ideas?
 
 the error is the normal, annoying, page can't be found or dns error bull.
 
 chris
 

--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.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] Re: Confusion abounds here

2001-07-15 Thread Tom Malone

Thanks Maxim and Inercia - you were both right - somehow an extra space was
put in before the ? when I did the search and replace. Thank you!

Tom Malone


-- 
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] how can i creat a file and write a string to it!

2001-07-15 Thread sunny AT wde

i've been looking for an adequate answer all morning in the archives,
but can't find one, neithr can i understand the manual.

all i want to do is for php to take the strong sent to it through a
form, and create a new file with a name 2.html for example, and
write the string to it.

how can i quickly do this please?

i got this so far but that gives me some filehandler problem. i'm
running off a unix system btw.

  $lastid = mysql_insert_id() ; 
  $root = /home/articles/;
  $file = $root . $lastid . .html;

  fwrite($file, $articletext);

tia!!

/sunny


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

-- 
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] Wget and PHP

2001-07-15 Thread DAve Goodrich

on 7/15/01 9:59 AM, Clayton Dukes at [EMAIL PROTECTED] wrote:
 
 Is there a utility available that will get PHP based websites?
 Wget doesn't do it
 
 TIA!
 
 Clayton Dukes
 CCNA, CCDA, CCDP, CCNP
 Download Free Essays, Term Papers and Cisco Training from
 http://www.gdd.net http://www.gdd.net

wget -A=html,php,php3 # list of accepted extensions
-r   # recursive web-suck -- use with care!
-l 3 # maximum recursion depth (0 to unlimit).
-k   # convert non-relative links to relative
-nv  # turn off verboseness, without being quiet

sysadmin@zeus:/usr/local/home/sysadmin$ wget -A=html,php,php3 -r -l 3 -k
-nv www.php.net
10:22:33 URL:http://www.php.net:80/ [18212] - www.php.net/index.html [1]
/search.php?show=nosourcepattern=%2Frobots.txt: Unknown/unsupported
protocol.
10:22:34 URL:http://www.php.net:80/downloads.php [14415] -
www.php.net/downloads.php [1]
10:22:36 URL:http://www.php.net:80/docs.php [27432] -
www.php.net/docs.php [1]
10:22:39 URL:http://www.php.net:80/FAQ.php [76465] - www.php.net/FAQ.php
[1]
10:22:40 URL:http://www.php.net:80/support.php [21866] -
www.php.net/support.php [1]
10:22:41 URL:http://www.php.net:80/bugs.php [38831] -
www.php.net/bugs.php [1]
10:22:42 URL:http://www.php.net:80/links.php [18090] -
www.php.net/links.php [1]
10:22:43 URL:http://www.php.net:80/license/ [12410] -
www.php.net/license/index.html [1]
10:22:44 URL:http://www.php.net:80/books.php [12035] -
www.php.net/books.php [1]
10:22:46 URL:http://www.php.net:80/manual/en/ [33099] -
www.php.net/manual/en/index.html [1]
10:22:46 URL:http://www.php.net:8000/manual/en/html/ [11043/11043] -
www.php.net/manual/en/html/index.html [1]

sysadmin@zeus:/usr/local/home/sysadmin/www.php.net$ ls -la
total 260
drwxr-xr-x   5 sysadmin rbldev   4096 Jul 15 10:22 ./
drwx--x--x  13 sysadmin rbldev   4096 Jul 15 10:21 ../
-rw-r--r--   1 sysadmin rbldev  76465 Jul 15 10:22 FAQ.php
-rw-r--r--   1 sysadmin rbldev  12035 Jul 15 10:22 books.php
-rw-r--r--   1 sysadmin rbldev  38831 Jul 15 10:22 bugs.php
-rw-r--r--   1 sysadmin rbldev  27432 Jul 15 10:22 docs.php
-rw-r--r--   1 sysadmin rbldev  14415 Jul 15 10:22 downloads.php
-rw-r--r--   1 sysadmin rbldev  18212 Jul 15 10:22 index.html
drwxr-xr-x   2 sysadmin rbldev   4096 Jul 15 10:22 license/
-rw-r--r--   1 sysadmin rbldev  18090 Jul 15 10:22 links.php
drwxr-xr-x  12 sysadmin rbldev   4096 Jul 15 10:23 manual/
drwxr-xr-x   2 sysadmin rbldev   4096 Jul 15 10:21 stats/
-rw-r--r--   1 sysadmin rbldev  21866 Jul 15 10:22 support.php
sysadmin@zeus:/usr/local/home/sysadmin/www.php.net$

DAve


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.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] php/apache/cgi

2001-07-15 Thread Raquel Hurtado

Can't get apache to run php under the /cgi-bin directory, getting: Exec
format error: exec of /var/www/cgi-bin/test.php failed.

Does it mean that I should install PHP as a CGI module?

Thanks in advance.




-- 
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] how can i creat a file and write a string to it!

2001-07-15 Thread John Meyer

At 06:27 PM 7/15/01 +0100, sunny AT wde wrote:
i've been looking for an adequate answer all morning in the archives,

   fwrite($file, $articletext);


Don't you have to do a fopen beforehand?


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-- 
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] Simple (??) control structure problem

2001-07-15 Thread Christopher Kaminski

I'm trying to write a simple weblog script, but I've encountered a
perplexing problem.  I'm sure I'm overlooking something simple.

I'm trying to take textarea form input, parse it, and wrap it in p tags.
The problem is removing extra carriage returns.  I'm sure there's a problem
with the if ($sentence != ' '), but I don't know what the right
conditional statement is.  No matter what I put in there, it keeps
processing any extra blank lines and putting an extra pair of p/p tags
in.  Granted, this doesn't effect the way the page is displayed.  For
correctness sake, I'd rather not have them in there.

Here's the simple page I threw together to illustrate the problem:

html
body

?php
if ($submit) {

$funk = explode(\n, $paragraph);
foreach ($funk as $key = $sentence) {
if ($sentence != ' ')) {
$funk[$key] = p . $sentence . /p\n;
echo $funk[$key];
}
}

} else {
?
pform method=post action=?php echo $PHP_SELF?
Text:textarea name=paragraph rows=10 cols=40/textareabr
input type=submit name=submit value=Mangle This
/form/p
?php
}
?

/body
/html

Thanks in advance,
Chris



-- 
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] Simple (??) control structure problem

2001-07-15 Thread James, Yz

Hi Christopher,

Why not use nl2br() and trim() ?

$string = trim($string); // Clear any unwanted white space (trailing and
leading);
$string = nl2br($string); // Add line breaks where necessary

echo $string; // Voila

James

Christopher Kaminski [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm trying to write a simple weblog script, but I've encountered a
 perplexing problem.  I'm sure I'm overlooking something simple.

 I'm trying to take textarea form input, parse it, and wrap it in p
tags.
 The problem is removing extra carriage returns.  I'm sure there's a
problem
 with the if ($sentence != ' '), but I don't know what the right
 conditional statement is.  No matter what I put in there, it keeps
 processing any extra blank lines and putting an extra pair of p/p
tags
 in.  Granted, this doesn't effect the way the page is displayed.  For
 correctness sake, I'd rather not have them in there.

 Here's the simple page I threw together to illustrate the problem:

 html
 body

 ?php
 if ($submit) {

 $funk = explode(\n, $paragraph);
 foreach ($funk as $key = $sentence) {
 if ($sentence != ' ')) {
 $funk[$key] = p . $sentence . /p\n;
 echo $funk[$key];
 }
 }

 } else {
 ?
 pform method=post action=?php echo $PHP_SELF?
 Text:textarea name=paragraph rows=10
cols=40/textareabr
 input type=submit name=submit value=Mangle This
 /form/p
 ?php
 }
 ?

 /body
 /html

 Thanks in advance,
 Chris





-- 
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 4.0.6 fails

2001-07-15 Thread Alexander Lohse

Hi,

I used to install every version up to 4.0.4 with apxs.
Always worked fine. But Version 4.0.6  fails, telling me that apache 
would not have been built with mod_so support!
I am using apache 1.3.6.

Any idea?

Regards,

Alex

PS: Please mail cc-me because I am currently offlist!
Thanx.
-- 
___
Human Touch Medienproduktion GmbH
Am See 1
17440 Klein Jasedow

Alexander Lohse
Tel: (038374) 75211
Fax: (038374) 75223
eMail: [EMAIL PROTECTED]
http://www.humantouch.de

-- 
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] Simple (??) control structure problem

2001-07-15 Thread Christopher Kaminski

Thanks alot! I didn't do that because I wasn't aware of the nl2br()
function.

I just taught myself php last weekend.  There's still plenty for me to
learn.

Yz James [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Christopher,

 Why not use nl2br() and trim() ?

 $string = trim($string); // Clear any unwanted white space (trailing and
 leading);
 $string = nl2br($string); // Add line breaks where necessary

 echo $string; // Voila

 James




-- 
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: Question about strlen I think

2001-07-15 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Dennis Kaandorp) wrote:

 Is there a way to replace the spaces between the paths?
 This is what I mean:
 /uploads//by/   /dennis/
 must become
 /uploads/4sp/by/3spdennis/

See http://php.net/preg-replace. You can use the e or f modifier to 
count the number of captured spaces and write that number into your 4sp 
replacement pattern.

-- 
CC

-- 
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] I want to learn this!

2001-07-15 Thread Minardi boy

Hello

My name is Robert-Jan and I've been webdesigning since 97 (very basic HTML
sites, little Java and Flash).
I got a job on the web in 99 and this was mainly providing content and other
guys did the asp stuff for me.

This is why I kindo overslept the database hype. And heck I want to learn
it!
The question is where can I learn this. I've downloaded the manual at
php.net but this wasn't very satisfying as I really don't like reading lots
of complicated stuff on the screen of my laptop.
Are there any books you guys/gals could recommend? Are there (non
university/school) classes (satisfactory)?

Please tell me cause I really want to automate the sites I run now.

Cheers and thanks for your help

Robert-Jan
www.forzaminardi.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]




Re: [PHP] how can i creat a file and write a string to it!

2001-07-15 Thread Chris Anderson

Try looking under Filesystem functions in the manual.
- Original Message - 
From: sunny AT wde [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 1:27 PM
Subject: [PHP] how can i creat a file and write a string to it!


 i've been looking for an adequate answer all morning in the archives,
 but can't find one, neithr can i understand the manual.
 
 all i want to do is for php to take the strong sent to it through a
 form, and create a new file with a name 2.html for example, and
 write the string to it.
 
 how can i quickly do this please?
 
 i got this so far but that gives me some filehandler problem. i'm
 running off a unix system btw.
 
   $lastid = mysql_insert_id() ; 
   $root = /home/articles/;
   $file = $root . $lastid . .html;
 
   fwrite($file, $articletext);
 
 tia!!
 
 /sunny
 
 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie
 
 -- 
 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] Re: I want to learn this!

2001-07-15 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Minardi Boy) wrote:

 I've downloaded the manual at
 php.net but this wasn't very satisfying as I really don't like reading lots
 of complicated stuff on the screen of my laptop.

Then print it.  No kidding.  I'm all for conserving paper, but this is no 
waste.  The PHP manual--*with annotations*--is a very good introduction to 
PHP.  IMO, far too many people try to get by w/o reading the manual, then 
end up spending hours or days struggling with something that would have 
taken them seconds or minutes if they'd read the manual through.

A printout gives you get the best of both worlds: scribble notes all over 
the printout, while doing copy/pastes of the code snippets of the user 
annotations from the online version.

 Are there any books you guys/gals could recommend? Are there (non
 university/school) classes (satisfactory)?

Julie Meloni has two good intro-level books.  Many people seem to like the 
Wrox book as well.  PHP.net has a list of other books (I believe there's a 
link from http://php.net/support.php).  Pick whichever one you're most 
comfortable with.

As to courses, any generalized intro-to-programming should be helpful for 
understanding concepts  terminology common to PHP and every other 
programming language. 

You mention an interest in databases.  If you're using MySQL (which you 
should, at least while you're learning, since virtually every PHP tutorial 
for databases uses MySQL as its DBMS), the essential MySQL 
tutorial/reference book IMO is Paul DuBois' MySQL from New Riders.  It 
even has a chapter devoted to using MySQL with PHP.

Caveat: do not expect to learn databases from any PHP reference.  
Database concepts, the SQL language, and the peculiarities (features, 
functions, syntax) of your DBMS are all big, important topics requiring a 
dedicated text of their own.

My recommendations:
The PHP.net manual, plus any online or printed PHP tutorial of your choice.  
If you're planning to work with databases, add any standard intro to 
database concepts and SQL, plus the manual for your chosen DBMS.

Good luck!

-- 
CC

-- 
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] option value

2001-07-15 Thread Michael Thomas


how can i populate an dropdown box useing php  postgresql.
Thanks in advance


-- 
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: I want to learn this!

2001-07-15 Thread Chris Anderson

Zona is right, if you avoid the manual you will experience many problems.
Never avoid the documentation
- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 5:06 PM
Subject: [PHP] Re: I want to learn this!


 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Minardi Boy) wrote:

  I've downloaded the manual at
  php.net but this wasn't very satisfying as I really don't like reading
lots
  of complicated stuff on the screen of my laptop.

 Then print it.  No kidding.  I'm all for conserving paper, but this is no
 waste.  The PHP manual--*with annotations*--is a very good introduction to
 PHP.  IMO, far too many people try to get by w/o reading the manual, then
 end up spending hours or days struggling with something that would have
 taken them seconds or minutes if they'd read the manual through.

 A printout gives you get the best of both worlds: scribble notes all over
 the printout, while doing copy/pastes of the code snippets of the user
 annotations from the online version.

  Are there any books you guys/gals could recommend? Are there (non
  university/school) classes (satisfactory)?

 Julie Meloni has two good intro-level books.  Many people seem to like the
 Wrox book as well.  PHP.net has a list of other books (I believe there's a
 link from http://php.net/support.php).  Pick whichever one you're most
 comfortable with.

 As to courses, any generalized intro-to-programming should be helpful for
 understanding concepts  terminology common to PHP and every other
 programming language.

 You mention an interest in databases.  If you're using MySQL (which you
 should, at least while you're learning, since virtually every PHP tutorial
 for databases uses MySQL as its DBMS), the essential MySQL
 tutorial/reference book IMO is Paul DuBois' MySQL from New Riders.  It
 even has a chapter devoted to using MySQL with PHP.

 Caveat: do not expect to learn databases from any PHP reference.
 Database concepts, the SQL language, and the peculiarities (features,
 functions, syntax) of your DBMS are all big, important topics requiring a
 dedicated text of their own.

 My recommendations:
 The PHP.net manual, plus any online or printed PHP tutorial of your
choice.
 If you're planning to work with databases, add any standard intro to
 database concepts and SQL, plus the manual for your chosen DBMS.

 Good luck!

 --
 CC

 --
 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] Reenviar: Help on LDAP and PHP4

2001-07-15 Thread osman . bayona



 ___ 
Consigue tu e-mail gratuito TERRA.COM.CO
 Haz click en http://www1.terra.com.co/correo


Hi...

I have this issue that is killing me. I installed PHP 4.0.4 with Solaris
8 and Apache. I want to use LDAP connecting to a server in the net (not
the same server where i'm working on) And i configure PHP with:

configure --with-apxs=/usr/apache/bin/apxs --with-pgsql=/usr/local/pgsql
 --with-ldap

then 'make install' and everything works fine until i try:

/usr/apache/bin/apachectl start

then i have this @!% message:

Syntax error on line 236 of /etc/apache/httpd.conf:
 Cannot load /usr/apache/libexec/libphp4.so into server: ld.so.1:
 /usr/apache/bin/httpd: fatal: relocation error: file
 /usr/apdap_unbind_s: referenced symbol not found
 /usr/apache/bin/apachectl start: httpd could not be started

Do you know what can be wrong? There's a lack in the documentation
regarding PHP and LDAP so i'm not able to find any info. Any advice
from you will be Really appreciated. Thanx!

Andrey Bayona.

 ___ 
Consigue tu e-mail gratuito TERRA.COM.CO
 Haz click en http://www1.terra.com.co/correo




-- 
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] I want to learn this!

2001-07-15 Thread Aral Balkan

If you're running Windows, try the .chm (windows helpfile?) version of the
manual -- IMHO it's much easier to navigate then the HTML version. I find it
indispensable.

Aral :)
__
([EMAIL PROTECTED])
New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
Adj. Prof., American University
¯¯



-- 
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] converting multiple URL values for the same variable into an array

2001-07-15 Thread Kurt Lieber

I'm modifying some code for ampache (ampache.kveton.com) and have run into a
snag that I'm not sure I understand completely.

Part of the code produces a URL similar to the following:

http://myhost/playlist.pls?song=100song=101song=102

and $song then gets passed to this function:

function get_song_path_from_id ( $song ) {
  GLOBAL $dbh, $db_name;

  $songs = '';
  $count = 0;

  if ( is_array( $song ) ) {
while ( list($k,$v) = each($song) ) {
  //does some cool stuff
}
  }
  else {
//does some other stuff
  }
  return ($songs);
}

So, am I correct in assuming that $song will never be considered an array?
(basically, given the above code and URL, $song will always equal 102)

I'm new to PHP, and since I didn't write the original code, I'm not sure if
this is a bug, or something that I just don't fully understand.  Assuming it
is a bug, can anyone offer some suggestions on how to take the URL and parse
it out and input the values into an array called $song?
(get_song_path_from_id() is used by several other parts of the code, so any
modifications to that code would need to leave the rest of the functionality
intact)

Thanks.

--kurt

P.S.  If anyone is looking for a simple, easy-to-use (and set up) mp3
manager, I highly recommend ampache.  It doesn't have a bunch of bells 
whistles (which I don't want) -- it simply provides a simple, effective way
to manage playlists and play your mp3 songs from anywhere.


-- 
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] converting multiple URL values for the same variable into an array

2001-07-15 Thread Kurt Lieber

I should also clarify that .pls is set up as a PHP extension and the
page is being interpreted by the PHP engine.

--kurt

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 15, 2001 4:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] converting multiple URL values for the same variable into
an array


I'm modifying some code for ampache (ampache.kveton.com) and have run
into a snag that I'm not sure I understand completely.

Part of the code produces a URL similar to the following:

http://myhost/playlist.pls?song=100song=101song=102

and $song then gets passed to this function:

function get_song_path_from_id ( $song ) {
  GLOBAL $dbh, $db_name;

  $songs = '';
  $count = 0;

  if ( is_array( $song ) ) {
while ( list($k,$v) = each($song) ) {
  //does some cool stuff
}
  }
  else {
//does some other stuff
  }
  return ($songs);
}

So, am I correct in assuming that $song will never be considered an
array? (basically, given the above code and URL, $song will always equal
102)

I'm new to PHP, and since I didn't write the original code, I'm not sure
if this is a bug, or something that I just don't fully understand.
Assuming it is a bug, can anyone offer some suggestions on how to take
the URL and parse it out and input the values into an array called
$song?
(get_song_path_from_id() is used by several other parts of the code, so
any modifications to that code would need to leave the rest of the
functionality
intact)

Thanks.

--kurt

P.S.  If anyone is looking for a simple, easy-to-use (and set up) mp3
manager, I highly recommend ampache.  It doesn't have a bunch of bells 
whistles (which I don't want) -- it simply provides a simple, effective
way to manage playlists and play your mp3 songs from anywhere.


-- 
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]OT I know, but WTF...

2001-07-15 Thread Chris Anderson

I've actually had an MS representative tell me not to use the IE6 beta.
What's that tell you?
- Original Message -
From: Chris Cocuzzo [EMAIL PROTECTED]
To: PHP General List (E-mail) [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 12:08 PM
Subject: [PHP]OT I know, but WTF...


 hey-

 I know this is off topic, but I figured i'd ask to see if other people
were
 experiencing similar problems. I'm having trouble accessing web
sites/pages
 that are secure(https...obviously). I tried changing everything around in
IE
 6, but so far nothing is working...any ideas?

 the error is the normal, annoying, page can't be found or dns error bull.

 chris


 --
 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 fdf support in php

2001-07-15 Thread Michael Stearns

I am working in a virtual server environment on FreeBSD with PHP4/apache (I
don't have root access to the server).

I would like to install fdf  support. The install instructions that came
with the package from Adobe are minimal.

From reading the docs on php.net I understood that I could modify my apache
httpd.conf with something like this:

php_value extension_dir /usr/home/serverone/usr/local/lib/mylib
php_value extension libFdfTk.so

So far that isn't working.

It looks like the two relevant files I need are:
FdfTk.h libFdfTk.so

I put both of these files in the directory I referenced above:
/usr/home/serverone/usr/local/lib/mylib

I am not clear if I need to put the FdfTk.h in a specific location and how I
need to reference that.

Any suggestions for how to proceed would be appreciated!

Regards,
Michael









-- 
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]OT I know, but WTF...

2001-07-15 Thread Chris Lambert - WhiteCrown Networks

That the IE6 beta is a beta.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; PHP General List (E-mail)
[EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 5:35 PM
Subject: Re: [PHP]OT I know, but WTF...


| I've actually had an MS representative tell me not to use the IE6 beta.
| What's that tell you?
| - Original Message -
| From: Chris Cocuzzo [EMAIL PROTECTED]
| To: PHP General List (E-mail) [EMAIL PROTECTED]
| Sent: Sunday, July 15, 2001 12:08 PM
| Subject: [PHP]OT I know, but WTF...
|
|
|  hey-
| 
|  I know this is off topic, but I figured i'd ask to see if other people
| were
|  experiencing similar problems. I'm having trouble accessing web
| sites/pages
|  that are secure(https...obviously). I tried changing everything around
in
| IE
|  6, but so far nothing is working...any ideas?
| 
|  the error is the normal, annoying, page can't be found or dns error
bull.
| 
|  chris
| 
| 
|  --
|  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]




[PHP] [ANN] MySQLConnect for 4D 1.0 Demo

2001-07-15 Thread spinel


FOR IMMEDIATE RELEASE

Exenevex, SA ( http://www.exenevex.com ) announces release of MySQLConnect
for 4D 1.0 demo version

Paris, France - Monday, July 16th, 2001: Exenevex, SA, today announced the
release of demo version of MySQLConnect for 4D 1.0 (MacOS  Windows).
MySQLConnect for 4D is a 4th Dimension plugin which provides connection
routines between 4th Dimension-4D Server-4D Runtime-4D Runtime Classic-
Engined 4D applications and MySQL Databases Servers.

WHAT'S MYSQL ?

MySQL is a very popular open source RDBMS that comes with 70% of web hosting plans 
over the world. MySQL runs on several systems like Linux, FreeBSD, Windows NT/2000, 
MacOS X, Mac OS X Server and moreMySQL is mainly used with Apache/Php to build 
dynamic web sites for eBusiness solutions.
For more informations about MySQL, please visit : http://www.mysql.com
For more informations about Apache, please visit : http://www.apache.org
For more informations about PHP, please visit : http://www.php.net

FEATURES

Using MySQLConnect for 4D, 4D developers have a set of 4D routines to manage
:

- Connections to/Disconnection from MySQL Databases Servers
- Structure SQL queries (Create/Alter/Drop Databases  Tables)
- Data SQL queries (Insert/Update/Delete data)
- Administration SQL queries (Grant/Revoke ...)
- Support for 4D datatypes including BLOB  PICTURE data types
- Internal mecanisms to manage simple quotes used in SQL queries

Using MySQLConnect for 4D, 4D developers can create well designed systems to
manage, exchange, synchronize 4D Applications with eBusiness web hosted
solutions, or simply use 4D as a GUI generator for distant MySQL systems.

MySQLConnect for 4D 1.0 doesn't use any external librairy to work with MySQL
Databases Servers and returns real good performances.

MySQLConnect for 4D 1.0 is the first release in a suite of data management
oriented 4D Plugins that will be released soon by Exenevex, SA.

PRICING  AVAILABILITY

MySQLConnect for 4D 1.0 MacOS  MySQLConnect for 4D 1.0 Windows will be
available to orders very soon directly from our secured store area
at http://www.4ee4.com. Orders will be accepted using credit cards in USD
and Euro. Pricing and licencing issues will be exposed at the same time.

DOWNLOAD MACOS  WIN DEMO VERSIONS

You can immediatly download demo versions of MySQLConnect for 4D (MacOS  Windows) with
documentation at http://www.exenevex.com/dev/demoform.html

For more informations, contact : [EMAIL PROTECTED]

ABOUT EXENEVEX, SA.

Based in Paris, France, Exenevex SA was founded in 1998 by Stéphane Pinel to provide
development and consulting services for MacOS, MacOS X, Windows  Unix
platforms. Specifically, Exenevex SA develops softwares and development
tools around different RDMS.

For more informations about Exenevex SA, please contact : [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] need some help with EREGI please

2001-07-15 Thread Andre Bajew

Hi all,

I know I'm doing something dumb but I keep missing it. What I am trying to
do is parse through some text and pick up starting at each font and
ending with each /a.  Starting at a href and ending with /a works
fine. I thought I read the eregi docu thoroughly but maybe not ??

Any help would be appreciated!
Andre

//get a line
  $line = fgets($page, 1024);
  //loop to get all news page links
  /* while(eregi(a.*href=\(.+)\.*.*\/a, $line, $match)) */
  while(eregi(font.*\/a, $line, $match))
{
   //print out the news link
   print(LI);
   $link = ereg_replace(HREF=\, HREF=\http://that domain . com/,
$match[0]);
   print($link);
   print(BR\n);



-- 
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] Anybody using Miva or hosted at Hosting4All?

2001-07-15 Thread Rasmus Lerdorf

If you have a shell account on the box, or if you have a similar box
yourself, you can build the curl extension as a standalone curl.so and
simply dl() it from your script.

eg.

  ./configure your regular configure flags --with-curl=shared
  make

You should then see modules/curl.so which you can dl()

You can get your server's regular configure flags from a phpinfo() call on
it.

-Rasmus

On Sun, 15 Jul 2001, Daniel Baldoni wrote:

 G'day folks,

 We've got a web-application ready to install and everything looks okay except
 that the client has chosen Hosting4all as their web-hoster.  They
 (Hosting4all) don't have a version of PHP linked with cURL and we need to
 process credit card information.  Again, the client has chosen a payment
 processor and, as expected, secure-HTTP is required.

 All fair enough - the payment script has been written and works on our
 servers.  Of course, it'll fail dismally on Hosting4All's servers.

 My question is...

   Is anybody on this list hosting an e-commerce site with Hosting4All?
   Or, has anybody had any experience with the Miva Engine which
   Hosting4All provide free of charge (i.e. as part of the
   subscription fee)?

 Any help would be much appreciated.  Thanks in advance.

 Ciao.




-- 
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] Session Question

2001-07-15 Thread Rasmus Lerdorf

 Warning:
 fopen(/home/tgmalone/sessn-log/0bbaf33ab1c1f9d714e2244459979ec7.txt,a) -
 Permission denied in /home/tgmalone/public_html/index.php on line 17

 The problem is obvious, but I've been searching, searching and wracking my
 inadequate brain for a solution and can't find one - can anyone help me find
 a solution/workaround?

chmod a+w /home/tgmalone/sessn-log/



-- 
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] Session questions

2001-07-15 Thread Jason Rennie

Hi all,

This might be a dumb question but can anybody tell me why on earth this
doesn't work ?

session_start()
$logged_in = session_is_registered(auth);

if($logged_in != true)
{

if(!(pam_auth($usernamelogin,$pass,$error)))
{
// send an error if it doens't login in
}
else
{
session_register($username);
session_register($auth);
$HTTP_SESSION_VARS[username] = $usernamelogin;
$HTTP_SESSION_VARS[auth] = 1;


}

$user = $HTTP_SESSION_VARS[username];
start_page($user's home page);

}

Now the problem is, that although it auth's ok, and username and auth seem
to be set, anytime i try to access $HTTP_SESSION_VARS[username] it is
blank.

Also if i try to use $HTTP_SESSION_VARS[username] directly in a string i
get and error about expecting one of a variety of string types.

Sorry if this is a really dumb question.

Jason


-- 
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]OT I know, but WTF...

2001-07-15 Thread Chris Anderson

: )

- Original Message -
From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 7:10 PM
Subject: Re: [PHP]OT I know, but WTF...


 That the IE6 beta is a beta.

 /* Chris Lambert, CTO - [EMAIL PROTECTED]
 WhiteCrown Networks - More Than White Hats
 Web Application Security - www.whitecrown.net
 */

 - Original Message -
 From: Chris Anderson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; PHP General List (E-mail)
 [EMAIL PROTECTED]
 Sent: Sunday, July 15, 2001 5:35 PM
 Subject: Re: [PHP]OT I know, but WTF...


 | I've actually had an MS representative tell me not to use the IE6 beta.
 | What's that tell you?
 | - Original Message -
 | From: Chris Cocuzzo [EMAIL PROTECTED]
 | To: PHP General List (E-mail) [EMAIL PROTECTED]
 | Sent: Sunday, July 15, 2001 12:08 PM
 | Subject: [PHP]OT I know, but WTF...
 |
 |
 |  hey-
 | 
 |  I know this is off topic, but I figured i'd ask to see if other people
 | were
 |  experiencing similar problems. I'm having trouble accessing web
 | sites/pages
 |  that are secure(https...obviously). I tried changing everything around
 in
 | IE
 |  6, but so far nothing is working...any ideas?
 | 
 |  the error is the normal, annoying, page can't be found or dns error
 bull.
 | 
 |  chris
 | 
 | 
 |  --
 |  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]



-- 
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]OT I know, but WTF...

2001-07-15 Thread Chris Cocuzzo

alright.

i reinstalled the more stable IE5, however I'm still experiencing problems
accessing https sites. any ideas(I went through all the settings too,
nothing seems to work).

chris

-Original Message-
From: Chris Anderson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 10:38 PM
To: Chris Lambert - WhiteCrown Networks; [EMAIL PROTECTED]
Subject: Re: [PHP]OT I know, but WTF...


: )

- Original Message -
From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 7:10 PM
Subject: Re: [PHP]OT I know, but WTF...


 That the IE6 beta is a beta.

 /* Chris Lambert, CTO - [EMAIL PROTECTED]
 WhiteCrown Networks - More Than White Hats
 Web Application Security - www.whitecrown.net
 */

 - Original Message -
 From: Chris Anderson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; PHP General List (E-mail)
 [EMAIL PROTECTED]
 Sent: Sunday, July 15, 2001 5:35 PM
 Subject: Re: [PHP]OT I know, but WTF...


 | I've actually had an MS representative tell me not to use the IE6 beta.
 | What's that tell you?
 | - Original Message -
 | From: Chris Cocuzzo [EMAIL PROTECTED]
 | To: PHP General List (E-mail) [EMAIL PROTECTED]
 | Sent: Sunday, July 15, 2001 12:08 PM
 | Subject: [PHP]OT I know, but WTF...
 |
 |
 |  hey-
 | 
 |  I know this is off topic, but I figured i'd ask to see if other people
 | were
 |  experiencing similar problems. I'm having trouble accessing web
 | sites/pages
 |  that are secure(https...obviously). I tried changing everything around
 in
 | IE
 |  6, but so far nothing is working...any ideas?
 | 
 |  the error is the normal, annoying, page can't be found or dns error
 bull.
 | 
 |  chris
 | 
 | 
 |  --
 |  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]



--
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]OT I know, but WTF...

2001-07-15 Thread Kurt Lieber

I have an idea.  Let's keep this thread off the PHP list.  One OT email
is bad enough -- an entire thread is simply too much.

-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 15, 2001 8:10 PM
To: PHP General List (E-mail)
Subject: RE: [PHP]OT I know, but WTF...


alright.

i reinstalled the more stable IE5, however I'm still experiencing
problems accessing https sites. any ideas(I went through all the
settings too, nothing seems to work).

chris

-Original Message-
From: Chris Anderson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 10:38 PM
To: Chris Lambert - WhiteCrown Networks; [EMAIL PROTECTED]
Subject: Re: [PHP]OT I know, but WTF...


: )

- Original Message -
From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 7:10 PM
Subject: Re: [PHP]OT I know, but WTF...


 That the IE6 beta is a beta.

 /* Chris Lambert, CTO - [EMAIL PROTECTED]
 WhiteCrown Networks - More Than White Hats
 Web Application Security - www.whitecrown.net
 */

 - Original Message -
 From: Chris Anderson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; PHP General List (E-mail) 
 [EMAIL PROTECTED]
 Sent: Sunday, July 15, 2001 5:35 PM
 Subject: Re: [PHP]OT I know, but WTF...


 | I've actually had an MS representative tell me not to use the IE6 
 | beta. What's that tell you?
 | - Original Message -
 | From: Chris Cocuzzo [EMAIL PROTECTED]
 | To: PHP General List (E-mail) [EMAIL PROTECTED]
 | Sent: Sunday, July 15, 2001 12:08 PM
 | Subject: [PHP]OT I know, but WTF...
 |
 |
 |  hey-
 | 
 |  I know this is off topic, but I figured i'd ask to see if other 
 |  people
 | were
 |  experiencing similar problems. I'm having trouble accessing web
 | sites/pages
 |  that are secure(https...obviously). I tried changing everything 
 |  around
 in
 | IE
 |  6, but so far nothing is working...any ideas?
 | 
 |  the error is the normal, annoying, page can't be found or dns 
 |  error
 bull.
 | 
 |  chris
 | 
 | 
 |  --
 |  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]



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




[PHP] Help you with our programming skills and experience

2001-07-15 Thread David Rosen

Hello,

We are a team of experienced programmers with skills
of
PHP/Perl/JAVA/C++/VB/Servlet/JSP/ASP/PowerBuilder/XML/
DHTML/WAP  WML with database of MySQL/MS Access/
MS SQL/ORACLE/DB2/Sybase/Informix.
We are experienced in programming for various  
E-Commerce web site and standalone application,
configuring, installing and debugging troubled
scripts. All will be done in short time
with quality guaranteed. Price is negotiable. We are
interested in various kind projects,contracts and
cooperation.

Pls contact  [EMAIL PROTECTED]  if you are
interested.

Thanks,
David
Some of the applications of our skills:
Web Shop (Shopping cart, online catalogue)
Web Search Engine
Auctions
Banner Exchange
Calendars
Chat
Classified Advertisement
Click Tracking
Communities
Counters
Database Tools
Discussion Boards  Forums
Mailing List
Guestbooks
News Publishing
Polls and Voting
Postcards
Security Systems
User Authentication
Web Traffic Analysis


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.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]




Re: [PHP] but mysql? (was: postgres and php)

2001-07-15 Thread Nuno Silva

hello,

[EMAIL PROTECTED] wrote:

 Hi Nuno!
 On Sat, 14 Jul 2001, Nuno Silva wrote:
 
 
hi there!

the operators you want are ~ and ~* and !~ and !~*.
select name from table where name ~* 'test';

 
 any idea of something like this in MySQL? I was used to pg and I have no idea
 of something equivalent in My.
 



these operators do regexp matches in postgresql. to do this in mysql you 
have the REGEXP operator:
http://www.mysql.com/doc/R/e/Regexp.html

Hope it helps,
Nuno Silva



to see all operators availlable type \do in psql's interactive mode ;)

Regards,
Nuno Silva

Derek wrote:


 -- teodor
 
 



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

2001-07-15 Thread Deependra B. Tandukar

Greetings !

I have a table in mysql:

id item
1 Apple
2 Orange
3 Banana


I displayed all the items in HTML with PHP

form
while ($row=mysql_fetch_array($query)) {
$item=$row[item];
echo 
table
trtdinput type=text value=$item name=item
/td
/tr
/table;
};
/form

Now if I want to capture Banana or any other particular item from the
displayed HTML form, and pass the variable to the next form,  how can I do
it?

Looking forward to hearing from you all.

Warm Regards,
DT


-- 
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: Question about strlen I think

2001-07-15 Thread Dennis Kaandorp

Thank you very much!

Cc Zona [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Dennis Kaandorp) wrote:

  Is there a way to replace the spaces between the paths?
  This is what I mean:
  /uploads//by/   /dennis/
  must become
  /uploads/4sp/by/3spdennis/

 See http://php.net/preg-replace. You can use the e or f modifier to
 count the number of captured spaces and write that number into your
4sp
 replacement pattern.

 --
 CC


-- 
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: Question about strlen I think

2001-07-15 Thread Dennis Kaandorp

argh.. it was to complicated for me :(
Can you help me with this?
$ftpdata['path'] = preg_replace($ftpdata['path']);
Thnx

Cc Zona [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Dennis Kaandorp) wrote:

  Is there a way to replace the spaces between the paths?
  This is what I mean:
  /uploads//by/   /dennis/
  must become
  /uploads/4sp/by/3spdennis/

 See http://php.net/preg-replace. You can use the e or f modifier to
 count the number of captured spaces and write that number into your
4sp
 replacement pattern.

 --
 CC


-- 
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] html in my form? bad things! help help help!

2001-07-15 Thread [EMAIL PROTECTED]

On my site I want people to be able to type HTML into a form. The function
strip_tags(); is great but if a person types:

a href=http://www.someplace.comMy site!/a

(note the omitted  )

it screws up the whole page. Is there a function script some place that will
stop/fix these kind of errors?

Also, is there a function that will check if links in a swatch of text are
any good?


Thanks!

Susan



-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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] Help: PHP 4.0.6 -- PSPELL can't load ASPELL module...

2001-07-15 Thread Garth Dahlstrom

Hi all, 

I've been searching all over for a solution to get pspell
going...  I managed to get 4.06 to build with pspell support
enabled, first I got an error about no dictionaries... 
so I installed aspell - since I read there is a dependancy
of some kind between them, now I have a new problem.

When I execute the example from pspell_suggest
(at http://www.php.net/manual/en/function.pspell-suggest.php)

I get the following output:

Warning: PSPELL couldn't open the dictionary. reason: Unable to load the
aspell module. in /var/www/spell.php on line 2

Warning: 0 is not an PSPELL result index in /var/www/spell.php on line 4

Warning: 0 is not an PSPELL result index in /var/www/spell.php on line 5
Possible spelling: 

My system specs are:
- GNU/Debian 2.2 2.4+ kernel (and a bunch of unstable packages
needed to build 4.06 from unstable)
- libpspell-dev 0.11.2-2.3
- libpspell2   0.11.2-2.3
- ispell   3.1.20-12
- libaspell8   0.32.6-3.4
- aspell   0.32.6-3.4
- libaspell-dev 0.29.1-1
- php4 4.0.6-3

I'm not sure what else to try... 
Any help would be greatly appricated.

-Garth
aka Ironstorm (PHPWidgets http://www.northern.ca/projects/phpwidgets/)

---
http://www.northern.ca



-- 
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] I want to learn this!

2001-07-15 Thread [EMAIL PROTECTED]

on 7/15/01 4:39 PM, Minardi boy at [EMAIL PROTECTED] wrote:


 Are there any books you guys/gals could recommend? Are there (non
 university/school) classes (satisfactory)?

Try: the Oreilly PHP pocket reference. It shows you how to make forms.

Also MySQL from the New Riders has a good chapter on PHP and mySQL

www.webmonkey.com has some good tutorials.

hope this helps!




-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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] Re: html in my form? bad things! help help help!

2001-07-15 Thread [EMAIL PROTECTED]

on 7/16/01 1:47 AM, Ray Dow at [EMAIL PROTECTED] wrote:

 Try a different format that is also easier for the users to type. For
 example;
 a http://somesite.comClick me!/a and then convert that string
 OR
 [link:http://somesite.com]Click me![link]
 
 NEVER let users type HTML straight into a form box, its way too easy to
 screw up your entire site.
 
 (Just for starters i could use iframe to embed anything into the page,
 document.location is another great example of why you should use a different
 system)
 


iframe removed by strip_tags(); isn't it?


-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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] Re: access pop3 without IMAP

2001-07-15 Thread Adrian D'Costa

Hi James,

I past that stage but stuck with messages that are MultiPart/Mixed.  I
need to display the attachments and give the viewer to download or view if
possible.


Adrian

On Sun, 15 Jul 2001, James Tan wrote:

 hi prachait saxena,
 
 I'm trying to build the same too...
 
 u can use the socket function to manupulate pop protocol at port 110
 refer to the rfc link in the documentation for pop :)
 
 hope it helps...
 
 regards,
 
 James
 
 Prachait Saxena wrote:
 
  Hi,
 
  I want to check mail of a pop account. without using imap.
 
  Can any one know how to do that.
 
  kindly send it in details.
  bye
 
  --
 
  Prachait Saxena
  Offical ( [EMAIL PROTECTED] )
  Personal ( [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: REGEXP

2001-07-15 Thread Adrian D'Costa

Hi James,

Thanks for your mail.  But I think the problem like somewhere else.

I have the following:
echo $buffer;
There result :
Content-Type: multipart/mixed; 

This is wrong.  It should be 
Content-Type: multipart/mixed;
 boundary=B42DA66C4EC07C9B572A58FC

I don't know why it is not reading the whole string.  It seems to treat
the *boundary* part as another line.  I read somewhere the perl
compatiable regexp can read a multiply line treating CRLF as part of the
line.

Any pointers

Adrian

On Sun, 15 Jul 2001, James Tan wrote:

 hi,,
 
 u could try using explode function
 eg:
 
 arrayresult = explode(string, separator);
 
 cont = explode(thestring, \);
 
 echo cont[0] ;
 // result as
 Content-Type: multipart/mixed;
  boundary=
 echo cont[1];
 //result as
 B42DA66C4EC07C9B572A58FC
 echo cont[2];
 // array index 2 will be nothing.. null or 
 
 hope it works..
 regards,
 
 James
 
 Adrian D'Costa wrote:
 
  Hi,
 
  I am trying to capture the Header from a mail for my webmail using php and
  pop3.  The header is something like this:
  Content-Type: multipart/mixed;
   boundary=B42DA66C4EC07C9B572A58FC
 
  When I use preg_split(/[\d;]*/, $buffer), I get
  Content-Type: multipart/mixed;
 
  What I want is to return the whole line split by the ;.  I usually try
  to avoid regexp (too lazy) but now I want to use it.  The final result I
  would need is: B42DA66C4EC07C9B572A58FC so that I can search
  in the body of the message for the rest of the parts.
 
  Any pointers would be helpful.
 
  Adrian
 
 


-- 
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: html in my form? bad things! help help help!

2001-07-15 Thread Ray Dow

Everything removed by strip_tags(), including a href=somelinkclick me/a
(you original example)

See the problem?



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 16 July 1979 3:46 PM
 To: Ray Dow; [EMAIL PROTECTED]
 Subject: Re: html in my form? bad things! help help help!
 
 
 on 7/16/01 1:47 AM, Ray Dow at [EMAIL PROTECTED] wrote:
 
  Try a different format that is also easier for the users to 
 type. For 
  example; a http://somesite.comClick me!/a and then convert that 
  string OR
  [link:http://somesite.com]Click me![link]
  
  NEVER let users type HTML straight into a form box, its way 
 too easy 
  to screw up your entire site.
  
  (Just for starters i could use iframe to embed anything into the 
  page, document.location is another great example of why you 
 should use 
  a different
  system)
  
 
 
 iframe removed by strip_tags(); isn't it?
 
 
 -- 
 [EMAIL PROTECTED]
 http://futurebird.diaryland.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]




Re: [PHP] RE: html in my form? bad things! help help help!

2001-07-15 Thread [EMAIL PROTECTED]

on 7/16/01 2:03 AM, Ray Dow at [EMAIL PROTECTED] wrote:

 Everything removed by strip_tags(), including a href=somelinkclick me/a
 (you original example)
 
 See the problem?

Everything isn't removed if you set it up like this:


strip_tags($string,a,i,b)


that part is working fine, it's tags with missing quotes that have me
worried, like this:

a href=http://www.someplace.comMy site!/a



-- 
[EMAIL PROTECTED]
http://futurebird.diaryland.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] Session questions

2001-07-15 Thread Jason Rennie

Hi all,

This might be a dumb question but can anybody tell me why on earth this
doesn't work ?

session_start()
$logged_in = session_is_registered(auth);

if($logged_in != true)
{

if(!(pam_auth($usernamelogin,$pass,$error)))
{
// send an error if it doens't login in
}
else
{
session_register($username);
session_register($auth);
$HTTP_SESSION_VARS[username] = $usernamelogin;
$HTTP_SESSION_VARS[auth] = 1;


}

$user = $HTTP_SESSION_VARS[username];
start_page($user's home page);

}

Now the problem is, that although it auth's ok, and username and auth seem
to be set, anytime i try to access $HTTP_SESSION_VARS[username] it is
blank.

Also if i try to use $HTTP_SESSION_VARS[username] directly in a string i
get and error about expecting one of a variety of string types.

Sorry if this is a really dumb question.

Jason



-- 
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] Session questions

2001-07-15 Thread VFSA-eRentals

try just echoing  $usernamelogin  and see if you can get an out put from that ... it 
could be because $usernamelogin is not getting set 

-Original Message-
From: Jason Rennie [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Session questions


Hi all,

This might be a dumb question but can anybody tell me why on earth this
doesn't work ?

session_start()
$logged_in = session_is_registered(auth);

if($logged_in != true)
{

if(!(pam_auth($usernamelogin,$pass,$error)))
{
// send an error if it doens't login in
}
else
{
session_register($username);
session_register($auth);
$HTTP_SESSION_VARS[username] = $usernamelogin;
$HTTP_SESSION_VARS[auth] = 1;


}

$user = $HTTP_SESSION_VARS[username];
start_page($user's home page);

}

Now the problem is, that although it auth's ok, and username and auth seem
to be set, anytime i try to access $HTTP_SESSION_VARS[username] it is
blank.

Also if i try to use $HTTP_SESSION_VARS[username] directly in a string i
get and error about expecting one of a variety of string types.

Sorry if this is a really dumb question.

Jason



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