Re: [PHP] equivalent to PERL's qq

2001-03-27 Thread Nuno Silva

hi,

try:

?php
$this = "
select *
from xcxcxc
where var='111'";

echo $this;
?

i'd say it's even better than qq ;)

regards,
nuno



Carsten Gehling wrote:

 From: "Michael Hall" [EMAIL PROTECTED]
 Sent: Monday, March 26, 2001 9:36 PM
 
 
 
 Hi.  I'm a converted Perl guy.  While I generally like PHP better than
 
 Perl,
 
 I do severely miss the Perl operator qq, which allowed statements (in my
 case, lengthy SQL statements) to be written on multiple lines.
 
 $this = qq|Select *
 From xsdfs
 Group by date
 Order by id
 |;
 
 Is there anything similar to this in PHP?  I've been unable to find it if
 there is.
 
 
 Check out this page:
 
 http://php.net/manual/en/language.types.string.php
 
 and read the paragraphs about the "here doc"syntax. It might be what you're
 looking for.
 
 - Carsten


--
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] examine inner workings of functions

2001-03-27 Thread David Robley

On Tue, 27 Mar 2001 12:59, Jack Dempsey wrote:
 hi all,

 I was thinking about some of the built-in functsions (like array_sort)
 and was wondering how I could find out what the code is behind them.
 ie, is it an insertion sort? quicksort? etc...do i have to look into
 CVS for that? thanks!

 -jack

Try your luck in ext/standard/array.c in the distribution tarball - 
search on sort.

-- 
David Robley| WEBMASTER  Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] File upload and database optimization questions

2001-03-27 Thread Jason Lotito


  3. At the time of upload, it is possible to specify a list of
  users who can "view" and "modify" the file. Currently I am storing
  this list as a whitespace-separated list in a mySQL TEXT column.
 
  Column "view" data: 3 11 1
 
  At the time of displaying the list, I first SELECT * the entire list
  of files, and then use explode() in combination with a "for" loop to
  split up the "view" field and match each element againt the current
  user's ID. Only if a match is found will I display the filename.
 
  I suspect this approach is not optimal. Can anyone suggest a
  better approach?

 Rather than a whitespace-separated list, store one ID as a "|ID|". So
 your field might look like:

 Column "view" data:  '|3||11||1|'

 That way, knowing the user's ID who is viewing docs, you can select
 blah blah WHERE view LIKE '|$thisusersidnumber|' ... no longer
 any need to step through and explode the array.

 Jason

No.. very bad.  Not good.  I suggest that you read this article on database
optimization (not to sound rude, but I honestly think you might learn
something, heck, I did when I was writing it =)):
http://www.newbienetwork.net/sections.php?op=viewarticleartid=17

Using what you described above with the ||, you have already broken the
first normal form.  Serious problems can develop from that implementation.
Rathers, use this format:

document_id users_allowed
--- -
001 1
002 2
003 1
003 2
003 3

Basically the primary key is in fact both the docid and users_allowed
columns.  This was is the proper way of displaying the above information.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.


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

2001-03-27 Thread Daniel B I

Yep, I had the same problem yesterday with the mail.
Try to just put a semicolon ";" in front of the sendmail path
directive :). It worked with mine! It seems that it wants to find the
path itself.

Daniel BI

Hi ,
I'm at a lossI've searched throught the knowledgebase, archives, docs,
etc but I can't figure out what's going on.  The problem is when using the
mail() function nothing gets send and I don't get any error messages
either.
It's like the message gets eaten by a black hole.
I already put "-t -i" in the path, but still doesn't work ..
Anybody can help me ?
Regards,
Atet Sugiharto


-- 
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 as a general scripting language?

2001-03-27 Thread Gildas Quiniou

Hi,

What are the pros and cons to using PHP as a scripting language like Perl or
Python?

After a couple of years using this excellent language for dynamic web pages
(its first purpose), I'm currently starting to program shell scripts with
PHP. Doing so I encountered some minor problems I turned around like the
need to have 2 .ini files, one for web programming and another for shell
scripting: for instance I don't want error messages cluttered with HTML tags
on shell scripts but I need them for web PHP scripts and so on. Some
behaviors are also missing like the ability to fork() a process for
instance.

Before going too far, I would like to know what other PHP users/gurus think
about using PHP as a general scripting language, what should be avoided and
what are the drawbacks I should take care of. Before someone ask me why not
use Perl or Python: I don't like Perl, I prefer Python, I use it too but I'm
not as easy with it as I am with PHP and I'd prefer put all my efforts in a
single language if it can bring me all I expect...

Thanks for any suggestion, idea, comments.

--Gildas.

--
/-*-\
| Systèmes  Technologies | Tél: +33 2 96438787 |
| Informatiques du Ponant | Fax: +33 2 96438788 |
| 27, rue Auguste Brizeux | email:   [EMAIL PROTECTED] |
| 22200 Guingamp - France | web: http://www.stip.fr |
\-*-/



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

2001-03-27 Thread Søren Boll Overgaard

Hello

I am trying to figure out how long a session survives, if the user does
nothing in his or her browser, to update the session. I'm creating a rather
comprehensive signup-process, and I need to know how much time a user can
spend on each page, before the session expires.

Looking through php.ini left me somewhat confused, as I can't determine
which of the following parameters control sessiontimeouts.

session.cookie_lifetime   = 0   ; lifetime in seconds of cookie
; or if 0, until browser is restarted

Apparantly this just controls the cookies lifetime, however, if the
GC-process cleans up the sessions before the cookie times out, obviously the 
session will be destroyed.

As far as I can see, the gc-process is controlled by this directive:

session.gc_maxlifetime= 1440; after this number of seconds, stored
; data will be seen as 'garbage' and
; cleaned up by the gc process


So, does this mean that the session will persist for 1440 seconds, with the
above directives inserted in php.ini?

Thanks in advance.

-- 
Sren O.

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

2001-03-27 Thread Daniel B I

You need the jpeg support. Shortly, do this:
(I will use my version names, so you can easyly
find something, if you find newer ones, it's your bussiness)

1. search the internet for: 
jpegsrc.v6b.tar.gz 
gd-1.8.3.tar.gz
apache_1.3.14.tar.gz
php-4.0.4.tar.gz

2. unzip all files in a tmp directory (let's say /tmp ):
tar zxvf jpegsrc.v6b.tar.gz 
the same for gd, php, apache...

3. modify the 'Makefile' of the jpeg kit, to meet your requirements
(only the paths to be correct, as your are)
then issue: 
 ./configure --enable-shared --enable-static
then
 make 
 make install

4. modify the gd Makefile:
out there the your paths and uncomment the 'CFLAGS' line that 
enables the jpeg support (something like CFLAGS -DHAVE ljpeg)
then issue:
 make
 make install

5. now configure php and apache and compile them. it should work.
it took me alot these days to discover all of this..

I hope it helps.

Daniel BI




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




[PHP] GD problem

2001-03-27 Thread Daniel B I

It.s me, again :)
There is trick to find out if php will be compiled well
(I mean with jpeg support):

when issuing the ./configure command in php,
after putting all the options, put something like this:
./configure ...  cf.log

(this is a redirection comand to write all output info
to the file named cf.log so that you could review it
afterwards. excuse me if you knew it :)

in this way you can examine after the configuration
process what was done (it does it so quickly that I
cannot see all it does, so this way I can).
If all is ok, you should see in that log something like:

.ImageCreateFromJpeg:  yes

If it says no, don't bother yourself by issuing the make
and make install commands. review the previous jpeg
and gd installations and try again.

Daniel BI


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




[PHP] Connect local-remote

2001-03-27 Thread Jochen Kaechelin

how can I connect to a remote-database from
my local dos-window?

I use the following without success:

mysql -u XXX -h mysql-XXX -p -D 


Jochen Kaechelin

-- 
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-CVS] cvs: php4 /pear/Experimental/XML fo2pdf.php

2001-03-27 Thread Christian Stocker

chregu  Tue Mar 27 01:53:00 2001 EDT

  Added files: 
/php4/pear/Experimental/XML fo2pdf.php 
  Log:
  a class for rendering (xsl-)formatting objects files into a pdf.
  
  

Index: php4/pear/Experimental/XML/fo2pdf.php
+++ php4/pear/Experimental/XML/fo2pdf.php
?php
// +--+
// | PHP version 4.0  |
// +--+
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
// +--+
// | This source file is subject to version 2.0 of the PHP license,   |
// | that is bundled with this package in the file LICENSE, and is|
// | available at through the world-wide-web at   |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to  |
// | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
// +--+
// | Authors: Christian Stocker [EMAIL PROTECTED] |
// +--+
//
// $Id: fo2pdf.php,v 1.1 2001/03/27 09:53:00 chregu Exp $


/**
* fo to pdf converter.
*
* with fo (formating objects) it's quite easy to convert xml-documents into
*  pdf-docs.
* 
* An introduction into formating objects can be found at
*  http://www.w3.org/TR/xsl/slice6.html#fo-section
*
* The way to use this class is, produce a fo-file from a xml-file with a
* xsl-stylesheet, then feed this class with this fo-file and you get a pdf
* back (either directly to the browser for really dynamic-pdf production or
* as a file on your filesystem)
*
* It is recommended to use the Cache-Classes from PEAR, if you want dynamic
* pdf production, since the process of making the pdfs takes some time. For
* an example of how to  use Cache and fo2pdf see below.
*
* Requirements:
*
*  You need Fop from the xml-apache project (http://xml.apache.org/fop) and
*   Java (1.1.x or later, i tested it with 1.2.2 from sun on linux, see the
*   Fop-Docs for details).
*  Furthermore you have to compile your php with --with-java and to adjust
*   your php.ini file. It can be a rather painful task to get java and php
*   to work together.
*   See http://www.phpbuilder.com/columns/marknold20001221.php3 or 
*   http://www.linuxwebdevnews.com/articles/php-java-xslt.php?pid=347
*   for more details about java and php or ask me, if you're stuck (especially  *  
 with linux. windows is not my area..)
*
* Todo:
*  - Errordetection
*  - Use embedding instead of org.apache.fop.apps.CommandLine-
* this way, we maybe do not have to write temp-files and
* we can render other stuff than only pdf (txt,pcl,ps,...)
* see http://xml.apache.org/fop/embedding.html for details
*
* Usage:
*
*//make a pdf from simple.fo and save the pdf in a tmp-folder
*$fop = new xml_fo2pdf("simple.fo");
*//print pdf to the outputbuffer,
*// including correct Header ("Content-type: application/pdf")
*$fop-print_pdf();
*//delete the temporary pdf file
*$fop-delete_pdf();
*
*   With Cache:
*
*require_once("Cache/Output.php");
*$container = "file";
*$options = array("cache_dir"="/tmp/");
*$cache = new Cache_Output("$container",$options);
*$cache_handle = $cache-generateID($REQUEST_URI);
*if ($content = $cache-start($cache_handle)) {
*  $cache-printContentTypeHeader();
*  print $content;
*  print "pCache hit/p";
*  die();
*}
*$cache-SetContentType("application/pdf");
*$fop = new xml_fo2pdf("simple.fo");
*$fop-print_pdf();
*$fop-delete_pdf();
*print $cache-end("+30");
*
* @author   Christian Stocker [EMAIL PROTECTED]
* @version  $Id: fo2pdf.php,v 1.1 2001/03/27 09:53:00 chregu Exp $
* @package  XML
*/

class XML_fo2pdf {

/**
* fo-file used in this class
*
* @var  string
*/
var $fo;

/**
* pdf-file used in this class
*
* @var  string
*/
var $pdf;

/**
* Where the temporary fo and pdf files should be stored
*
* @var  string
*/
var $tmpdir = "/tmp";

/**
* A prefix for the temporary files
*
* @var  string
*/
var $tmppdfprefix = "pdffo";


/**
* constructor
* One can pass an input fo-file already here (the other possibility
* is with the run or run_from_string method).
*  and if the pdf should be stored permanently, a filename/path for
*  that can also be passed here.
*
* @params string file input fo-file

[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c

2001-03-27 Thread Romolo Manfredini

romolo  Tue Mar 27 02:22:32 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/pgsql pgsql.c 
  Log:
  
  pg_close was closing connection twice, pls insert in 4_0_5
  
  
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.93 php4/ext/pgsql/pgsql.c:1.93.2.1
--- php4/ext/pgsql/pgsql.c:1.93 Sun Feb 25 22:07:12 2001
+++ php4/ext/pgsql/pgsql.c  Tue Mar 27 02:22:32 2001
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.93 2001/02/26 06:07:12 andi Exp $ */
+/* $Id: pgsql.c,v 1.93.2.1 2001/03/27 10:22:32 romolo Exp $ */
 
 #include stdlib.h
 
@@ -501,7 +501,8 @@
 PHP_FUNCTION(pg_close)
 {
zval **pgsql_link = NULL;
-   int id;
+   void *ptr;
+   int id, type;
PGconn *pgsql;
PGLS_FETCH();

@@ -527,6 +528,10 @@
 
if (id==-1) { /* explicit resource number */
zend_list_delete(Z_RESVAL_PP(pgsql_link));
+   ptr = zend_list_find(Z_RESVAL_PP(pgsql_link),type);
+   if (ptr  (type==le_link || type==le_plink)) {
+   RETURN_TRUE;
+   }
}
 
if (id!=-1 



-- 
PHP CVS Mailing List (http://www.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-CVS] cvs: php4 /main php_variables.c

2001-03-27 Thread Jani Taskinen

sniper  Tue Mar 27 03:34:51 2001 EDT

  Modified files:  
/php4/main  php_variables.c 
  Log:
  Fix the arg_separator behaviour. Only  or ; is allowed as separators so no need to 
use the ini setting here.
  
Index: php4/main/php_variables.c
diff -u php4/main/php_variables.c:1.21 php4/main/php_variables.c:1.22
--- php4/main/php_variables.c:1.21  Sun Feb 25 22:07:31 2001
+++ php4/main/php_variables.c   Tue Mar 27 03:34:51 2001
@@ -277,13 +277,7 @@
return;
}
 
-   if (arg == PARSE_COOKIE) {
-   var = php_strtok_r(res, ";", strtok_buf);
-   } else if (arg == PARSE_POST) {
-   var = php_strtok_r(res, "", strtok_buf);
-   } else {
-   var = php_strtok_r(res, PG(arg_separator), strtok_buf);
-   }
+   var = php_strtok_r(res, ";", strtok_buf);
 
while (var) {
val = strchr(var, '=');
@@ -294,18 +288,13 @@
php_url_decode(var, strlen(var));
val_len = php_url_decode(val, strlen(val));
php_register_variable_safe(var, val, val_len, array_ptr ELS_CC 
PLS_CC);
-   }
-   if (arg == PARSE_COOKIE) {
-   var = php_strtok_r(NULL, ";", strtok_buf);
-   } else {
-   var = php_strtok_r(NULL, PG(arg_separator), strtok_buf);
}
+   var = php_strtok_r(NULL, ";", strtok_buf);
}
if (free_buffer) {
efree(res);
}
 }
-
 
 
 void php_import_environment_variables(zval *array_ptr ELS_DC PLS_DC)



-- 
PHP CVS Mailing List (http://www.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-DB] Re: How to print last row in an array using WHILE?

2001-03-27 Thread andreas \(@work\)

hi,

$myrow = mysql_fetch_array($result); // erase this line

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


greetings 

andreas








- Original Message - 
From: "Jon Valvatne" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 1:28 PM
Subject: [PHP-DB] Re: How to print last row in an array using WHILE?


What you are missing is the first row, not the last row.

To explain:

mysql_fetch_row() operates with an internal pointer which moves one step
down the result set with each call to the function. The first time it is
called, it returns the first row, and moves its pointer to the second row.
The second time it is called, it returns the second row, and moves its
pointer to the third row. And so on. When it gets to the end, it returns
false.

Your while() structure is exactly what's needed to iterate through the
result set. But because you call mysql_fetch_row() once before starting
the while loop, the first row disappears. When the while loop starts, the
internal pointer points to the second row.

So just remove the first mysql_fetch_row() call, and it should work fine.


Jon Valvatne


On Mon, 26 Mar 2001, Bob Stone wrote:

 Dear PHP Helpers,

 I have an array created by an mysql select statement.

 I have the code to display the "rows" from the select
 statement.

 Everything works fine except that only n-1 rows from
 the array will display.

 For example if the array contains four rows only three
 will display. If the array contains one row, nothing
 displays on the screen.

 I understand that a WHILE loop will count down to zero
 and then since it becomes false will quit, but how do
 I get the last (or first) row to print?

 Here is the code:

 HTML

 HEAD

 TITLE/TITLE

 /HEAD

 BODY BGCOLOR="#FF" TEXT="#00" LINK="#FF"
 VLINK="#800080"

 ?php

 $db = mysql_connect("localhost" , "phpuser" ,
 "phpuser");

 mysql_select_db("SVT",$db);

 // display individual record

 if ($user_name) {

$result = mysql_query("SELECT * FROM svt_members
 WHERE user_name='$user_name'",$db);

$myrow = mysql_fetch_array($result);

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

 printf("Full Name: bfont color=\"green\"
 size=\"5\"%s %s %s %s\nbr/b/font",
 $myrow["salutation"], $myrow["first_name"],
 $myrow["mid_name"], $myrow["user_name"]);

 printf("Credentials and Degrees: bfont
 color=\"blue\" size=\3\"%s/font/b   Job Title:
 bfont color=\"blue\"
 size=\3\"%s/font/bbrCompany/Institution:
 bfont color=\"blue\"
 size=\3\"%sbr/font/bAddress: bfont
 color=\"blue\" size=\3\"%s %sbr/font/bCity:
 bfont color=\"blue\" size=\3\"%s/font/b
 State/Provence: bfont color=\"blue\"
 size=\3\"%sbr/font/bCountry: bfont
 color=\"blue\" size=\3\"%s/font/b   Postal Code:
 bfont color=\"blue\"
 size=\3\"%sbr/font/bVoice: bfont
 color=\"blue\" size=\3\"%s/font/b   Fax: bfont
 color=\"blue\" size=\3\"%sbr/font/bE-mail:
 bfont color=\"blue\" size=\3\"%s\nP/b/font",
 $myrow["cert_deg"], $myrow["job_title"],
 $myrow["institution"], $myrow["address_1"],
 $myrow["address_2"], $myrow["geo_loc"],
 $myrow["state"], $myrow["country"], $myrow["zip"],
 $myrow["phone"], $myrow["fax"], $myrow["e_mail"]);

 }

 }
 ?

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

 Enter Last Name To Search:  input type="Text"
 name="user_name"p

 input type="Submit" name="submit" value="Click To
 Search"

 /form

 /BODY

 /HTML

 Thank you very much for your help.

 Best regards,

 Bob Stone

 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/?.refer=text



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



-- 
PHP 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 on manually instantiating a file download

2001-03-27 Thread Vikram Vaswani

Hello all,

I am working on a script which locates a file on the system and then tells
the browser to pop open the "Save As" dialog box for download. In order to
do this, I am using the following code:

$filename = $dataDir . $id . ".dat";
header ("Content-Type: application/octet-stream"); 
header ("Content-Disposition: attachment; filename=$filename"); 
readfile($filename); 

This works fine - however, I would like to redirect the browser to another
page once the download is complete (or once it starts). I have tried adding a 

header("Location:next.php")

line to the end of the script above, but it has no effect whatsoever (after
the download is complete, the browser displays an hourglass as though
waiting for something). Do I need to send some kind of "end-of-download"
header...or something else?

Can anyone suggest some possible solutions to this problem?

Please CC a copy of your response to 

[EMAIL PROTECTED] 

as well as the list (as I will be working on this @ home also and do not
have access to the full digest there)

Any help will be much appreciated. TIA,

Vikram Vaswani
--
Sex is like air. It's only a big deal if you can't get any.

-- 
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] We need PHP developers - Urgently in the UK

2001-03-27 Thread Paul Tweedy


Sorry for the repeat posting, but this was send a few weeks ago and we had
no response from the list - perhaps new subscribers to the list will be
interested.

We are a successful web agency based in the UK and are looking for talented
UK-based html and technical developers.

Our company 5e, has progressed from two to almost twenty people over the
last couple of years, working with an excellent client list with well known
brands. We utilise a variety of platforms for development, including an
increasing emphasis on Linux/PHP/MySQL to deliver high-profile web
applications.

Due to continued expansion, we are now looking for in-house permanent
html-ers and technical developers (sorry freelance not possible). We have
excellent facilities, the latest kit and have eventful after-hours socials.
You may even get the opportunity to write for internet magazines when they
ask us to review web sites!

Your core skills will include PHP/Perl, MySQL (or a similar RDBMS), Apache
configuration, and a general enthusiasm for Linux and open-source software.
Knowledge of other languages and platforms (Lasso, Win2K, MacOSX) is also an
advantage.

Take a look at our site http://www.5emedia.net to see what we're up to. If
you think you fit the bill, we'd love to hear from you - email us at
[EMAIL PROTECTED].

Best regards,

Paul Tweedy
5emedia Limited

The web development team that walked away with two (count 'em, TWO) BT
eBusiness Innovation Awards!
__
Bedford Heights - Manton Lane - Bedford - MK40 7PA

Tel: 01234 402500 (International: +44 1234 402500)
Fax: 01234 244541

Email: [EMAIL PROTECTED]
www: http://www.5emedia.net
___
internet sites -  ecommerce - screensavers - multimedia

DISCLAIMER

The opinions expressed in this email are not necessarily the opinion of
5emedia Limited.

The content of this e-mail contains proprietary information which is
confidential and may be legally privileged. It is for the intended recipient
only. If an addressing or transmission error has misdirected this email,
please notify the author by replying to this email and informing them of
this matter as soon as possible. If you are not the intended recipient you
must not use, disclose, distribute, copy, print or rely in any way on the
information in this email. In addition, you must erase all of the
information contained in this email immediately after notifying the author.


-- 
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] GZip + NS + Print = Trouble

2001-03-27 Thread Renze Munnik

Okay

ob_start ("ob_gzhandler") is a very cool thing to use. At least when
you write _to much_ code like I do. And it works perfectly

most of the time, i.e.

I've got this problem:

My pages start with the gzhandler (see above) to decrease the amount
of data that should be transferred. Nicest thing is that if your
browser doesn't support any compression, the data will be sent
uncompressed. Very cool. But then Netscape... It understand gzip.
Yes it does but they forgot something. At the point that you want to
print out the page your looking at in your browser, Netscape forgets
to unzip the data. Guess what... a whole lot of crap on the paper.
Well not very much ofcourse _BECAUSE IT'S COMPRESSED!!!_

I don't realy like this bug and I'm wondering if someone maybe has
some solution for this


RenzE

-- 
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] escape sequences not recognized inside an .html

2001-03-27 Thread Jason Stechschulte

On Sat, Mar 24, 2001 at 09:06:36PM -0500, Mauricio Junqueira wrote:
 Hi,
 I believe I am missing some configuration regarding my apache becouse 
 I can only get php to work inside a file .php. 
 If my page extension is .html, nothing happend with the php script; but 
 just changing from .html to .php everthing works fine.
 Anyone? Anyhelp?

If you ar using a *nix system, you probably need to add:

AddType application/x-httpd-php .html

to you httpd.conf

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
/* we have tried to make this normal case as abnormal as possible */
 -- Larry Wall in cmd.c from the perl source code

-- 
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] PostgreSQL and PHP - some Great Bridge news

2001-03-27 Thread Ned Lilly

All,

I'm pleased to announce two initiatives at Great Bridge aimed at
improving the integration of PostgreSQL and PHP, and some exciting
stuff that we're doing as a company to get behind PHP more fully.

First, Great Bridge is partnering with Zend Technologies to include
a fully-integrated installation of PHP in an upcoming Web
developer's edition of Great Bridge PostgreSQL.  In addition to
professionally-supported PHP (and other open source Web
technologies), we'll also give our customers the chance to purchase
Zend's value-added PHP tools (IDE, cache, encoder, and more...)
Zend  is a major contributor to the open source PHP effort, and
we're very happy to be working with them.

Secondly, we're pleased to announce that three PHP core developers
have joined the Great Bridge advisory committee- Rasmus Lerdorf, the
creator of PHP; Thies Arntzen, an expert in PHP-database
connectivity; and Sascha Schumann, PHP author and provider of
high-performance webchat solutions.  Rasmus, Thies, and Sascha will
work with us to help craft our Web developer products and services,
including (of course) a fully optimized free download package.
We'll be putting some development energy into the PHP-Postgres
interface, and look for other ways the two open source projects can
help each other.

We're also very interested in hacker feedback as to what you'd like
to see in a software and service package that revolves around the
Web development "stack."  What kind of tools, building blocks, and
applications would you like to see commercially supported?  Don't be
shy - please email me at [EMAIL PROTECTED] with any suggestions.
I'll also be at ApacheCon in a few weeks if you'd like to get
together in person.

Thanks,
Ned

--

Ned Lilly e: [EMAIL PROTECTED]
Vice Presidentw: www.greatbridge.com
Evangelism / Hacker Relationsv: 757.233.5523
Great Bridge, LLCf: 757.233.


-- 
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] Dynamic constant names

2001-03-27 Thread Geoff Caplan

Hi folks

I am trying to create a constant name dynamically and then get at the
value.

// We set up the constant
define( CONSTANT_1 , "Some value" ) ;

// Later we try to use it dynamically ...
$constant_number = 1 ;
$constant_name = ( "CONSTANT_" . $constant_number ) ;

// We try to assign the constant value to a variable...
$constant_value = $constant_name ;

But we find that $constant value still contains the NAME of the
constant, and not the VALUE.

Am I misunderstanding something? Is there any way that this can be done?

Thanks

Geoff Caplan
Caplan Associates



-- 
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] A ToDo/ task list

2001-03-27 Thread Harshdeep S Jawanda

Hi ppl,

I have been thinking of using PHP to make a ToDo/task list type of
application. I am looking for something different from the usual
Personal Information Managers (PIMs) - they are oriented more towards
appointments than tasks.

Does anybody know of any ongoing (preferably open source) projects in
PHP of a similar nature?

I would like to be able to open/create a task, maybe assign it to
somebody, be able to add comments to it, have user authentication and
the most desired (though uncommon) feature is: a change log. Through a
change log, I want to be able to trace the who and when of comments
added to a task etc.

Any help/pointers will be highly appreciated. Thanks,

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Dynamic constant names

2001-03-27 Thread Neil Kimber

You need another level of indirection. Try:

$constant_value = $$constant_name ;


-Original Message-
From: Geoff Caplan [mailto:[EMAIL PROTECTED]]
Sent: 27 March 2001 14:19
To: PHP General List
Subject: [PHP] Dynamic constant names


Hi folks

I am trying to create a constant name dynamically and then get at the
value.

// We set up the constant
define( CONSTANT_1 , "Some value" ) ;

// Later we try to use it dynamically ...
$constant_number = 1 ;
$constant_name = ( "CONSTANT_" . $constant_number ) ;

// We try to assign the constant value to a variable...
$constant_value = $constant_name ;

But we find that $constant value still contains the NAME of the
constant, and not the VALUE.

Am I misunderstanding something? Is there any way that this can be done?

Thanks

Geoff Caplan
Caplan Associates



-- 
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] A ToDo/ task list

2001-03-27 Thread techzeus

I think Sourceforge uses something like what you are talking about.

Check it out :

http://www.sourceforge.net 

- Original Message - 
From: "Harshdeep S Jawanda" [EMAIL PROTECTED]
To: "PHP General" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 9:29 PM
Subject: [PHP] A ToDo/ task list


 Hi ppl,
 
 I have been thinking of using PHP to make a ToDo/task list type of
 application. I am looking for something different from the usual
 Personal Information Managers (PIMs) - they are oriented more towards
 appointments than tasks.
 
 Does anybody know of any ongoing (preferably open source) projects in
 PHP of a similar nature?
 
 I would like to be able to open/create a task, maybe assign it to
 somebody, be able to add comments to it, have user authentication and
 the most desired (though uncommon) feature is: a change log. Through a
 change log, I want to be able to trace the who and when of comments
 added to a task etc.
 
 Any help/pointers will be highly appreciated. Thanks,
 
 --
 Regards,
 Harshdeep Singh Jawanda.
 
 
 
 -- 
 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] escape sequences not recognized inside an .html

2001-03-27 Thread Mauricio Junqueira

I've check the other articles and came up with the following:
1- take out the extension, html or php, inside the links in way
that I can change from .html to .php and vice-versa without worrie
to change all links.
2- and to add the .html to httpd.conf in order to all files to be parsed.

Not too beatifull but so far, I'm a litte too short in html/php and this is
going to help me to finish the job.

At first, I though that the apache it itself called php and it finds the 
escape sequence, not that the entirely file has to be parsed by php.

Thanks for your replays

Mauricio Junqueira 


wrote:

 Hi,
 I believe I am missing some configuration regarding my apache becouse
 I can only get php to work inside a file .php.
 If my page extension is .html, nothing happend with the php script; but
 just changing from .html to .php everthing works fine.
 Anyone? Anyhelp?
 
 I'm new over php. I usually do stuff with Delphi/Builder and now I'm
 moving to web oriented programs.
 
 Thanks for looking!
 
 Mauricio Junqueira
 Mautec Corp.
 


-- 
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] Dynamic constant names -SOLVED

2001-03-27 Thread Geoff Caplan

Hi folks

I had 2 suggestions from the list:

1) indirection - $constant_value = $$constant_name ;

I had already tried this, but couldn't get it to work. Unless I am
missing something it just gives an "Undefined Variable" error.

2) eval("\$constant_value = $constant_name;") ;

This does work. Thanks Paul!

Geoff Caplan



-- 
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-CVS] cvs: php4(PHP_4_0_5) /main php_variables.c

2001-03-27 Thread Jani Taskinen

sniper  Tue Mar 27 06:03:03 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/main  php_variables.c 
  Log:
  MFH
  
Index: php4/main/php_variables.c
diff -u php4/main/php_variables.c:1.21 php4/main/php_variables.c:1.21.2.1
--- php4/main/php_variables.c:1.21  Sun Feb 25 22:07:31 2001
+++ php4/main/php_variables.c   Tue Mar 27 06:03:03 2001
@@ -277,13 +277,7 @@
return;
}
 
-   if (arg == PARSE_COOKIE) {
-   var = php_strtok_r(res, ";", strtok_buf);
-   } else if (arg == PARSE_POST) {
-   var = php_strtok_r(res, "", strtok_buf);
-   } else {
-   var = php_strtok_r(res, PG(arg_separator), strtok_buf);
-   }
+   var = php_strtok_r(res, ";", strtok_buf);
 
while (var) {
val = strchr(var, '=');
@@ -294,18 +288,13 @@
php_url_decode(var, strlen(var));
val_len = php_url_decode(val, strlen(val));
php_register_variable_safe(var, val, val_len, array_ptr ELS_CC 
PLS_CC);
-   }
-   if (arg == PARSE_COOKIE) {
-   var = php_strtok_r(NULL, ";", strtok_buf);
-   } else {
-   var = php_strtok_r(NULL, PG(arg_separator), strtok_buf);
}
+   var = php_strtok_r(NULL, ";", strtok_buf);
}
if (free_buffer) {
efree(res);
}
 }
-
 
 
 void php_import_environment_variables(zval *array_ptr ELS_DC PLS_DC)



-- 
PHP CVS Mailing List (http://www.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] free webspace supporting PHP/MySQL

2001-03-27 Thread Alaiddin Tayeh

Hi,
is there any comapany (like freeservers.com and geocities.com)give a
free web space and supporting PHP/MySQL.
Thanks
--
Best Regards
Alaiddin Tayeh;
Webmaster
Palestinian Internet Services
WWW.P-I-S.COM
Tel: +97272843197
Fax: +97272843377



-- 
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] free webspace supporting PHP/MySQL

2001-03-27 Thread Rosen

Hi,
The adress is:
www.f2s.com

Rosen Marinov


"Alaiddin Tayeh" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 is there any comapany (like freeservers.com and geocities.com)give a
 free web space and supporting PHP/MySQL.
 Thanks
 --
 Best Regards
 Alaiddin Tayeh;
 Webmaster
 Palestinian Internet Services
 WWW.P-I-S.COM
 Tel: +97272843197
 Fax: +97272843377



 --
 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] A ToDo/ task list

2001-03-27 Thread A.T.Z.


Does anybody know of any ongoing (preferably open source) projects in
PHP of a similar nature?

Seen something on www.php.net just click links and projects.

Bye,



B.


-- 
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-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-03-27 Thread Dan Kalowsky

kalowskyTue Mar 27 06:17:53 2001 EDT

  Modified files:  
/php4/ext/odbc  php_odbc.c 
  Log:
  Fix for Bug #9272, as submitted by marc boeren ([EMAIL PROTECTED]).
  Applied by me, due to apparently a lack of cvs access to ext/odbc for him.
  
  
  
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.73 php4/ext/odbc/php_odbc.c:1.74
--- php4/ext/odbc/php_odbc.c:1.73   Fri Mar  9 15:44:55 2001
+++ php4/ext/odbc/php_odbc.cTue Mar 27 06:17:52 2001
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: php_odbc.c,v 1.73 2001/03/09 23:44:55 fmk Exp $ */
+/* $Id: php_odbc.c,v 1.74 2001/03/27 14:17:52 kalowsky Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -2157,15 +2157,15 @@
int i;
int type;
int is_pconn = 0;
+   int found_resource_type = le_conn;
ODBCLS_FETCH();
 
 if (zend_get_parameters_ex(1, pv_conn) == FAILURE) {
WRONG_PARAM_COUNT;
}
 
-   conn = (odbc_connection *) zend_fetch_resource(pv_conn, -1, "ODBC-Link", NULL, 
1, le_conn);
-   if(!conn){
-   ZEND_FETCH_RESOURCE(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", 
le_pconn);
+   conn = (odbc_connection *) zend_fetch_resource(pv_conn, -1, "ODBC-Link", 
+found_resource_type, 2, le_conn, le_pconn);
+   if (found_resource_type==le_pconn) {
is_pconn = 1;
}
 



-- 
PHP CVS Mailing List (http://www.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: How do you get rid of these warnings for undefined variables?

2001-03-27 Thread Anyangwe, Tanwani

Warning: Undefined index: make in C:\PHP\Test_Scripts\testdb3.php on line 16

Warning: Undefined variable: user in C:\PHP\Test_Scripts\testdb3.php on line
5
etc.

-- 
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-CVS] cvs: php4 /pear/Experimental/XML fo2pdf.php

2001-03-27 Thread Christian Stocker

chregu  Tue Mar 27 06:35:22 2001 EDT

  Modified files:  
/php4/pear/Experimental/XML fo2pdf.php 
  Log:
  corrected Usage example
  
  
Index: php4/pear/Experimental/XML/fo2pdf.php
diff -u php4/pear/Experimental/XML/fo2pdf.php:1.1 
php4/pear/Experimental/XML/fo2pdf.php:1.2
--- php4/pear/Experimental/XML/fo2pdf.php:1.1   Tue Mar 27 01:53:00 2001
+++ php4/pear/Experimental/XML/fo2pdf.php   Tue Mar 27 06:35:21 2001
@@ -15,7 +15,7 @@
 // | Authors: Christian Stocker [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: fo2pdf.php,v 1.1 2001/03/27 09:53:00 chregu Exp $
+// $Id: fo2pdf.php,v 1.2 2001/03/27 14:35:21 chregu Exp $
 
 
 /**
@@ -46,7 +46,8 @@
 *   to work together.
 *   See http://www.phpbuilder.com/columns/marknold20001221.php3 or 
 *  http://www.linuxwebdevnews.com/articles/php-java-xslt.php?pid=347
-*  for more details about java and php or ask me, if you're stuck (especially  *  
 with linux. windows is not my area..)
+*  for more details about java and php or ask me, if you're stuck 
+*   (especially with linux. windows is not my area..)
 *
 * Todo:
 *  - Errordetection
@@ -56,7 +57,7 @@
 * see http://xml.apache.org/fop/embedding.html for details
 *
 * Usage:
-*
+*require_once("XML/fo2pdf.php");
 *//make a pdf from simple.fo and save the pdf in a tmp-folder
 *$fop = new xml_fo2pdf("simple.fo");
 *//print pdf to the outputbuffer,
@@ -66,26 +67,24 @@
 *$fop-delete_pdf();
 *
 *   With Cache:
-*
+*require_once("XML/fo2pdf.php");
 *require_once("Cache/Output.php");
 *$container = "file";
 *$options = array("cache_dir"="/tmp/");
 *$cache = new Cache_Output("$container",$options);
 *$cache_handle = $cache-generateID($REQUEST_URI);
 *if ($content = $cache-start($cache_handle)) {
-*  $cache-printContentTypeHeader();
+*  Header("Content-type: application/pdf");
 *  print $content;
-*  print "pCache hit/p";
 *  die();
 *}
-*$cache-SetContentType("application/pdf");
 *$fop = new xml_fo2pdf("simple.fo");
 *$fop-print_pdf();
 *$fop-delete_pdf();
 *print $cache-end("+30");
 *
 * @author   Christian Stocker [EMAIL PROTECTED]
-* @version  $Id: fo2pdf.php,v 1.1 2001/03/27 09:53:00 chregu Exp $
+* @version  $Id: fo2pdf.php,v 1.2 2001/03/27 14:35:21 chregu Exp $
 * @package  XML
 */
 



-- 
PHP CVS Mailing List (http://www.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] search safe URLs

2001-03-27 Thread Joe Sheble aka Wizaerd

In order to use URLs without ? and , there has to be some re-configuration 
in Apache, correct?  So somebody who didn't have access to httpd.conf 
couldn't use this methodology?  Or if this is completely incorrect, where 
can I find more info on implementing it strictly in PHP?

Joseph E. Sheble
[EMAIL PROTECTED]

Wizaerd's Realm
http://www.wizaerd.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-CVS] cvs: php4 /ext/oracle oracle.c

2001-03-27 Thread Thies C. Arntzen

thies   Tue Mar 27 06:55:03 2001 EDT

  Modified files:  
/php4/ext/oracleoracle.c 
  Log:
  fixed newly introduced crash in ora_bind
  
  
Index: php4/ext/oracle/oracle.c
diff -u php4/ext/oracle/oracle.c:1.60 php4/ext/oracle/oracle.c:1.61
--- php4/ext/oracle/oracle.c:1.60   Sun Feb 25 22:07:10 2001
+++ php4/ext/oracle/oracle.cTue Mar 27 06:55:03 2001
@@ -1710,7 +1710,6 @@
 
if (zend_hash_find(EG(symbol_table), paramname, strlen(paramname) + 
1, (void **)pdata) == FAILURE){
php_error(E_WARNING, "Can't find variable for parameter");
-   efree(paramname);
return 0;
}
 
@@ -1725,8 +1724,6 @@
 
strncpy(param-progv, (*pdata)-value.str.val, len);
param-progv[len] = '\0';
-
-   efree(paramname);
}
 
return 1;



-- 
PHP CVS Mailing List (http://www.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] Looking for a file editor written in php

2001-03-27 Thread Chris Moewes-Bystrom

I am trying to find a file editor / file management tool written in php 
something like the file manager used by the old geocities now yahoo public 
web servers. ANyone seen something like this, or done something like this??


Chris Moewes
http://phpusergroups.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-CVS] cvs: php4(PHP_4_0_5) /ext/oracle oracle.c

2001-03-27 Thread Thies C. Arntzen

thies   Tue Mar 27 07:04:21 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/oracleoracle.c 
  Log:
  MFH
  
  
Index: php4/ext/oracle/oracle.c
diff -u php4/ext/oracle/oracle.c:1.60 php4/ext/oracle/oracle.c:1.60.2.1
--- php4/ext/oracle/oracle.c:1.60   Sun Feb 25 22:07:10 2001
+++ php4/ext/oracle/oracle.cTue Mar 27 07:04:21 2001
@@ -1710,7 +1710,6 @@
 
if (zend_hash_find(EG(symbol_table), paramname, strlen(paramname) + 
1, (void **)pdata) == FAILURE){
php_error(E_WARNING, "Can't find variable for parameter");
-   efree(paramname);
return 0;
}
 
@@ -1725,8 +1724,6 @@
 
strncpy(param-progv, (*pdata)-value.str.val, len);
param-progv[len] = '\0';
-
-   efree(paramname);
}
 
return 1;



-- 
PHP CVS Mailing List (http://www.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] reading microsoft word, excel, pdf document text

2001-03-27 Thread ~~~i LeoNid ~~

On 25 Mar 2001 20:25:47 -0800 impersonator of
[EMAIL PROTECTED] (David Robley) planted I saw in
php.general:

On Mon, 26 Mar 2001 13:20, Erick Papadakis wrote:
 hi david,

 thanks for the note. ok, here is what i want to do. i
 want my users to upload WORD, XLS, PPT and PDF files.
 when they upload, i store these files in the temp
 directory, grab the text from them, and then put it
 into my database for later searching. i dont care
 about the formatting, i only care about the text
 because i need the keywords later for searching.

 can i run some sort of a parser on the server side
 like the wvware.com's word parser and just call it
 through php? i have not been able to figure out how to
 do this using php.

 i would really appreciate any ideas and suggestions!

 thanks/erick

OK - do you have the relevant parsers? There are specific (Unix) tools 
available for PDF (pdftotext or acrobat reader) and Word; I mentioned 
some of that in an earlier mail. For Excel you could probably use (Unix 
again) just the Unix command strings to get the text - same might work 
for Powerpoint but if some dipstick has created a graphics-only 
presentation you won't get much that's useful.

As I mentioned previously, you'll probably want to run the parser[s] from 
PHP using one of the Program execution functions; exec, system or the 
backtick operator should do what you want. How you capture the output 
will of course depend on how the output is delivered - see the docs for 
the particular parser.

None of the above is probably relevant if your server is Windows.

Excuse me for entering, but I just successfully run pdftotext (the latest
binary) from php exec() on my personal Windows95. The only inconvinience
is that the capture of output, looks like, is not designed for this tool.
Have to put up with output in the file:-(

Regards,
--
LeoN to  e-mail: cut  "auto_no." if present. 
(.±.)  ` to think - is to speak quietly,  to speak - is to think aloud`
 \~/ 
My posted articles archive: http://leo.portland.co.uk/doc00.htm


-- 
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-CVS] cvs: php4 /sapi/fastcgi fastcgi.c

2001-03-27 Thread Ben Mansell

joostersTue Mar 27 07:16:34 2001 EDT

  Modified files:  
/php4/sapi/fastcgi  fastcgi.c 
  Log:
  Changed header handling; before, we were somehow losing
  Content-Type: text/html
  
  
Index: php4/sapi/fastcgi/fastcgi.c
diff -u php4/sapi/fastcgi/fastcgi.c:1.2 php4/sapi/fastcgi/fastcgi.c:1.3
--- php4/sapi/fastcgi/fastcgi.c:1.2 Thu Mar 22 10:48:51 2001
+++ php4/sapi/fastcgi/fastcgi.c Tue Mar 27 07:16:34 2001
@@ -87,41 +87,15 @@
 }
 
 
-static int sapi_fastcgi_send_headers(sapi_headers_struct *sapi_headers SLS_DC)
+static void sapi_fastcgi_send_header(sapi_header_struct *sapi_header, void 
+*server_context)
 {
-   char buf[1024];
-   int n = 0;
-   zend_llist_position pos;
-   sapi_header_struct *h;
-
-   switch( sapi_headers-http_response_code ) {
-   case 200:
-   /* Default, assumed by FastCGI */
-   break;
-   case 302:
-   FCGX_PutS( "Status: 302 Moved Temporarily\r\n", out );
-   break;
-   case 401:
-   FCGX_PutS( "Status: 401 Authorization Required\r\n", out );
-   break;
-   default:
-   FCGX_FPrintF( out, "Status: %d Undescribed\r\\n",
- sapi_headers-http_response_code );
-   }
-   
-   h = zend_llist_get_first_ex(sapi_headers-headers, pos);
-   while (h) {
-   /* TODO: Buffer headers together into one big Put? */
+   if( sapi_header ) {
 #ifdef DEBUG_FASTCGI
-   fprintf( stderr, "Printing header %s\n", h-header );
+   fprintf( stderr, "Header: %s\n", sapi_header-header );
 #endif
-   FCGX_PutStr( h-header, h-header_len, out );
-   FCGX_PutStr( "\r\n", 2, out );
-   h = zend_llist_get_next_ex(sapi_headers-headers, pos);
+   FCGX_PutStr( sapi_header-header, sapi_header-header_len, out );
}
FCGX_PutStr( "\r\n", 2, out );
-   
-   return SAPI_HEADER_SENT_SUCCESSFULLY;
 }
 
 static int sapi_fastcgi_read_post(char *buffer, uint count_bytes SLS_DC)
@@ -182,8 +156,8 @@
php_error,

NULL,
-   sapi_fastcgi_send_headers,
NULL,
+   sapi_fastcgi_send_header,
sapi_fastcgi_read_post,
sapi_fastcgi_read_cookies,
 



-- 
PHP CVS Mailing List (http://www.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] Environment extract

2001-03-27 Thread Matt Friedman

print $HTTP_USER_AGENT; // the variable is already in the global scope.

also $ua = getenv('HTTP_USER_AGENT');

Most variables are automatically made a part of the environment in a PHP
script. It's one of the ways PHP makes scripting easier.

The online manual is invaluable for this type of info. http://www.php.net/

Also, write a short script and run it as so:
? phpinfo(); ?
You'll see a myriad of variables and their values. It's also handy for
debugging. You can include phpinfo() anywhere to see the output values of
your script.

Matt Friedman



- Original Message -
From: "Costas" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 8:01 AM
Subject: [PHP] Environment extract


 In perl the code to extract browser info is:
 $length = $ENV{'HTTP_USER_AGENT'};

 What is the equivalent code in PHP.

 Thanks





 --
 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-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-03-27 Thread Dan Kalowsky

kalowskyTue Mar 27 07:46:27 2001 EDT

  Modified files:  
/php4/ext/odbc  php_odbc.c 
  Log:
  The last fix was missing a , Marc Boeren either made the patch wrong, or I applied 
it improperly.  Anyways, Sebastian Bergmann discovered it, and supposedly is fixed 
with this.
  
  
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.74 php4/ext/odbc/php_odbc.c:1.75
--- php4/ext/odbc/php_odbc.c:1.74   Tue Mar 27 06:17:52 2001
+++ php4/ext/odbc/php_odbc.cTue Mar 27 07:46:27 2001
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: php_odbc.c,v 1.74 2001/03/27 14:17:52 kalowsky Exp $ */
+/* $Id: php_odbc.c,v 1.75 2001/03/27 15:46:27 kalowsky Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -2164,7 +2164,7 @@
WRONG_PARAM_COUNT;
}
 
-   conn = (odbc_connection *) zend_fetch_resource(pv_conn, -1, "ODBC-Link", 
found_resource_type, 2, le_conn, le_pconn);
+   conn = (odbc_connection *) zend_fetch_resource(pv_conn, -1, "ODBC-Link", 
+found_resource_type, 2, le_conn, le_pconn);
if (found_resource_type==le_pconn) {
is_pconn = 1;
}



-- 
PHP CVS Mailing List (http://www.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] Help: How do you get rid of these warnings for undefinedvariable s?

2001-03-27 Thread Philip Olson

hi anyangwe,

either define the variables or do what most people do and turn down error
reporting.  see :

  Reporting Errors:
  -
  http://www.php.net/manual/en/phpdevel-errors.php

pay special attention to E_NOTICE.  for example, the following should give
a similar errors with E_NOTICE on :

  print $array[index]  // Always use quotes, looks for static variable
   // named 'index' first.  'make' in your case.
   // sidenote: something like $array[4] is good.

  if ($user == '') // Use isset or empty or something similar.

  print $notset;   // ""

  if ($sumbit) // "" or don't depend on submit buttons.

messing with empty variables is okay but use quotes around array index.
always.  except when index is a number (not associative).  it works
without but having php look for static variables first wastes energy and
will cause unexpected results if it happens to exist.

this is set in php.ini through error_reporting setting and also the
following function has useful information within it :

  error_reporting -- set which PHP errors are reported:
  -  
  http://www.php.net/manual/en/function.error-reporting.php

anyone have more information to share?  please do.

warm regards,

philip



On Tue, 27 Mar 2001, Anyangwe, Tanwani wrote:

 Warning: Undefined index: make in C:\PHP\Test_Scripts\testdb3.php on line 16
 
 Warning: Undefined variable: user in C:\PHP\Test_Scripts\testdb3.php on line
 5
 etc.
 
 -- 
 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] POP mail delete

2001-03-27 Thread Miguel Carvalho

I, i'm a little new to PHP.

I'm sorry if this question has already be answerd, but i have i have
searched the list, and i have not found any arcticle about it.

My question is:
How do i delete a message from a POP server, using  PHP functions?

I have tried, imap_setflag_full, imap_delete, but no luck.

Can any one point me to some solution?

If possible, i dont want to dig into the POP protocol.

Thanks.
Miguel Carvalho


-- 
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] Dynamic constant names

2001-03-27 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Geoff Caplan) wrote:

 I am trying to create a constant name dynamically and then get at the
 value.
 
 // We set up the constant
 define( CONSTANT_1 , "Some value" ) ;
 
 // Later we try to use it dynamically ...
 $constant_number = 1 ;
 $constant_name = ( "CONSTANT_" . $constant_number ) ;
 
 // We try to assign the constant value to a variable...
 $constant_value = $constant_name ;
 
 But we find that $constant value still contains the NAME of the
 constant, and not the VALUE.
 
 Am I misunderstanding something? Is there any way that this can be done?

Your error_reporting level must not be all the way up to E_ALL, because 
when I tried your code PHP reported errors that might have helped you solve 
the problem.  Try this:

// We set up the constant
define("CONSTANT_1", "Some value" ) ; //constant name must be in quotes

// Later we try to use it dynamically ...
$constant_number = 1 ;
eval( "echo CONSTANT_$constant_number;" ) ;//tell PHP to treat the name as 
code not as a text string

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




Re: [PHP] search safe URLs

2001-03-27 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Joe Sheble aka Wizaerd) wrote:

 In order to use URLs without ? and , there has to be some re-configuration 
 in Apache, correct?  So somebody who didn't have access to httpd.conf 
 couldn't use this methodology?  Or if this is completely incorrect, where 
 can I find more info on implementing it strictly in PHP?

Apache allows use of urls without "?" and "" right out of the box.  That's 
just a URI without an optional query string: http://www.php.net, for 
example.   I'm guessing you want to use URLs that *do have a query string 
and transform them into ones that don't: 
http://www.php.net/find_stuff.php?query=foomethod=bar becoming 
http://www.php.net/find_stuff/foo/bar/, right?

You can use an .htaccess file to direct Apache to rewrite URLs as long as 
mod_rewrite is installed.  See 
http://httpd.apache.org/docs/misc/rewriteguide.html for a detailed 
tutorial.

For a how-to on implementing this in PHP, check out some of the tutorial 
sites like phpbuilder.com,weberdev.com, webmonkey.com, etc.

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

2001-03-27 Thread Marisol Díaz E.

Hi

I need the code, for protecting the dir by password.


Thanks


Marisol Daz E.




[PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/fastcgi fastcgi.c

2001-03-27 Thread Ben Mansell

joostersTue Mar 27 08:29:45 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/sapi/fastcgi  fastcgi.c 
  Log:
  Changed header handling; before, we were somehow losing
  Content-Type: text/html
  
  
Index: php4/sapi/fastcgi/fastcgi.c
diff -u php4/sapi/fastcgi/fastcgi.c:1.1.2.1 php4/sapi/fastcgi/fastcgi.c:1.1.2.2
--- php4/sapi/fastcgi/fastcgi.c:1.1.2.1 Tue Mar 20 10:13:20 2001
+++ php4/sapi/fastcgi/fastcgi.c Tue Mar 27 08:29:45 2001
@@ -87,41 +87,15 @@
 }
 
 
-static int sapi_fastcgi_send_headers(sapi_headers_struct *sapi_headers SLS_DC)
+static void sapi_fastcgi_send_header(sapi_header_struct *sapi_header, void 
+*server_context)
 {
-   char buf[1024];
-   int n = 0;
-   zend_llist_position pos;
-   sapi_header_struct *h;
-
-   switch( sapi_headers-http_response_code ) {
-   case 200:
-   /* Default, assumed by FastCGI */
-   break;
-   case 302:
-   FCGX_PutS( "Status: 302 Moved Temporarily\r\n", out );
-   break;
-   case 401:
-   FCGX_PutS( "Status: 401 Authorization Required\r\n", out );
-   break;
-   default:
-   FCGX_FPrintF( out, "Status: %d Undescribed\r\\n",
- sapi_headers-http_response_code );
-   }
-   
-   h = zend_llist_get_first_ex(sapi_headers-headers, pos);
-   while (h) {
-   /* TODO: Buffer headers together into one big Put? */
+   if( sapi_header ) {
 #ifdef DEBUG_FASTCGI
-   fprintf( stderr, "Printing header %s\n", h-header );
+   fprintf( stderr, "Header: %s\n", sapi_header-header );
 #endif
-   FCGX_PutStr( h-header, h-header_len, out );
-   FCGX_PutStr( "\r\n", 2, out );
-   h = zend_llist_get_next_ex(sapi_headers-headers, pos);
+   FCGX_PutStr( sapi_header-header, sapi_header-header_len, out );
}
FCGX_PutStr( "\r\n", 2, out );
-   
-   return SAPI_HEADER_SENT_SUCCESSFULLY;
 }
 
 static int sapi_fastcgi_read_post(char *buffer, uint count_bytes SLS_DC)
@@ -182,8 +156,8 @@
php_error,

NULL,
-   sapi_fastcgi_send_headers,
NULL,
+   sapi_fastcgi_send_header,
sapi_fastcgi_read_post,
sapi_fastcgi_read_cookies,
 
@@ -218,6 +192,7 @@
 static void init_request_info( SLS_D )
 {
char *content_length = getenv("CONTENT_LENGTH");
+   char *content_type = getenv( "CONTENT_TYPE" );
const char *auth;
struct stat st;
char *pi = getenv( "PATH_INFO" );
@@ -227,7 +202,7 @@
SG(request_info).request_method = getenv("REQUEST_METHOD");
SG(request_info).query_string = getenv("QUERY_STRING");
SG(request_info).request_uri = path_info;
-   SG(request_info).content_type = getenv("CONTENT_TYPE");
+   SG(request_info).content_type = ( content_type ? content_type : "" );
SG(request_info).content_length = (content_length?atoi(content_length):0);
SG(sapi_headers).http_response_code = 200;
 



-- 
PHP CVS Mailing List (http://www.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] password

2001-03-27 Thread Nathan Cassano

Don't you mean..

http://httpd.apache.org/docs/mod/mod_auth.html

or do you want to do this with php headers?

-Original Message-
From: Marisol Daz E. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 9:03 AM
To: PHP General
Subject: [PHP] password


Hi

I need the code, for protecting the dir by password.


Thanks


Marisol Daz E.



-- 
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] search safe URLs

2001-03-27 Thread Philip Olson

Check out this post :

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

The first two tutorials should help.  Btw, no reconfigurations are 
required.

Regards,

Philip

On Tue, 27 Mar 2001, Joe Sheble aka Wizaerd wrote:

 In order to use URLs without ? and , there has to be some re-configuration 
 in Apache, correct?  So somebody who didn't have access to httpd.conf 
 couldn't use this methodology?  Or if this is completely incorrect, where 
 can I find more info on implementing it strictly in PHP?
 
 Joseph E. Sheble
 [EMAIL PROTECTED]
 
 Wizaerd's Realm
 http://www.wizaerd.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 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] Again and again problem installing under Solaris

2001-03-27 Thread Emiliano Marmonti

Dear Friends

Before all, Thank you Joe, the ar package was the solution and was located
at the same place that you told me.
Now ,after making and installing all, PHP doesnt work. I followed this
process:

./configure --with-mysql --with-apxs=/usr/apache/bin/apxs
make
make install

I have had a little problem with make install because it doesnt find
httpd.conf. I have posted it in a folder that could find and locate the
change in the folder that originally was. Now the httpd.conf loads the
module of PHP, the module is located where httpd.conf says, there is a
PHP.INI where should be, but a simple test page doesnt work. I have looked
at httpd.conf and found some sections that define Directories where could
follow a script secuence. I must generate a section for my PHP test folder?
Is there another special configuration? Im using Apache 1.3.9

Thank you all.
Emiliano.



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

2001-03-27 Thread Johnson, Kirk

Yes and no. session.gc_maxlifetime is the right setting, and this means the
session will last *at least* this long. The setting in
session.gc_probability also has an effect. This gives the percentage of page
hits on which gc is launched. For example, if session.gc_probability = 1,
then on one out of every 100 page requests the gc routine gets launched. So,
on a really slow day where the server isn't getting many requests (or late
at night?), then the session can actually last much longer, since the gc
routine isn't getting launched.

Kirk

 -Original Message-
 From: Sren Boll Overgaard [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 27, 2001 2:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] session expiretime
 
 
 Hello
 
 I am trying to figure out how long a session survives, if the 
 user does
 nothing in his or her browser, to update the session.
 
 As far as I can see, the gc-process is controlled by this directive:
 
 session.gc_maxlifetime= 1440; after this number of 
 seconds, stored
 ; data will be seen as 
 'garbage' and
 ; cleaned up by the gc process
 
 
 So, does this mean that the session will persist for 1440 
 seconds, with the
 above directives inserted in php.ini?
 

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

2001-03-27 Thread Steven Shepherd

I am writing a script, actually modifying PhPSysInfo to include the top
processes used on a machine.  So far, no matter what I do, I can only get
it to work via the command line.  I get a blank screen when trying it via
the browser:

Tried this:

?php
$data = `ps auxwww`; echo nl2br($data);  
?


and this:

TT 
PRE 
?php 
exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top); 
while (list(,$line) = each($top)){ 
 echo $line, "BR\n"; 
  } 
 ? 
/PRE 
/TT

I used sed to remove control characters..etc.  Again, both examples above
work via the command line, but not via a browser.  User "www" is able to
run this command as well, so it's not permissions.  Help?!  :)


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




[PHP] form and php

2001-03-27 Thread Augusto Cesar Castoldi

I had a form with just with one button, the action is a PHP file. And when
I hit "enter" the button (submit) form action was done.


Then I put other button (change)  on this form, and now when I hit enter,
beside the
"pressed" button is the second one (I want that when I hit "enter" the
submit button is pressed), the PHP stops and the screen of the IE5 stays
blank.

What I should do to solve this problem?

thanks.

Augusto


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

2001-03-27 Thread Joe Brown

nobody has execute permission on ps?

Probably quite the opposite, your webserver user doesn't have execute
permission on ps, so there is no execution or return value.

"Steven Shepherd" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am writing a script, actually modifying PhPSysInfo to include the top
 processes used on a machine.  So far, no matter what I do, I can only get
 it to work via the command line.  I get a blank screen when trying it via
 the browser:

 Tried this:

 ?php
 $data = `ps auxwww`; echo nl2br($data);
 ?

 
 and this:

 TT
 PRE
 ?php
 exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
 while (list(,$line) = each($top)){
  echo $line, "BR\n";
   }
  ?
 /PRE
 /TT

 I used sed to remove control characters..etc.  Again, both examples above
 work via the command line, but not via a browser.  User "www" is able to
 run this command as well, so it's not permissions.  Help?!  :)


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




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




[PHP-CVS] cvs: php4 /ext/standard formatted_print.c

2001-03-27 Thread Derick Rethans

derick  Tue Mar 27 09:21:45 2001 EDT

  Modified files:  
/php4/ext/standard  formatted_print.c 
  Log:
  - 'Fix' for bug 10002
  
  
Index: php4/ext/standard/formatted_print.c
diff -u php4/ext/standard/formatted_print.c:1.28 
php4/ext/standard/formatted_print.c:1.29
--- php4/ext/standard/formatted_print.c:1.28Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/formatted_print.c Tue Mar 27 09:21:45 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: formatted_print.c,v 1.28 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: formatted_print.c,v 1.29 2001/03/27 17:21:45 derick Exp $ */
 
 #include math.h  /* modf() */
 #include "php.h"
@@ -92,7 +92,7 @@
while (p1  cvt_buf[NDIG])
*p++ = *p1++;
} else if (arg  0) {
-   while ((fj = arg * 10)  1) {
+   while ((fj = arg * 10.0)  0.999) {
arg = fj;
r2--;
}



-- 
PHP CVS Mailing List (http://www.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] search safe URLs

2001-03-27 Thread Joe Sheble (Wizaerd)

thanx, I'll be looking these over vigarously...

At 05:11 PM 3/27/01 +, Philip Olson wrote:
Check out this post :

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

The first two tutorials should help.  Btw, no reconfigurations are
required.

Regards,

Philip

On Tue, 27 Mar 2001, Joe Sheble aka Wizaerd wrote:

  In order to use URLs without ? and , there has to be some 
 re-configuration
  in Apache, correct?  So somebody who didn't have access to httpd.conf
  couldn't use this methodology?  Or if this is completely incorrect, where
  can I find more info on implementing it strictly in PHP?
 
  Joseph E. Sheble
  [EMAIL PROTECTED]
  
  Wizaerd's Realm
  http://www.wizaerd.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 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] form and php

2001-03-27 Thread Johannes Janson

Hi,

i'm sorry but I don't quite get what you mean. Which button is
pressed. or post the code.

Johannes

"Augusto Cesar Castoldi" [EMAIL PROTECTED] schrieb im Newsbeitrag
Pine.GSO.4.10.10103271417160.12546-10@venus">news:Pine.GSO.4.10.10103271417160.12546-10@venus...
 I had a form with just with one button, the action is a PHP file. And when
 I hit "enter" the button (submit) form action was done.


 Then I put other button (change)  on this form, and now when I hit enter,
 beside the
 "pressed" button is the second one (I want that when I hit "enter" the
 submit button is pressed), the PHP stops and the screen of the IE5 stays
 blank.

 What I should do to solve this problem?

 thanks.

 Augusto


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

2001-03-27 Thread Steven Shepherd

Bad example (changed to ps and it works actually..but i dont want 'ps', I
want 'top').  Ran top using su to the user 'www' from the command line and
was able to run it fine.

On Tue, 27 Mar 2001, Joe Brown wrote:

 Date: Tue, 27 Mar 2001 12:35:08 -0500
 From: Joe Brown [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] "DF" output
 
 nobody has execute permission on ps?
 
 Probably quite the opposite, your webserver user doesn't have execute
 permission on ps, so there is no execution or return value.
 
 "Steven Shepherd" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am writing a script, actually modifying PhPSysInfo to include the top
  processes used on a machine.  So far, no matter what I do, I can only get
  it to work via the command line.  I get a blank screen when trying it via
  the browser:
 
  Tried this:
 
  ?php
  $data = `ps auxwww`; echo nl2br($data);
  ?
 
  
  and this:
 
  TT
  PRE
  ?php
  exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
  while (list(,$line) = each($top)){
   echo $line, "BR\n";
}
   ?
  /PRE
  /TT
 
  I used sed to remove control characters..etc.  Again, both examples above
  work via the command line, but not via a browser.  User "www" is able to
  run this command as well, so it's not permissions.  Help?!  :)
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
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] Interbase error code = -504 Cursor unknow

2001-03-27 Thread Mauricio Junqueira


Hello, this is my first attempt to query and print a result coming from a 
database, in this case interbase6.

I got the following error: InterBase: Dynamic SQL Error SQL error code = 
-504 Cursor unknown in maingeral.htm on line 8

Here's the code: 
? include("php/header.php");
 
 ibase_pconnect(BANCO,DBUSER,DBPASSWD)
or die ("script language='javaScript' alert('" . ibase_errmsg() . 
"'); /script");
 
  $stmt = "select count(*) from soldcars";
  $query= ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $result   = ibase_fetch_row($query);// THIS IS LINE 8
  $TOTSOLD  = $result;
  ibase_free_result($query);
 
  $stmt="select Total from monthsold";
  $query   = ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $result  = ibase_fetch_row($query);
  $TOTMONTH = $result[0];
  ibase_free_result($query);
 
  $stmt= "select count(*) from deal where available = 1";
  $query   = ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $result  = ibase_fetch_row($query);
  $TOTAVAIL= $result[0];
  ibase_free_result($query);
 
  ibase_commit();
  ibase_close();
?

I have 3 query blocks. the result shows the contents of 2nd and 3rd block 
variable:TOTMONH and TOTAVAIL but nothing from the first block, TOTSOLD.
If I comment the first block entirely, I got the same error 
(ibase_fetch_row line) on the 2nd block and the only result that appear is 
from the 3rd block.

What I am doing wrong?


I've put this statement before the first block to see if $query was empty 
but the statement return true and the same error occured in the 
ibase_fetch_row line and the echo $query shows everytime Resource id#4

 if (isset($query)) {
  echo($query);
  $result   = ibase_fetch_row($query);
  $TOTSOLD  = $result;
  ibase_free_result($query);
  } else echo "query not set";

If just comment the following lines, everything works Please help... 
I'm getting nut !!

? include("php/header.php");
 
 ibase_pconnect(BANCO,DBUSER,DBPASSWD)
or die ("script language='javaScript' alert('" . ibase_errmsg() . 
"'); /script");
 
  $stmt = "select count(*) from soldcars";
  $query= ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
//  $result   = ibase_fetch_row($query);
//  $TOTSOLD  = $result[0];
//  ibase_free_result($query);
$TOTSOLD ="COMMENTED";
 
  $stmt="select Total from monthsold";
  $query   = ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $TOTMONTH = $result[0];
  ibase_free_result($query);
 
  $stmt= "select count(*) from deal where available = 1";
  $query   = ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $result  = ibase_fetch_row($query);
  $TOTAVAIL= $result[0];
  ibase_free_result($query);
 
  ibase_close();
?


-- 
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 If-else statement

2001-03-27 Thread Louis Brooks

Hi:

I am trying to set up a simple script that will verify that all the blanks 
in a form have been filled out and then submit that to mySQL. If the form 
has not been completely filled out I want it to redirect them back to the 
original form. I know that the mySQL part of the script works, but I am 
unable to get the part of the script that checks the form input to see if 
everything was filled out to work. It seems to bypass this part of the 
script and enter the info into mySQL . Here is what I have so far:


If (($fname == " ") || ($lname == " "))
 {
 header("Location: http://callook.org/member_joinform.html");
}else{
 $db = mysql_connect("localhost", "name", "password");
 mysql_select_db("dBase",$db);
 $sql = "INSERT INTO 
members 
(fname,lname,address,city,state,zip,country,email,username,password) 
VALUES 
('$fname','$lname','$address','$city','$state','$zip','$country','$email','$user 
name','$password')";
 $result = mysql_query($sql);
}

I hope the formatting comes out right. I am sure it is something simple I 
have missed but I have tried the script several different ways and nothing 
seems to work. Thank you for any help.

Sincerely,

Louis Brooks

BTW: Is there a faq for this list before I go asking anymore questions?



[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/standard formatted_print.c

2001-03-27 Thread Derick Rethans

derick  Tue Mar 27 09:24:01 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/standard  formatted_print.c 
  Log:
  - MFH (Fix for bug 10002)
  
  
Index: php4/ext/standard/formatted_print.c
diff -u php4/ext/standard/formatted_print.c:1.28 
php4/ext/standard/formatted_print.c:1.28.2.1
--- php4/ext/standard/formatted_print.c:1.28Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/formatted_print.c Tue Mar 27 09:24:01 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: formatted_print.c,v 1.28 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: formatted_print.c,v 1.28.2.1 2001/03/27 17:24:01 derick Exp $ */
 
 #include math.h  /* modf() */
 #include "php.h"
@@ -92,7 +92,7 @@
while (p1  cvt_buf[NDIG])
*p++ = *p1++;
} else if (arg  0) {
-   while ((fj = arg * 10)  1) {
+   while ((fj = arg * 10.0)  0.999) {
arg = fj;
r2--;
}



-- 
PHP CVS Mailing List (http://www.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 If-else statement

2001-03-27 Thread Johnson, Kirk

This code is checking if $fname and $lname are equal to a single blank
character. Is this what you want? My guess is you really want

if(($fname == "") || ($lname == ""))

Another way to write this is

if( (!$fname) || (!$lname) )

Kirk


 -Original Message-
 From: Louis Brooks [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 27, 2001 11:34 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Simple If-else statement
 
 
 Hi:
 
 I am trying to set up a simple script that will verify that 
 all the blanks 
 in a form have been filled out and then submit that to mySQL. 
 If the form 
 has not been completely filled out I want it to redirect them 
 back to the 
 original form. I know that the mySQL part of the script 
 works, but I am 
 unable to get the part of the script that checks the form 
 input to see if 
 everything was filled out to work. It seems to bypass this 
 part of the 
 script and enter the info into mySQL . Here is what I have so far:
 
 
 If (($fname == " ") || ($lname == " "))
  {
  header("Location: 
http://callook.org/member_joinform.html");
}else{
 $db = mysql_connect("localhost", "name", "password");
 mysql_select_db("dBase",$db);
 $sql = "INSERT INTO 

-- 
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 If-else statement

2001-03-27 Thread Johannes Janson

Hi,

if ($name == " ") {  checks for a space in $name.
"empty" is either if (§name == "") without a free space
between "" or you could do it with empty($mane)
if (empty($name)) is true if it is empty (who would
have thought this?)

Johannes

"Louis Brooks" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi:

 I am trying to set up a simple script that will verify that all the blanks
 in a form have been filled out and then submit that to mySQL. If the form
 has not been completely filled out I want it to redirect them back to the
 original form. I know that the mySQL part of the script works, but I am
 unable to get the part of the script that checks the form input to see if
 everything was filled out to work. It seems to bypass this part of the
 script and enter the info into mySQL . Here is what I have so far:


 If (($fname == " ") || ($lname == " "))
  {
  header("Location:
http://callook.org/member_joinform.html");
 }else{
  $db = mysql_connect("localhost", "name", "password");
  mysql_select_db("dBase",$db);
  $sql = "INSERT INTO
 members
 (fname,lname,address,city,state,zip,country,email,username,password)
 VALUES

('$fname','$lname','$address','$city','$state','$zip','$country','$email','$
user
 name','$password')";
  $result = mysql_query($sql);
 }

 I hope the formatting comes out right. I am sure it is something simple I
 have missed but I have tried the script several different ways and nothing
 seems to work. Thank you for any help.

 Sincerely,

 Louis Brooks

 BTW: Is there a faq for this list before I go asking anymore questions?




-- 
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] Interbase error code = -504 Cursor unknow

2001-03-27 Thread Mauricio Junqueira


Since ibase_query returns true if the query succeeds I've tried this, but 
with the same problem with ibase_fetch_row:

  $stmt = "select count(*) from soldcars";
  if ($query= ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script")){
$result   = ibase_fetch_row($query);
$TOTSOLD  = $result[0];
ibase_free_result($query);}

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

2001-03-27 Thread Odd Rune Heggestad

Heyzz Dude!
I've got a problem with dbase, do you think you can help me?
http://www.ripwares.com/~np2k/norway-warez/admin/create.php
here's the script:
-
?
$dbname = "tedst.dbf";
$def =
array(
array("date", "D"),
array("name", "C",  50),
array("age",  "N",   3, 0),
array("email","C", 128),
array("ismember", "L")
);
if (!dbase_create ($dbname, $def))
print "strongError!/strong";
?
---
try this, you'll get:
Fatal error: Call to undefined function: dbase_create() in 
/home/sites/site1/users/np2k/web/norway-warez/admin/create.php on line 16

Do you know the problem, I also saw your ad on php.net about dbase
"./configure --enable-dbase". 
Where to put this?

Thanks in acvance
{KiKk0}




Re: [PHP] form and php

2001-03-27 Thread Philip Olson

Hi Augusto,

Submit buttons aren't that special, they just send a name=value pair. 
Doing something like this :

If the following is pressed, if ($action == 'edit') will return true.
  
  input type="submit" name="action" value="edit"
  
If the following is pressed, if ($action == 'new')  will return true. 
  
  input type="submit" name="action" value="new"

See?  Regarding what gets sent while pressing the enter key, not exactly  
sure on that, you can use javascript to help determine.  Check out :

  http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html

And do some google searches for terms such as "enter, key, form, submit,
javascript, html" and some others.

And here's a thread that will help, some ideas within are better then
others :
  
  [PHP] multiple submit buttons :
  ---
  http://marc.theaimsgroup.com/?l=php-generalm=97513765915454w=2

It's a very lengthy thread :-)


regards,

Philip Olson
http://www.cornado.com/


On Tue, 27 Mar 2001, Augusto Cesar Castoldi wrote:

 I had a form with just with one button, the action is a PHP file. And when
 I hit "enter" the button (submit) form action was done.
 
 
 Then I put other button (change)  on this form, and now when I hit enter,
 beside the
 "pressed" button is the second one (I want that when I hit "enter" the
 submit button is pressed), the PHP stops and the screen of the IE5 stays
 blank.
 
 What I should do to solve this problem?
 
 thanks.
 
 Augusto
 
 
 -- 
 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] DF output

2001-03-27 Thread Joe Brown

Well, that's a whole different ballpark.

do man top see if it has a batch mode option

With the top on my linux box:
$ top -b

"Steven Shepherd" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Bad example (changed to ps and it works actually..but i dont want 'ps', I
 want 'top').  Ran top using su to the user 'www' from the command line and
 was able to run it fine.

 On Tue, 27 Mar 2001, Joe Brown wrote:

  Date: Tue, 27 Mar 2001 12:35:08 -0500
  From: Joe Brown [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] "DF" output
 
  nobody has execute permission on ps?
 
  Probably quite the opposite, your webserver user doesn't have execute
  permission on ps, so there is no execution or return value.
 
  "Steven Shepherd" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I am writing a script, actually modifying PhPSysInfo to include the
top
   processes used on a machine.  So far, no matter what I do, I can only
get
   it to work via the command line.  I get a blank screen when trying it
via
   the browser:
  
   Tried this:
  
   ?php
   $data = `ps auxwww`; echo nl2br($data);
   ?
  
   
   and this:
  
   TT
   PRE
   ?php
   exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
   while (list(,$line) = each($top)){
echo $line, "BR\n";
 }
?
   /PRE
   /TT
  
   I used sed to remove control characters..etc.  Again, both examples
above
   work via the command line, but not via a browser.  User "www" is able
to
   run this command as well, so it's not permissions.  Help?!  :)
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




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




[PHP] PHP and Apachecon

2001-03-27 Thread Brian Moon

Hello All,

Apachecon is next week and I am preparing to request a BOF (Birds Of A
Feather) for the PHP community.  It will be an hour long session that is
basically an open forum for users of PHP to meet and talk about PHP.

What I would like from all you out there is a list of possible topics to be
used as a starting point for discussion.

Please just email them back to me as I am not on this list.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews  dealmac
http://dealnews.com/ | http://dealmac.com/

Look for my presentation at ApacheCon 2001.
"Caching Dynamic Web Content to Increase Dependability and Performance"
http://www.apachecon.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-general Digest 27 Mar 2001 19:05:15 -0000 Issue 592

2001-03-27 Thread php-general-digest-help


php-general Digest 27 Mar 2001 19:05:15 - Issue 592

Topics (messages 45701 through 45761):

File upload and database optimization questions
45701 by: Vikram Vaswani
45702 by: Jason Murray
45708 by: Jason Lotito

submit form witout clilck submit button
45703 by: Jacky
45704 by: Ankur Verma

Re: equivalent to PERL's qq
45705 by: Carsten Gehling
45706 by: Nuno Silva

Re: examine inner workings of functions
45707 by: David Robley

Sendmail
45709 by: Daniel B I

PHP as a general scripting language?
45710 by: Gildas Quiniou

session expiretime
45711 by: Søren Boll Overgaard
45745 by: Johnson, Kirk

GD problem
45712 by: Daniel B I
45713 by: Daniel B I

Connect local-remote
45714 by: Jochen Kaechelin

Re: [PHP-DB] Re: How to print last row in an array using WHILE?
45715 by: andreas \(.work\)

Question on manually instantiating a file download
45716 by: Vikram Vaswani

We need PHP developers - Urgently in the UK
45717 by: Paul Tweedy

GZip + NS + Print = Trouble
45718 by: Renze Munnik

Re: escape sequences not recognized inside an .html
45719 by: Jason Stechschulte
45725 by: Mauricio Junqueira

PostgreSQL and PHP - some Great Bridge news
45720 by: Ned Lilly

Dynamic constant names
45721 by: Geoff Caplan
45723 by: Neil Kimber
45739 by: CC Zona

A ToDo/ task list
45722 by: Harshdeep S Jawanda
45724 by: techzeus.pacific.net.sg
45729 by: A.T.Z.

Re[PHP] Dynamic constant names -SOLVED
45726 by: Geoff Caplan

free webspace supporting PHP/MySQL
45727 by: Alaiddin Tayeh
45728 by: Rosen

Re: How do you get rid of these warnings for undefined variable s?
45730 by: Anyangwe, Tanwani
45737 by: Philip Olson

search safe URLs
45731 by: Joe Sheble aka Wizaerd
45740 by: CC Zona
45743 by: Philip Olson
45749 by: Joe Sheble (Wizaerd)

Looking for a file editor written in php
45732 by: Chris Moewes-Bystrom

Environment extract
45733 by: Costas
45735 by: Matt Friedman
45736 by: Costas

Re: reading microsoft word, excel, pdf document text
45734 by: ~~~i LeoNid ~~

POP mail delete
45738 by: Miguel Carvalho

password
45741 by: Marisol Díaz E.
45742 by: Nathan Cassano

Again and again problem installing under Solaris
45744 by: Emiliano Marmonti

"DF" output
45746 by: Steven Shepherd
45748 by: Joe Brown
45751 by: Steven Shepherd
45759 by: Joe Brown

form and php
45747 by: Augusto Cesar Castoldi
45750 by: Johannes Janson
45758 by: Philip Olson

Interbase error code = -504 Cursor unknow
45752 by: Mauricio Junqueira
45756 by: Mauricio Junqueira

Simple If-else statement
45753 by: Louis Brooks
45754 by: Johnson, Kirk
45755 by: Johannes Janson

About Dbase
45757 by: Odd Rune Heggestad

PHP and Apachecon
45760 by: Brian Moon

Statistical Functions
45761 by: robert_youdale.yahoo.co.uk

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]


--



Hello all,

I'm in the process of building a document-storage system for my firm with
PHP. The goal is this is essentially to allow users to upload documents to
our server (central repository) and allow other users to view/modify these
files.

I have a number of questions, most of them related to optimization of the
code. Any assistance on these from more experienced developers would be
much appreciated.

1. I will be allowing users to upload files of specific types only (DOC,
HTML, TXT, images). My original belief (maybe incorrect) was that allowing
users to upload scripts (.php, .cgi) was dangerous and should be disallowed. 

I am now considering whether files, once uploaded, should be renamed - for
example, "abc.txt" gets renamed to "01.03.dat", with a reference in the
mySQL database containing the real name. 

First, which of these two approaches is better, performance-wise (or is the
difference insignificant)?

Second, is it correct to say that if I adopt this "rename-after-upload"
approach, I can allow users to upload scripts also (since the file
extensions will be changed and no longer recognized as scripts).

2. Once the file is received by the upload script, I am using the followign
code to INSERT a record. I then use the insert_id() function to set the new
filename as well. Is this approach correct?

$query = "INSERT INTO data (category, owner, realname, created,
description, comment, view, modify) VALUES('$category', '$SESSION_UID',
'$file_name', NOW(), '$desc', '$comment', '$viewStr', 

Re: [PHP] Question on manually instantiating a file download

2001-03-27 Thread Nuno Silva


hello,

you could "start from the end" :)

show the nice page saying "THANKS!!" or something and this page will 
call the download script itself with "meta refresh=..." in the head
...can't remember the meta refresh syntax right now :)

hope it works,
Nuno


Vikram Vaswani wrote:

 Hello all,
 
 I am working on a script which locates a file on the system and then tells
 the browser to pop open the "Save As" dialog box for download. In order to
 do this, I am using the following code:
 
 $filename = $dataDir . $id . ".dat";
 header ("Content-Type: application/octet-stream"); 
 header ("Content-Disposition: attachment; filename=$filename"); 
 readfile($filename); 
 
 This works fine - however, I would like to redirect the browser to another
 page once the download is complete (or once it starts). I have tried adding a 
 
 header("Location:next.php")
 
 line to the end of the script above, but it has no effect whatsoever (after
 the download is complete, the browser displays an hourglass as though
 waiting for something). Do I need to send some kind of "end-of-download"
 header...or something else?
 
 Can anyone suggest some possible solutions to this problem?
 
 Please CC a copy of your response to 
 
 [EMAIL PROTECTED] 
 
 as well as the list (as I will be working on this @ home also and do not
 have access to the full digest there)
 
 Any help will be much appreciated. TIA,
 
 Vikram Vaswani
 --
 Sex is like air. It's only a big deal if you can't get any.


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

2001-03-27 Thread Mark Maggelet


On Tue, 27 Mar 2001 17:31:25 +0100, Costas ([EMAIL PROTECTED])
wrote:
when i try printing

print $HTTP_USER_AGENT;

I get the error message  Undefined variable: HTTP_USER_AGENT

have i missed a declaration of some sort or something else?

thanks

Are you doing this from inside a function? If so you have to make it
global at the top:

function foo(){
global $HTTP_USER_AGENT;
echo $HTTP_USER_AGENT;
}




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

2001-03-27 Thread Philip Olson

Ahh, that's the cause.  Here's how to duplicate the error :-)

  error_reporting(E_NOTICE);
  foo();

  function foo()
  {
  echo $HTTP_USER_AGENT;
  }

As Mark mentioned, mind your scope.  Regarding the error, I just posted
some information on this perhaps it'll be of some use :

  http://marc.theaimsgroup.com/?l=php-generalm=98571030029538w=2

Regards,

Philip


On Tue, 27 Mar 2001, Mark Maggelet wrote:

 
 On Tue, 27 Mar 2001 17:31:25 +0100, Costas ([EMAIL PROTECTED]) 
 wrote:
 when i try printing
 
 print $HTTP_USER_AGENT;
 
 I get the error message  Undefined variable: HTTP_USER_AGENT
 
 have i missed a declaration of some sort or something else?
 
 thanks
 
 Are you doing this from inside a function? If so you have to make it 
 global at the top:
 
 function foo(){
   global $HTTP_USER_AGENT;
   echo $HTTP_USER_AGENT;
 }
 
 
 
 
 -- 
 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] Simple If-else statement

2001-03-27 Thread Sterling

H-

Another solution might be to use javascript to check the fields before
the page is even submitted to make sure they put "something" in the
first and last name fields. 

Unfortunately I'm not a javascript person but I've seen it done so much
I'm sure you could find examples on the web or via a web search engine. 

As far as your code; I concure with the other posters replies: "" is
empty, " " is a space. I've made the same mistake. Also did the if
($name = "") { } Screwed me up for a bit until I remembered == is
comparison. 8^) Oh well if you don't use it you lose it. 

Take it easy. 
-Sterling


Louis Brooks wrote:
 
 Hi:
 
 I am trying to set up a simple script that will verify that all the blanks
 in a form have been filled out and then submit that to mySQL. If the form
 has not been completely filled out I want it to redirect them back to the
 original form. I know that the mySQL part of the script works, but I am
 unable to get the part of the script that checks the form input to see if
 everything was filled out to work. It seems to bypass this part of the
 script and enter the info into mySQL . Here is what I have so far:
 
 If (($fname == " ") || ($lname == " "))
  {
  header("Location: http://callook.org/member_joinform.html");
 }else{
  $db = mysql_connect("localhost", "name", "password");
  mysql_select_db("dBase",$db);
  $sql = "INSERT INTO
 members
 (fname,lname,address,city,state,zip,country,email,username,password)
 VALUES
 ('$fname','$lname','$address','$city','$state','$zip','$country','$email','$user
 name','$password')";
  $result = mysql_query($sql);
 }
 
 I hope the formatting comes out right. I am sure it is something simple I
 have missed but I have tried the script several different ways and nothing
 seems to work. Thank you for any help.
 
 Sincerely,
 
 Louis Brooks
 
 BTW: Is there a faq for this list before I go asking anymore questions?

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

2001-03-27 Thread Martin Skjöldebrand

Thanks everyone for all the responses.
I think I'll look into sessions in the future. Meanwhile I'll have to see 
what others come up with.

Thanks,

Martin S.

-- 
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] Newbie - MySQL Question - Finding Unique Names in Column

2001-03-27 Thread Rami Krayem

I have a listing of photos in a table as follows (not actual column names):

Image Name, Image Width, Image Height, Band Name, Venue, City, State, Date


I would like to have a list of the different bands with photos in the
archive.  There may be 120 photos of any one band, but I would like to
select the name of the band only one time and have it printed in the list.
Is there a MySQL function that would do this, or should I just put the
different bands into a separate table?

Any help would be appreciated.


-- 
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] Newbie - MySQL Question - Finding Unique Names in Column

2001-03-27 Thread Jason Lotito



 -Original Message-
 From: Rami Krayem [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 27, 2001 11:49 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Newbie - MySQL Question - Finding Unique Names in Column


 I have a listing of photos in a table as follows (not actual
 column names):

 Image Name, Image Width, Image Height, Band Name, Venue, City, State, Date


 I would like to have a list of the different bands with photos in the
 archive.  There may be 120 photos of any one band, but I would like to
 select the name of the band only one time and have it printed in the list.
 Is there a MySQL function that would do this, or should I just put the
 different bands into a separate table?

 Any help would be appreciated.

Split the table up into 3 tables, one for bands, one for pictures, and one
for the venue.

table_bands
fields---
band_id (pk)
band_name

table_pictures
fields---
picture_id (pk)
band_id (fk)
venue_id (fk)
picture_name
picture_width
picture_height

table_venue
fields---
venue_id (pk)
venue_name
venue_city
venue_state
venue_date


Read this and you can see how I came up with the tables.  Its covers the 4
Forms of Normalization.
http://www.newbienetwork.net/sections.php?op=viewarticleartid=17



-- 
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] $myfile[$count]_type?!

2001-03-27 Thread FredrikAT

Why can't I do $myfile[$count]_type?!
What schould I do instead?

-
Fredrik A. Takle
[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] Newbie - MySQL Question - Finding Unique Names in Column

2001-03-27 Thread Data Driven Design

I think you mean distict, as in

$query = "SELECT DISTINCT band_name FROM table WHERE ...";

Data Driven Design
P.O. Box 1084
Holly Hill, FL 32125-1084

http://www.datadrivendesign.com
http://www.rossidesigns.net
- Original Message -
From: Rami Krayem [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 11:49 AM
Subject: [PHP] Newbie - MySQL Question - Finding Unique Names in Column


 I have a listing of photos in a table as follows (not actual column
names):

 Image Name, Image Width, Image Height, Band Name, Venue, City, State, Date


 I would like to have a list of the different bands with photos in the
 archive.  There may be 120 photos of any one band, but I would like to
 select the name of the band only one time and have it printed in the list.
 Is there a MySQL function that would do this, or should I just put the
 different bands into a separate table?

 Any help would be appreciated.


 --
 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] Spacing between $row[City],$row[State]

2001-03-27 Thread Mike Mike

Hello,
Is there a way to get spacing between
$row["City"],$row["State"] in the html output?
I've tried echo "$row["City"], nbsp; $row["State"]";
and a bunch of other things and get Parse error: parse
error, expecting `STRING' or `NUM_STRING' or `'$'' . 

The way I want the output is as follows:
Duluth MN but I get DuluthMN
Thank you
  --Mike

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

-- 
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 If-else statement

2001-03-27 Thread Louis Brooks

Thanks for everyone's response. I am still not able to get the

if(($fname="")) {

statement to work even with the suggestions everyone made so I am beginning 
to wonder if it is a problem with the server. (It is php3 on an Apache 
server. ) Any other suggestions would be greatly appreciated.

Thanks again,

Louis Brooks



At 02:29 PM 3/27/01 -0500, you wrote:
H-

Another solution might be to use javascript to check the fields before
the page is even submitted to make sure they put "something" in the
first and last name fields.

Unfortunately I'm not a javascript person but I've seen it done so much
I'm sure you could find examples on the web or via a web search engine.

As far as your code; I concure with the other posters replies: "" is
empty, " " is a space. I've made the same mistake. Also did the if
($name = "") { } Screwed me up for a bit until I remembered == is
comparison. 8^) Oh well if you don't use it you lose it.

Take it easy.
-Sterling


Louis Brooks wrote:
 
  Hi:
 
  I am trying to set up a simple script that will verify that all the blanks
  in a form have been filled out and then submit that to mySQL. If the form
  has not been completely filled out I want it to redirect them back to the
  original form. I know that the mySQL part of the script works, but I am
  unable to get the part of the script that checks the form input to see if
  everything was filled out to work. It seems to bypass this part of the
  script and enter the info into mySQL . Here is what I have so far:
 
  If (($fname == " ") || ($lname == " "))
   {
   header("Location: 
 http://callook.org/member_joinform.html");
  }else{
   $db = mysql_connect("localhost", "name", "password");
   mysql_select_db("dBase",$db);
   $sql = "INSERT INTO
  members
  (fname,lname,address,city,state,zip,country,email,username,password)
  VALUES
  
 ('$fname','$lname','$address','$city','$state','$zip','$country','$email','$user
  name','$password')";
   $result = mysql_query($sql);
  }
 
  I hope the formatting comes out right. I am sure it is something simple I
  have missed but I have tried the script several different ways and nothing
  seems to work. Thank you for any help.
 
  Sincerely,
 
  Louis Brooks
 
  BTW: Is there a faq for this list before I go asking anymore questions?

--
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] Is it possible to have href link refer to same PHP file?

2001-03-27 Thread Michael Champagne

Is there a way to have an ordinary href link call some javascript and say "are
you sure blah blah blah?" and then once you hit Ok it calls the same php file
which then does all the database stuff?

I know I can do this just by creating another PHP file and having the link
call that, but it seems like it would be nicer to have this in the same file.

Thanks!

--
Michael Champagne
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]




**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

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

2001-03-27 Thread Steven Shepherd

Brad, 

Thanks for the response.  Either method they both work via command
line.  Neither of them work in the browser.

On Tue, 27 Mar 2001, Brad S. Jackson wrote:

 
 Try $top = `top n 1 b | head -8 | sed 's/[\$|^M]//g'`;
 
 In my experience, you can't use | in exec calls, you have to use the back tick
 method.
 
 
 Steven Shepherd [EMAIL PROTECTED] wrote:
 Bad example (changed to ps and it works actually..but i dont want 'ps', I
 want 'top').  Ran top using su to the user 'www' from the command line and
 was able to run it fine.
 
 On Tue, 27 Mar 2001, Joe Brown wrote:
 
  Date: Tue, 27 Mar 2001 12:35:08 -0500
  From: Joe Brown [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] "DF" output
 
  nobody has execute permission on ps?
 
  Probably quite the opposite, your webserver user doesn't have execute
  permission on ps, so there is no execution or return value.
 
  "Steven Shepherd" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I am writing a script, actually modifying PhPSysInfo to include the top
   processes used on a machine.  So far, no matter what I do, I can only get
   it to work via the command line.  I get a blank screen when trying it via
   the browser:
  
   Tried this:
  
   ?php
   $data = `ps auxwww`; echo nl2br($data);
   ?
  
   
   and this:
  
   TT
   PRE
   ?php
   exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
   while (list(,$line) = each($top)){
echo $line, "BR\n";
 }
?
   /PRE
   /TT
  
   I used sed to remove control characters..etc.  Again, both examples above
   work via the command line, but not via a browser.  User "www" is able to
   run this command as well, so it's not permissions.  Help?!  :)
  
  
   --
 
 
 


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




Re: [PHP] Spacing between $row[City],$row[State]

2001-03-27 Thread Philip Olson

Hi Mike,

Try this little test :

?php

// Our array  :
   $row = array('city' = 'Seattle', 'state' = 'Washington');

// Can do in PHP4 :

   print "{$row['city']} {$row['state']}";

// Can do anytime :

   print  $row['city'] . ' ' . $row['state']; 

?

Not sure when "{$array['index']}" came about exactly but iirc it's not
allowed in PHP3.  Concatenating your strings is always available and
works wonderfully.


Regards,

Philip


On Tue, 27 Mar 2001, Mike Mike wrote:

 Hello,
 Is there a way to get spacing between
 $row["City"],$row["State"] in the html output?
 I've tried echo "$row["City"], nbsp; $row["State"]";
 and a bunch of other things and get Parse error: parse
 error, expecting `STRING' or `NUM_STRING' or `'$'' . 
 
 The way I want the output is as follows:
 Duluth MN but I get DuluthMN
 Thank you
   --Mike
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail. 
 http://personal.mail.yahoo.com/?.refer=text
 
 -- 
 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] Dynamic constant names - SOLVED

2001-03-27 Thread Geoff Caplan

Hi folks

I mailed this to the list some time ago, but it seems to have got
"lost" so here is is again...

I had 2 suggestions from the list:

1) indirection - $constant_value = $$constant_name ;

I had already tried this, but couldn't get it to work. Unless I am
missing something it just gives an "Undefined Variable" error.

2) eval("\$constant_value = $constant_name;") ;

This does work. Thanks Paul and CC!

Geoff Caplan



-- 
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 If-else statement

2001-03-27 Thread Sterling

H-

Really, that's strange. 

Try printing out your variables and seeing what is actually being
passed. 

print "FNAME:$fname:\n";

With the : : colons surrounding your variable you can see what if
anything is actually in $fname. 

Also it might have been a typo on your part but be sure to check for
single = and double == when using your if statements. 

For debugging purposes do simple stuff first. 

if ($fname == "") { 
print "NOTHING HERE\n";
//header("Location: http://callook.org/member_joinform.html");
} else {
print "Got Something: FNAME:$fname:\n";

if (1 == 2) {
 $db = mysql_connect("localhost", "name", "password");
 mysql_select_db("dBase",$db);
 $sql = "INSERT INTO 
members 
(fname,lname,address,city,state,zip,country,email,username,password) 
VALUES 

('$fname','$lname','$address','$city','$state','$zip','$country','$email','$user 
name','$password')";
$result = mysql_query($sql);
} # end if block commentor for multipe line comments. It's cleaner. 8^)

} end if-else check.

Hope this is helpful. 
-Sterling


Louis Brooks wrote:
 
 Thanks for everyone's response. I am still not able to get the
 
 if(($fname="")) {
 
 statement to work even with the suggestions everyone made so I am beginning
 to wonder if it is a problem with the server. (It is php3 on an Apache
 server. ) Any other suggestions would be greatly appreciated.
 
 Thanks again,
 
 Louis Brooks
 
 At 02:29 PM 3/27/01 -0500, you wrote:
 H-
 
 Another solution might be to use javascript to check the fields before
 the page is even submitted to make sure they put "something" in the
 first and last name fields.
 
 Unfortunately I'm not a javascript person but I've seen it done so much
 I'm sure you could find examples on the web or via a web search engine.
 
 As far as your code; I concure with the other posters replies: "" is
 empty, " " is a space. I've made the same mistake. Also did the if
 ($name = "") { } Screwed me up for a bit until I remembered == is
 comparison. 8^) Oh well if you don't use it you lose it.
 
 Take it easy.
 -Sterling
 
 
 Louis Brooks wrote:
  
   Hi:
  
   I am trying to set up a simple script that will verify that all the blanks
   in a form have been filled out and then submit that to mySQL. If the form
   has not been completely filled out I want it to redirect them back to the
   original form. I know that the mySQL part of the script works, but I am
   unable to get the part of the script that checks the form input to see if
   everything was filled out to work. It seems to bypass this part of the
   script and enter the info into mySQL . Here is what I have so far:
  
   If (($fname == " ") || ($lname == " "))
{
header("Location:
  http://callook.org/member_joinform.html");
   }else{
$db = mysql_connect("localhost", "name", "password");
mysql_select_db("dBase",$db);
$sql = "INSERT INTO
   members
   (fname,lname,address,city,state,zip,country,email,username,password)
   VALUES
  
  ('$fname','$lname','$address','$city','$state','$zip','$country','$email','$user
   name','$password')";
$result = mysql_query($sql);
   }
  
   I hope the formatting comes out right. I am sure it is something simple I
   have missed but I have tried the script several different ways and nothing
   seems to work. Thank you for any help.
  
   Sincerely,
  
   Louis Brooks
  
   BTW: Is there a faq for this list before I go asking anymore questions?
 
 --
 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] Simple If-else statement

2001-03-27 Thread Johannes Janson

Hi Louis,

you cuold try it with if (empty($fname)) { redirect...
just check again that your form is ok.

Johannes

"Louis Brooks" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Thanks for everyone's response. I am still not able to get the

 if(($fname="")) {

 statement to work even with the suggestions everyone made so I am
beginning
 to wonder if it is a problem with the server. (It is php3 on an Apache
 server. ) Any other suggestions would be greatly appreciated.

 Thanks again,

 Louis Brooks





-- 
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] Is it possible to have href link refer to same PHP file?

2001-03-27 Thread Mark Maggelet

On Tue, 27 Mar 2001 14:04:58 -0600 (Central Standard Time), Michael
Champagne ([EMAIL PROTECTED]) wrote:
Is there a way to have an ordinary href link call some javascript
and say "are
you sure blah blah blah?" and then once you hit Ok it calls the same
php file
which then does all the database stuff?

a href="myfile" onclick="return confirm('are you sure blah blah
blah')"

I know I can do this just by creating another PHP file and having
the link
call that, but it seems like it would be nicer to have this in the
same file.

Thanks!

--
Michael Champagne
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]




**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction, unless specifically agreed otherwise.  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

--
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: php-list-
[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] Opening Remote Files

2001-03-27 Thread Nick Norton

Does anyone know of a method to read a remote password protected file
without actually downloading it locally and then reading?

- Nick


-- 
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] sort multidimensional array?

2001-03-27 Thread phpman

 Hello,

 i have this code:

while ($row = mysql_fetch_array($results)) {
$tmp = get_item_reorder_priority($row["item_sku"]);
$list[$r]["priority"] = $tmp[0];
$list[$r]["sku"] = $row["item_sku"];
$r++;
   }

   $list = array_multisort($list["priority"], SORT_NUMERIC, SORT_DESC);

and it returns this error:
  Warning: Argument 1 to array_multisort() is expected to be an array or a
sort flag in d://www/inventory_specific.phtml on line 109

  function get_item_reorder_priority() returns an array - with $tmp[0] being
an integer 1-5
  $row["item_sku"] is simply a string.

  I'm trying to sort by priority numbers (1-5). Any help would be
appreciated.

  -dave



-- 
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] POP mail delete

2001-03-27 Thread Johannes Janson

Hi,

i'm not that much into mail functions but my manual tells
me that impa_delete selects a message to be deleted.
imp_expunge delets all selected messages.

look into the correct syntax

Johannes

"Miguel Carvalho" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I, i'm a little new to PHP.

 I'm sorry if this question has already be answerd, but i have i have
 searched the list, and i have not found any arcticle about it.

 My question is:
 How do i delete a message from a POP server, using  PHP functions?

 I have tried, imap_setflag_full, imap_delete, but no luck.

 Can any one point me to some solution?

 If possible, i dont want to dig into the POP protocol.

 Thanks.
 Miguel Carvalho


 --
 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] Simple If-else statement - Fixed

2001-03-27 Thread Louis Brooks

Thanks for all the help. I finally got it to work. I ended up using a bunch 
of if ($lname=="") { statements instead of if (($lname=="") || 
($fname=="")) { and that seems to be working. I still can't get the 
header() statement to work. So I just cheated and put in some text telling 
the user to hit the back button and fill out the rest of the information on 
the form.

Louis


At 02:29 PM 3/27/01 -0500, you wrote:
H-

Another solution might be to use javascript to check the fields before
the page is even submitted to make sure they put "something" in the
first and last name fields.

Unfortunately I'm not a javascript person but I've seen it done so much
I'm sure you could find examples on the web or via a web search engine.

As far as your code; I concure with the other posters replies: "" is
empty, " " is a space. I've made the same mistake. Also did the if
($name = "") { } Screwed me up for a bit until I remembered == is
comparison. 8^) Oh well if you don't use it you lose it.

Take it easy.
-Sterling


Louis Brooks wrote:
 
  Hi:
 
  I am trying to set up a simple script that will verify that all the blanks
  in a form have been filled out and then submit that to mySQL. If the form
  has not been completely filled out I want it to redirect them back to the
  original form. I know that the mySQL part of the script works, but I am
  unable to get the part of the script that checks the form input to see if
  everything was filled out to work. It seems to bypass this part of the
  script and enter the info into mySQL . Here is what I have so far:
 
  If (($fname == " ") || ($lname == " "))
   {
   header("Location: 
 http://callook.org/member_joinform.html");
  }else{
   $db = mysql_connect("localhost", "name", "password");
   mysql_select_db("dBase",$db);
   $sql = "INSERT INTO
  members
  (fname,lname,address,city,state,zip,country,email,username,password)
  VALUES
  
 ('$fname','$lname','$address','$city','$state','$zip','$country','$email','$user
  name','$password')";
   $result = mysql_query($sql);
  }
 
  I hope the formatting comes out right. I am sure it is something simple I
  have missed but I have tried the script several different ways and nothing
  seems to work. Thank you for any help.
 
  Sincerely,
 
  Louis Brooks
 
  BTW: Is there a faq for this list before I go asking anymore questions?

--
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-CVS] cvs: php4 / acinclude.m4 configure.in /ext/aspell config.m4 /ext/bz2 config.m4 /ext/ccvs config.m4 /ext/cpdf config.m4 /ext/crack config.m4 /ext/curl config.m4 /ext/cybercash config.m4 /ext/cybermut config.m4 /ext/dba config.m4 /ext/domxml config.m4 /ext/fbsql config.m4 /ext/fdf config.m4 /ext/fribidi config.m4 /ext/gd config.m4 /ext/gettext config.m4 /ext/gmp config.m4 /ext/icap config.m4 /ext/iconv config.m4 /ext/imap config.m4 /ext/informix config.m4 /ext/ingres_ii config.m4 /ext/interbase config.m4 /ext/ircg config.m4 /ext/java config.m4 /ext/ldap config.m4 /ext/mcal config.m4 /ext/mcrypt config.m4 /ext/mhash config.m4 /ext/midgard config.m4 config.m4.session /ext/ming config.m4 /ext/mnogosearch config.m4 /ext/msql config.m4 /ext/muscat config.m4 /ext/mysql config.m4 /ext/oci8 config.m4 /ext/odbc config.m4 /ext/oracle config.m4 /ext/ovrimos config.m4 /ext/pcre config.m4 /ext/pdf config.m4 /ext/pfpro config.m4 /ext/pgsql config.m4 /ext/pspell config.m4 /ext/qtdom config.m4 /ext/readline config.m4 /ext/recode config.m4 /ext/sablot config.m4 /ext/session config.m4 /ext/snmp config.m4 /ext/swf config.m4 /ext/sybase config.m4 /ext/sybase_ct config.m4 /ext/vpopmail config.m4 /ext/xml config.m4 /ext/zlib config.m4 /ext/zziplib config.m4 /sapi/aolserver config.m4 /sapi/apache config.m4 /sapi/apache2filter config.m4 /sapi/caudium config.m4 /sapi/fastcgi config.m4 /sapi/isapi config.m4 /sapi/nsapi config.m4 /sapi/phttpd config.m4 /sapi/pi3web config.m4 /sapi/roxen config.m4 /sapi/thttpd config.m4

2001-03-27 Thread Jani Taskinen

sniper  Tue Mar 27 12:34:51 2001 EDT

  Modified files:  
/php4   acinclude.m4 configure.in 
/php4/ext/aspellconfig.m4 
/php4/ext/bz2   config.m4 
/php4/ext/ccvs  config.m4 
/php4/ext/cpdf  config.m4 
/php4/ext/crack config.m4 
/php4/ext/curl  config.m4 
/php4/ext/cybercash config.m4 
/php4/ext/cybermut  config.m4 
/php4/ext/dba   config.m4 
/php4/ext/domxmlconfig.m4 
/php4/ext/fbsql config.m4 
/php4/ext/fdf   config.m4 
/php4/ext/fribidi   config.m4 
/php4/ext/gdconfig.m4 
/php4/ext/gettext   config.m4 
/php4/ext/gmp   config.m4 
/php4/ext/icap  config.m4 
/php4/ext/iconv config.m4 
/php4/ext/imap  config.m4 
/php4/ext/informix  config.m4 
/php4/ext/ingres_ii config.m4 
/php4/ext/interbase config.m4 
/php4/ext/ircg  config.m4 
/php4/ext/java  config.m4 
/php4/ext/ldap  config.m4 
/php4/ext/mcal  config.m4 
/php4/ext/mcryptconfig.m4 
/php4/ext/mhash config.m4 
/php4/ext/midgard   config.m4 config.m4.session 
/php4/ext/ming  config.m4 
/php4/ext/mnogosearch   config.m4 
/php4/ext/msql  config.m4 
/php4/ext/muscatconfig.m4 
/php4/ext/mysql config.m4 
/php4/ext/oci8  config.m4 
/php4/ext/odbc  config.m4 
/php4/ext/oracleconfig.m4 
/php4/ext/ovrimos   config.m4 
/php4/ext/pcre  config.m4 
/php4/ext/pdf   config.m4 
/php4/ext/pfpro config.m4 
/php4/ext/pgsql config.m4 
/php4/ext/pspellconfig.m4 
/php4/ext/qtdom config.m4 
/php4/ext/readline  config.m4 
/php4/ext/recodeconfig.m4 
/php4/ext/sablotconfig.m4 
/php4/ext/session   config.m4 
/php4/ext/snmp  config.m4 
/php4/ext/swf   config.m4 
/php4/ext/sybaseconfig.m4 
/php4/ext/sybase_ct config.m4 
/php4/ext/vpopmail  config.m4 
/php4/ext/xml   config.m4 
/php4/ext/zlib  config.m4 
/php4/ext/zziplib   config.m4 
/php4/sapi/aolserverconfig.m4 
/php4/sapi/apache   config.m4 
/php4/sapi/apache2filterconfig.m4 
/php4/sapi/caudium  config.m4 
/php4/sapi/fastcgi  config.m4 
/php4/sapi/isapiconfig.m4 
/php4/sapi/nsapiconfig.m4 
/php4/sapi/phttpd   config.m4 
/php4/sapi/pi3web   config.m4 
/php4/sapi/roxenconfig.m4 
/php4/sapi/thttpd   config.m4 
  Log:
  Renamed the AC_ prefixed macros defined in acinclude.m4 to PHP_* prefixes.
  # Heads up people! I tested this before committing but you never know..
  
  

Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.121 php4/acinclude.m4:1.122
--- php4/acinclude.m4:1.121 Tue Feb 20 23:39:13 2001
+++ php4/acinclude.m4   Tue Mar 27 12:34:20 2001
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.121 2001/02/21 07:39:13 sas Exp $
+dnl $Id: acinclude.m4,v 1.122 2001/03/27 20:34:20 sniper Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -35,20 +35,20 @@
   ])
   CPPFLAGS=$old_CPPFLAGS
 
-  AC_ADD_LIBPATH($OPENSSL_DIR/lib)
+  PHP_ADD_LIBPATH($OPENSSL_DIR/lib)
 
   AC_CHECK_LIB(crypto, CRYPTO_free, [
-AC_ADD_LIBRARY(crypto)
+PHP_ADD_LIBRARY(crypto)
   ],[
 AC_MSG_ERROR(libcrypto not found!)
   ])
 
   AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
-AC_ADD_LIBRARY(ssl)
+PHP_ADD_LIBRARY(ssl)
   ],[
 AC_MSG_ERROR(libssl not found!)
   ])
-  AC_ADD_INCLUDE($OPENSSL_INC)
+  PHP_ADD_INCLUDE($OPENSSL_INC)
 ])
 
 dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
@@ -62,11 +62,11 @@
 case "$ac_i" in
 -l*)
   ac_ii=`echo $ac_i|cut -c 3-`
-  AC_ADD_LIBRARY($ac_ii,,$2)
+  PHP_ADD_LIBRARY($ac_ii,,$2)
 ;;
 -L*)
   ac_ii=`echo $ac_i|cut -c 3-`
-  AC_ADD_LIBPATH($ac_ii,$2)
+  PHP_ADD_LIBPATH($ac_ii,$2)
 ;;
 esac
   done
@@ -82,7 +82,7 @@
 case "$ac_i" in
 -I*)
   ac_ii=`echo $ac_i|cut -c 3-`
-  AC_ADD_INCLUDE($ac_ii)
+  PHP_ADD_INCLUDE($ac_ii)
 ;;
 esac
   done
@@ -522,11 +522,11 @@
 ])
 
 dnl
-dnl AC_EXPAND_PATH(path, variable)
+dnl PHP_EXPAND_PATH(path, variable)
 dnl
 dnl expands path to an absolute path and assigns it to variable
 dnl
-AC_DEFUN(AC_EXPAND_PATH,[
+AC_DEFUN(PHP_EXPAND_PATH,[
   if test -z "$1" || echo "$1" | grep '^/' /dev/null ; then
 $2="$1"
   else
@@ -539,13 +539,13 @@
 ])
 
 dnl
-dnl AC_ADD_LIBPATH(path[, shared-libadd])
+dnl PHP_ADD_LIBPATH(path[, shared-libadd])
 dnl
 dnl add a library to linkpath/runpath
 dnl
-AC_DEFUN(AC_ADD_LIBPATH,[
+AC_DEFUN(PHP_ADD_LIBPATH,[
   if test "$1" != "/usr/lib"; then
-AC_EXPAND_PATH($1, ai_p)
+PHP_EXPAND_PATH($1, ai_p)
 if test "$ext_shared" = "yes"  test -n "$2"; then
   $2="-R$1 -L$1 [$]$2"
 else
@@ -559,11 +559,11 @@
 ])
 
 dnl
-dnl AC_BUILD_RPATH()
+dnl PHP_BUILD_RPATH()
 dnl
 dnl builds RPATH from PHP_RPATHS
 dnl
-AC_DEFUN(AC_BUILD_RPATH,[
+AC_DEFUN(PHP_BUILD_RPATH,[
   if test 

Re: [PHP] Simple If-else statement - Fixed

2001-03-27 Thread Johannes Janson

Hi,

for the haeder just make sure that there is NO output
whatsoever before the header-call. even if line 1 of your
script is empty before the ?php-tag the header doesn't work.


"Louis Brooks" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Thanks for all the help. I finally got it to work. I ended up using a
bunch
 of if ($lname=="") { statements instead of if (($lname=="") ||
 ($fname=="")) { and that seems to be working. I still can't get the
 header() statement to work. So I just cheated and put in some text telling
 the user to hit the back button and fill out the rest of the information
on
 the form.

 Louis






-- 
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] Is it possible to have href link refer to same PHP file?

2001-03-27 Thread Michael Champagne

But then how would you process it in the same file?  If I'm calling it from
myfile and my link is to myfile then how does it know that it's already been
clicked?

Thanks,
Mike

 On Tue, 27 Mar 2001 14:04:58 -0600 (Central Standard Time), Michael
 Champagne ([EMAIL PROTECTED]) wrote:
 Is there a way to have an ordinary href link call some javascript
 and say "are
 you sure blah blah blah?" and then once you hit Ok it calls the same
 php file
 which then does all the database stuff?

 a href="myfile" onclick="return confirm('are you sure blah blah
 blah')"

 I know I can do this just by creating another PHP file and having
 the link
 call that, but it seems like it would be nicer to have this in the
 same file.
 
 Thanks!
 
 --
 Michael Champagne
 wk: [EMAIL PROTECTED]
 hm: [EMAIL PROTECTED]
 
 
 
 
 **
 This communication is for informational purposes only.  It is not
 intended as an offer or solicitation for the purchase or sale of
 any financial instrument or as an official confirmation of any
 transaction, unless specifically agreed otherwise.  All market
 prices, data and other information are not warranted as to
 completeness or accuracy and are subject to change without
 notice.  Any comments or statements made herein do not
 necessarily reflect the views or opinions of Capital Institutional
 Services, Inc.  Capital Institutional Services, Inc. accepts no
 liability for any errors or omissions arising as a result of
 transmission.  Use of this communication by other than intended
 recipients is prohibited.
 **
 
 --
 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: php-list-
 [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]



-- 
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

-- 
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] Is it possible to have href link refer to same PHP file?

2001-03-27 Thread Mark Maggelet

On Tue, 27 Mar 2001 15:50:44 -0600 (Central Standard Time), Michael
Champagne ([EMAIL PROTECTED]) wrote:
But then how would you process it in the same file?  If I'm calling
it from
myfile and my link is to myfile then how does it know that it's
already been
clicked?

well you can make the url be:
myfile?clicked=true

then do
if(isset($clicked)){
// do stuff
}

up at the top.

- Mark

Thanks,
Mike

 On Tue, 27 Mar 2001 14:04:58 -0600 (Central Standard Time),
Michael
 Champagne ([EMAIL PROTECTED]) wrote:
 Is there a way to have an ordinary href link call some javascript
 and say "are
 you sure blah blah blah?" and then once you hit Ok it calls the
same
 php file
 which then does all the database stuff?

 a href="myfile" onclick="return confirm('are you sure blah blah
 blah')"

 I know I can do this just by creating another PHP file and having
 the link
 call that, but it seems like it would be nicer to have this in
the
 same file.
 
 Thanks!
 
 --
 Michael Champagne
 wk: [EMAIL PROTECTED]
 hm: [EMAIL PROTECTED]
 
 
 
 

**
 This communication is for informational purposes only.  It is not
 intended as an offer or solicitation for the purchase or sale of
 any financial instrument or as an official confirmation of any
 transaction, unless specifically agreed otherwise.  All market
 prices, data and other information are not warranted as to
 completeness or accuracy and are subject to change without
 notice.  Any comments or statements made herein do not
 necessarily reflect the views or opinions of Capital
Institutional
 Services, Inc.  Capital Institutional Services, Inc. accepts no
 liability for any errors or omissions arising as a result of
 transmission.  Use of this communication by other than intended
 recipients is prohibited.

**
 
 --
 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: php-list-
 [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: php-list-
[EMAIL PROTECTED]



--
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction, unless specifically agreed otherwise.  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

--
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: php-list-
[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] password

2001-03-27 Thread Henrik Hansen

"Marisol Daz E." [EMAIL PROTECTED] wrote:

  1.  (*) text/plain  
  
  Hi
  
  I need the code, for protecting the dir by password.

take a look at htaccess files

-- 
Henrik Hansen


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




[PHP] sessions without cookies?

2001-03-27 Thread duirfire

Hi, can someone point me toward a tutorial that shows how to register info
(e.g. username, login status, and user preferences) and do this in a session
without using cookies... is this even possible?

thanks!
duirfire


-- 
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] $myfile[$count]_type?!

2001-03-27 Thread FredrikAT

Hi, again!

Didn't work...

This is the scene: (file.php?a=input)
input type=\"file\" name=\"myfile[$count]"

(file.php?a=reg)
Trying to echo type...
${$myfile[$count] . '_type'} // NOT WORKIN'
${$myfile$count}_type // NOT WORKIN'

Any suggestions?

Fredrik A. Takle
Bergen, Norway



""FredrikAT"" [EMAIL PROTECTED] skrev i melding
99qqqo$v1c$[EMAIL PROTECTED]">news:99qqqo$v1c$[EMAIL PROTECTED]...
 Why can't I do $myfile[$count]_type?!
 What schould I do instead?

 -
 Fredrik A. Takle
 [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] $myfile[$count]_type?!

2001-03-27 Thread Philip Olson


Try this example :

?php

$array = array('a','b','c');
$index = 1;

${$array[$index] . '_type'} = 'foo';

print $b_type;  // prints foo

?

Regards,

Philip


On Wed, 28 Mar 2001, FredrikAT wrote:

 Hi, again!
 
 Didn't work...
 
 This is the scene: (file.php?a=input)
 input type=\"file\" name=\"myfile[$count]"
 
 (file.php?a=reg)
 Trying to echo type...
 ${$myfile[$count] . '_type'} // NOT WORKIN'
 ${$myfile$count}_type // NOT WORKIN'
 
 Any suggestions?
 
 Fredrik A. Takle
 Bergen, Norway
 
 
 
 ""FredrikAT"" [EMAIL PROTECTED] skrev i melding
 99qqqo$v1c$[EMAIL PROTECTED]">news:99qqqo$v1c$[EMAIL PROTECTED]...
  Why can't I do $myfile[$count]_type?!
  What schould I do instead?
 
  -
  Fredrik A. Takle
  [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] data entry validation

2001-03-27 Thread Chris Worth


I'm working with some forms that need the data validated.  Dates, times etc.

my question is, how do I "reset" the form back to the original screen with variables 
intact so they can make the changes?

is there a code snippet some place i can work with?

thanks,

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] data entry validation

2001-03-27 Thread Miles Thompson

Chris,

Go to www.thickbook.com. Julie Meloni has a tutorial there which gives you 
exactly what you want. It's the one which has to do with custom error 
messages, which , believe or not, are on the subject of data validation.

Miles

At 06:31 PM 3/27/01 -0500, Chris Worth wrote:

I'm working with some forms that need the data validated.  Dates, times etc.

my question is, how do I "reset" the form back to the original screen with 
variables
intact so they can make the changes?

is there a code snippet some place i can work with?

thanks,

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] Array in Form Elements

2001-03-27 Thread Jason Lotito

Okay, here is the question, I have a form that will continue to grow in the
number of elements that it contains.  The values are passed into a function,
and then written out to a file.

Currently, I have 38 seperate values that are being passed into this
function, making the arguments for the function very long.  Now, I know I
can pass an array into a function, however, I would like to know if there
was a way to name the elements of the form as in an array, for example:

input name="array[1]" type="text"
input name="array[2]" type="text"
input name="array[3]" type="text"
input name="array[4]" type="text"

and then, rather than having to pass all 38 seperate arguements into the
function, I could simply pass the array like this:

function_name($array);

And then simply dissect the array inside the function like normal?

Thanks

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.


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




  1   2   >