php-general Digest 15 Sep 2005 17:58:48 -0000 Issue 3684

2005-09-15 Thread php-general-digest-help

php-general Digest 15 Sep 2005 17:58:48 - Issue 3684

Topics (messages 222459 through 222480):

Re: Size limits of mysql
222459 by: Georgi Ivanov

passing values from dynamic form to another php page?
222460 by: hope
222461 by: hope
222470 by: Jay Blanchard

Re: mysql query
222462 by: Mark Rees

Re: Quick Poll: PHP 4 / 5
222463 by: Jochem Maas
222471 by: Oliver Grätz
222472 by: Robert Cummings

Re: PDO for PHP 4 (was Re: Quick Poll: PHP 4 / 5)
222464 by: Kevin Waterson
222467 by: Lester Caine
222469 by: Oliver Grätz

Re: php/mysql object id question..
222465 by: Oliver Grätz

cookies problem
222466 by: Ross

php and .htaccess...can't figure it out!
222468 by: blackwater dev
222477 by: John Nichel

PHP combined with JAVA
222473 by: Stasa Jerinic
222474 by: Stasa Jerinic

Re: trying to figure out the best/efficient way to tell whois loggedintoa site..
222475 by: Dan Baker

Re: size limit in mysql tables?
222476 by: John Nichel

Domain Info Possible?
222478 by: Chirantan Ghosh
222479 by: Jordan Miller

How to output a PNG with GD with same headers as pre-existing PNG file
222480 by: Graham Anderson

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:
php-general@lists.php.net


--
---BeginMessage---
There is [max allowed packet] variable in mysql. The default is 1MB in my 
config.
May be this is what stops you. Try increasing this value.


On Wednesday 14 September 2005 01:07, [EMAIL PROTECTED] wrote:
 Hi All,





 I have a simple database with one table with about 6 fields, just
 holding filenames, filepaths and sizes.  Very basic audit for management
 here.   Problem is I import a load of records into this table and it
 seems to only allow me to put in about 550,000 records.Maybe it's
 just mysqlFront that can only display that many records or something.
 Anybody know of a size or record limit in mysql tables?  The actual size
 of the database is about 70Mb.   Not huge really.





 Thanks



 Matthew
---End Message---
---BeginMessage---

hi

i  m generating a dynamic form (no. of fileds depend upon user selection 
from previous page).

On this page user enters values into form fields
and i want to acess them on next page.
///file1.php

?php require_once('../Connections/cnn.php'); 
/

$cID=$HTTP_POST_VARS['select1']; //echo $cID;
$query1 =  SELECT * FROM categories where cat_id=$cID ;
$result1 = mysql_query($query1, $cnn) or die(mysql_error());
$row1=mysql_fetch_array($result1);
$cat_name=$row1['cat_name']; //echo $cat_name;
$cat_image=$row1['cat_image']; //echo $cat_name;
$cat_intro_text=$row1['cat_intro_text']; //echo $cat_name;
$attributes_list =$HTTP_POST_VARS['sql_query'];
echo $attributes_list;
$fldslist=split(,,$attributes_list);
$fldCount=count($fldslist);
$_SESSION['num_fields']=$fldCount;
$_SESSION['list_fields']=$fldslist;
?
html
head
/head
body
form name=sqlform action=table1_process2.php method=post 
enctype=multipart/form-data 

table width=100% border=0 cellpadding=0 
cellspacing=0
tr 
 td width=13nbsp;/td
 td width=654 valign=top align=centerfont 
color=ffstrongWelcome to the Administration 
Panel/strong/font/td

 td width=12nbsp;/td
 td width=14nbsp;/td
   /tr
tr
  tdnbsp;/td
  td valign=topnbsp;/td
  tdnbsp;/td
  tdnbsp;/td
  /tr
tr
  tdnbsp;/td
  td height=26 align=centerfont color=ff 
size=+1Category:nbsp;nbsp;?php echo 
$cID..nbsp;.$cat_name;?/font/td

  tdnbsp;/td
  tdnbsp;/td
  /tr
tr
 tdnbsp;/td
 td valign=topdiv align=center
   table width=100%  border=0 cellspacing=0 
cellpadding=0

 tr
   tdnbsp;/td
   td width=40nbsp;/td
tdnbsp;/td
 /tr
 tr align=left
   td align=leftimg 
src=../images/categories/?php echo $cat_image;? width=80 
height=100/td

   td nbsp;/td
		td align=justify 

Re: [PHP] Size limits of mysql

2005-09-15 Thread Georgi Ivanov
There is [max allowed packet] variable in mysql. The default is 1MB in my 
config.
May be this is what stops you. Try increasing this value.


On Wednesday 14 September 2005 01:07, [EMAIL PROTECTED] wrote:
 Hi All,





 I have a simple database with one table with about 6 fields, just
 holding filenames, filepaths and sizes.  Very basic audit for management
 here.   Problem is I import a load of records into this table and it
 seems to only allow me to put in about 550,000 records.Maybe it's
 just mysqlFront that can only display that many records or something.
 Anybody know of a size or record limit in mysql tables?  The actual size
 of the database is about 70Mb.   Not huge really.





 Thanks



 Matthew


[PHP] passing values from dynamic form to another php page?

2005-09-15 Thread hope

hi

i  m generating a dynamic form (no. of fileds depend upon user selection 
from previous page).

On this page user enters values into form fields
and i want to acess them on next page.
///file1.php

?php require_once('../Connections/cnn.php'); 
/

$cID=$HTTP_POST_VARS['select1']; //echo $cID;
$query1 =  SELECT * FROM categories where cat_id=$cID ;
$result1 = mysql_query($query1, $cnn) or die(mysql_error());
$row1=mysql_fetch_array($result1);
$cat_name=$row1['cat_name']; //echo $cat_name;
$cat_image=$row1['cat_image']; //echo $cat_name;
$cat_intro_text=$row1['cat_intro_text']; //echo $cat_name;
$attributes_list =$HTTP_POST_VARS['sql_query'];
echo $attributes_list;
$fldslist=split(,,$attributes_list);
$fldCount=count($fldslist);
$_SESSION['num_fields']=$fldCount;
$_SESSION['list_fields']=$fldslist;
?
html
head
/head
body
form name=sqlform action=table1_process2.php method=post 
enctype=multipart/form-data 

table width=100% border=0 cellpadding=0 
cellspacing=0
tr 
 td width=13nbsp;/td
 td width=654 valign=top align=centerfont 
color=ffstrongWelcome to the Administration 
Panel/strong/font/td

 td width=12nbsp;/td
 td width=14nbsp;/td
   /tr
tr
  tdnbsp;/td
  td valign=topnbsp;/td
  tdnbsp;/td
  tdnbsp;/td
  /tr
tr
  tdnbsp;/td
  td height=26 align=centerfont color=ff 
size=+1Category:nbsp;nbsp;?php echo 
$cID..nbsp;.$cat_name;?/font/td

  tdnbsp;/td
  tdnbsp;/td
  /tr
tr
 tdnbsp;/td
 td valign=topdiv align=center
   table width=100%  border=0 cellspacing=0 
cellpadding=0

 tr
   tdnbsp;/td
   td width=40nbsp;/td
tdnbsp;/td
 /tr
 tr align=left
   td align=leftimg 
src=../images/categories/?php echo $cat_image;? width=80 
height=100/td

   td nbsp;/td
		td align=justify class=highlight?php echo $cat_intro_text; 
?/td

 /tr
 tr
   tdnbsp;/td
tdnbsp;/td
   tdnbsp;/td
 /tr
   /table
 /div/td
 tdnbsp;/td
 tdnbsp;/td
/tr
tr
  tdnbsp;/td
  td align=centerfont class=highlight size=+1Product 
Attributes/font/td

  tdnbsp;/td
  tdnbsp;/td
/tr
tr
  tdnbsp;/td
  td valign=top
  	table width=95% align=center border=1 cellpadding=0 
cellspacing=0

tr class=highlight
	?php 
	for ($i=0;$i$fldCount;$i++)

{
echo td$fldslist[$i]/td;
}   
?
tdAction/td
/tr
tr class=highlight
	?php 
	for ($j=0;$j$fldCount;$j++)

{
		echo tdinput type='text' name='$fldslist[$j]' size='8' value='' 
maxlength='8'/td;


}   
?
	tdinput type=submit name=submit value=Add Product 
onClick=return validateForm(this) onKeyPress=return validateForm(this)

input type=hidden name=cat_id value=?php 
echo $cID;?
input type=hidden name=MM_insert 
value=sqlform/td
/tr
/table
  /td
  tdnbsp;/td
  tdnbsp;/td
/tr
tr
  tdnbsp;/td
  td valign=top nbsp;/td

Re: [PHP] mysql query

2005-09-15 Thread Mark Rees
On Wednesday 14 September 2005 07:36 pm, Jesús Alain Rodríguez Santos wrote:
 I have a table colum in mysql with two fields: day and month. I
 would like to know if it's possible to make a query where I can
 determine if exist days before to a selected day, for example:
 if I have in my table:
 day 19 - month 05, I wish to know if there are previous days
 inserted at the 19, the days they are not inserted in the table,
 they are inserted according your selection, what I want to get is
 that every time that you insert a day, I want to check if there
 are days previous to the one already inserted in the table in the
 same month, in case that there are not them then they owe you
 to insert together with the one selected,

I haven't tried this, but the logic should work according to the manual:

You don't have to check, you can just insert all the data. If the row
already exists, the data will not be inserted. This assumes that you have a
constraint on the table which prevents duplicate values!

$day=19;
$month=5;
for($i=1;i=$day;i++){
$result=mysql_query(INSERT INTO table (month,day) VALUES (5,$i));
}




If you don't have a constraint, then you will have to loop over the data for
that month and insert the rows where they don't already exist.


 I wait they understand me what I want:
 I work php/mysql.
create table tableA (
 day int,
 month int
);



select * from tableA where month=5 and day  19;

This will select everything from the 5th month and before the 19th day of
the
5th month.

Is that what you were going for?



 sorry for my english i'm cuban
 Thank you and excuse the nuisances



 --
 Este mensaje ha sido analizado por MailScanner
 en busca de virus y otros contenidos peligrosos,
 y se considera que está limpio.

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



Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-15 Thread Jochem Maas

Stephen Leaf wrote:

On Tuesday 13 September 2005 05:52 pm, Ryan A wrote:


[x] I never work with PHP 4 anymore, all my work is with PHP 5



so far I've not found any hosts that do PHP5, however I do all my own hosting 
anyway.
I've switched to use PHP5 because I was interested in doing XSL, and the 
concept of doing objects intrigues me.


XSL support in 5 is far superior. It's a walk in the park now, where as before 
it was quite confusing.


I'm currently doing a project where the client doesn't know what she wants... 
because of this I'm constantly having to redo sections to add what she wants.

So taking this approach for this client has saved me from 10 times more work.

I personally can't wait for PDO. I do lots of projects that all use SQL 


thats because you don't use firebird DB ;-)

(SQLite, PostgreSQL and MySQL) Right now I have to recode everything to use 
the right DB. with my newest project I'm using SQLite with a custom Object to 
handle the DB Object. It's actually design with PDO in mind.
After they get PDO in and working well It'll save me hours of work. 

From that Website about the 6 dumbest ideas. I guess you could say I'm an 
early adopter I like ideas that'll save me time in the long run, even if 
I'm the one that has to do tons of testing to make it usable. The long run is 
what matters to me. If I can spend time learning, testing.. and then later be 
able to do something in 5 mins that'd take 15 the old way.. I'm up for it. 
Has to be someone to do the testing to bring projects forward isn't 
there ? ;)


From the opposite side of the spectrum I have had my share of upgrade issues.
One was from 5.0.4 to 5.0.5

$this-urlArr[0] = array_pop($arr = explode(,$this-urlArr[0]));

I still have to scratch my head as to why I *need* that $arr = 
prior to 5.0.5 this was not needed.


prior to 5.0.5 this was allowed but technically its the cause of memory 
corruption
and has now been madce into a fatal error - the reason is that array_pop() takes
its arg as a reference (to a variable) - if you pass it the return value of a 
function
then its technically not referencing something that exists because the value 
(the array
that explode returns) only exists in the scope of the explode function call and 
that dies
when explode returns  placing the '$arr =' means you are assigning the 
return value of
explode() to $arr and passing a reference to the same variable.


$this-urlArr[0] = array_pop(explode(,$this-urlArr[0]));

Perhaps someone here could tell me what was change to make this happen.. and 
how does that change make the engine better? It seemed to work perfectly fine 
before.


'seemed' being the operative word. allowing code without the '$arr =' (from 
your example)
is/was the source of many strange/subtle  difficult (impossible) to debug
segmentation faults (memory corruption) which quite often sprung up in 
large/complex
codebases.



I've also had to upgrade a few classes written for PHP4 specifically ones that 
like to use:

var $variable;

Overall, If you can upgrade to 5 .. do so. the advantages in my cases have 
been so nice. If you can't upgrade, Don't. Use what works.
I personally would urge you to upgrade to 5 if you wanna get in deep with 
objects. I'm sure that 3 and 4 can do them just fine. but whats the use of 
learning how to do OOP in something that has been updated? Or worded 
differently, Why learn old ways when you can benefit from newer 
ideas/implementations ?
It'd be like putting logs under a platform and repositioning the log that came 
out the back in the front again as a way to move something instead of wagon 
just because it's always worked before.




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



Re: [PHP] PDO for PHP 4 (was Re: Quick Poll: PHP 4 / 5)

2005-09-15 Thread Kevin Waterson
This one time, at band camp, Manuel Lemos [EMAIL PROTECTED] wrote:


 The matter is that PDO does not offer real database independence, so
 application developers that want to not have to deal with the important
 aspects that are different among databases will still have to deal them
 in their applications making their applications non-portable.

The point of PDO is not to gain database independence, rather a very
real attempt to create a standard database interface for PHP. This
it succeeds in doing.

Kevin

-- 
Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote.

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



Re: [PHP] php/mysql object id question..

2005-09-15 Thread Oliver Grätz
Jasper Bryant-Greene schrieb:
 Oliver Grätz wrote:
 
3. Yes. One can abuse exceptions to return something in a constructor.
   Just another argument against exceptions ;-) OK, it's unorthodox,
   if you absolutely need to do that, do it and tell nobody *g*.
 
 This is not abusing exceptions. If you throw an exception then the 
 expected behaviour should be that the following code should not be 
 executed [1].
If you throw the exception for error purpose it's OK, but if you throw
the exception just for the purpose of returning a value then it's abuse.
That's what I meant.

 Throwing an exception inside a constructor will prevent the object from 
 being created. It will not allow you to return something of your 
 choice -- I haven't tested but I would expect that the variable you were 
 setting as the object would either remain unset or would be set to NULL.

Tested. non-object. At least this is as expected ;-)

 I'm not too sure why you said just another argument against exceptions 
 (apart from perhaps a lack of understanding) as exceptions are a very 
 useful feature in any language.

Sorry I didn't mark this as personal opinion (just like all the rest).
Exceptions make good programming more difficult without need. Raymond
Chen wrote this about exceptions:

http://blogs.msdn.com/oldnewthing/archive/2005/1/14.aspx


AllOLLi

This time it will surely run.

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



[PHP] cookies problem

2005-09-15 Thread Ross
I am very close to getting this sorted.Thanks for all the help on 
'variable variables' and var_dump. Two useful techniques.

My function works but throws up a cookie problem

if (isset($add)){


${$add} = intval($_COOKIE['cookie'][$add]);
$new= $$add+1;
setcookie(cookie[$add], $new $add);
echo var_dump($_COOKIE['cookie'][$add]);

}

At the beginining of my page I have...

session_start();
require_once('init_cookies.php');

Init_cookies is jus a for loop to initialise the cookies...

$dishes= array (pakora, haggis_fritter);
for ($i=0; $i  2; $i++){
setcookie(cookie[$dishes[$i]], 0 $dishes[$i]);

when I leave it in it resets the cookies when they are sent to the page. 
When I take it out the headers already sent error occurs. I do not know if 
this is my lack of undertanding of require_once/include_once.

I need a way to initialise the cookies one time only. I have tried an 'if 
(isset)' but that doesn't work.


thanks again


Ross 

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



Re: [PHP] PDO for PHP 4 (was Re: Quick Poll: PHP 4 / 5)

2005-09-15 Thread Lester Caine

Kevin Waterson wrote:


The matter is that PDO does not offer real database independence, so
application developers that want to not have to deal with the important
aspects that are different among databases will still have to deal them
in their applications making their applications non-portable.


The point of PDO is not to gain database independence, rather a very
real attempt to create a standard database interface for PHP. This
it succeeds in doing.


It is a reasonable start, but given the MAJOR differences in SQL, it is 
only a start and only solves SOME of the 'standardisation' problems in 
what seems a less than 'standard' way :(
Most of us need it to get a lot more support before we can even start to 
consider switching to it - and the agro caused by now having apparently 
*FIVE* versions of PHP on the go does not help .
( PHP4.3.x - PHP4.4.0 - PHP5.0.5 - PHP5.1.x and PHP6 ALL of which 
require work moving even existing applications between them !!! )


Having to go BACK to fix problems introduced by PHP4.4 when the main 
development effort is PHP5 is simply a waste of resources - for a 
'problem' that should perhaps have been picked up a lot sooner so that 
the 'use' of it in many libraries could have been prevented in the first 
place ?
Many people can't even fix the errors because they are in third party 
libraries - so the ISP's HAVE to drop back to 4.3 ? But it would be nice 
to see an orderly move to a SINGLE PHP codebase ?


--
Lester Caine
-
L.S.Caine Electronic Services

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



[PHP] php and .htaccess...can't figure it out!

2005-09-15 Thread blackwater dev
Ok,

As per an earlier post, I am having problems with .htaccess files.  I
am trying to set certain php directives using .htaccess files.  First
it was complaining about several things such as mcrypt and zde:

snip
Wed Sep 14 20:04:46 2005] [notice] caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library
'./php_mcrypt.so' - ./php_mcrypt.so: cannot open shared object file:
No such file or directory in Unknown o$
This version of ZDS requires a license. License check failed: Cannot
find the license file: zend_performance_suite.zl (path was:
/usr/local/Zend:/usr/local/Zend/etc:$
Zend Download Server not enabled.
[Wed Sep 14 20:04:51 2005 (18237)] [Zend Accelerator] [Info] License
check failed: Cannot find the license file: zend_canaveral.zl (path
was: /usr/local/Zend:/usr/lo$

[Wed Sep 14 20:04:51 2005] [notice] Apache/2.0.52 (Unix) PHP/5.0.3
configured -- resuming normal operations
/snip

I then compiled php without mcrypt and removed all the Zend stuff from
the php.ini file and now I get this in the logs:

snip
[Thu Sep 15 04:28:12 2005] [notice] caught SIGTERM, shutting down
[Thu Sep 15 04:28:15 2005] [notice] Apache/2.0.52 (Unix) PHP/5.0.3
configured -- resuming normal operations
/snip

Which means absolutely nothing to me...can someone shed some light on
all this?  Why can't I use .htaccess files as this is all driving me a
little batty!

Thanks!

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



[PHP] Re: PDO for PHP 4 (was Re: Quick Poll: PHP 4 / 5)

2005-09-15 Thread Oliver Grätz
Manuel Lemos schrieb:

 NEWSFLASH: PDO already exists for PHP 4:
 
 http://www.phpclasses.org/pdo

One can't implement overloading of the Zend Engine 2 in PHP4 so this is
not the full package. And then, the most important feature of PDO is
that it's NOT WRITTEN IN PHP like any other database abstraction layer.
It's written in C for speed.

 Despite of that, I do not think PDO is a compelling reason to use PHP 5.
 Basically it is yet another attempt to do the same where other
 abstraction layers extensions have failed like ODBC and DBX.

It will not fail because it will be the de-facto-standard for new
programmers. PHP tutorials will start containing PDO examples instead of
mysql_* examples. That's even more true because the mysql extension is
not included by default anymore.

 The matter is that PDO does not offer real database independence, so
 application developers that want to not have to deal with the important
 aspects that are different among databases will still have to deal them
 in their applications making their applications non-portable.

This is true for the 10 percent of PHP programmers doing complicated
database stuff. PDO still is good for them because PDO explicitly makes
stuff unique to a particular DBMS available through its interface (the
doc is full of this will only work for some engines). The other 90
percent will be fine with what PDO has to offer.

AllOLLi


I'm bitter? Who's drunk and yelling at a dead woman?
[Lisa, 6Fu 501]

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



RE: [PHP] passing values from dynamic form to another php page?

2005-09-15 Thread Jay Blanchard
[snip]
form name=sqlform action=table1_process2.php method=post 
enctype=multipart/form-data 


//
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page 
in this context??
[/snip]

Look in the $_POST array (which matches the form method) on the next page.
For example;

?php

print_r($_POST);

?

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



Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-15 Thread Oliver Grätz
Manuel Lemos schrieb:

A reference where _I_ have to search is something like a non-answer...
 
 If you try searching the bug database for PHP 4 versus PHP 5 opened bug 
 reports you will get your answer.

Same sentence still applies. But OK: PHP4 has 518 open bugs, PHP5 only
203. What does this say about the stability of PHP4?

  http://bugs.php.net/bugstats.php?phpver=4
  http://bugs.php.net/bugstats.php?phpver=5

Also, PHP4 (first beta 19-Jul-1999) has a history of over 25300 bugs in
its 6 year long history whereas PHP5 (first beta 29-Jun-2003) has had
less than 4300 bugs filed in 2 years. Project this to 6 years and you
are at 13000 filed bugs, roughly half as many as for PHP4.

The site also states that PHP5 bugs are handled more quickly: PHP5: 47/3
vs PHP4: 71/5 (days average/median lifetime). So, you send me a link
supporting my arguments. Thank you.

 In case it was not clear for you, what I am saying is not the matter is 
 PHP 4.x vs. PHP 5.x, but rather upgrading vs. not upgrading.
 [...]
I've got PHP5 and 4 running on the same machine.
 
 I just do not get why you still run PHP 4 when you are so confident that 
 PHP 5 is the right version to use.

Didn't you give yourself the answer? I'm not using PHP5 (read:
upgrading) for stuff that doesn't want it (meaning its debian package
requires PHP4). For my own projects I use PHP5 and if I decide to use
some packages meant to be used with PHP4 I have yet to encounter real
problems that are PHP5-problems.

First of all, in many cases code reuse still is a myth. I hate to say it
but it's true. Then, a large potion of the PHP community hasn't even
heard of PEAR. Then, people definitely start projects from scratch. If
 
 You don't know if you have any numbers to back the large portion of the 
 PHP community claim.

The proof is the sheer number of this is *THE* PHP application
framework to use sites on the internet. Some people don't like reusing
code, some evaluate those projects and decide against them. For my part,
before reinventing the wheel I always spend some time serching through
PEAR and the web but very often the available solutions don't fit my
needs. I simply suppose other developers tend to act the same way.

 Anyway, as the developer of phpclasses.org, the largest PHP class 
 repository, I can inform you that the site has accumulated near 270,000 
 subscriber since 1999, of which at least half of them are considered 
 active as you may verify here:
 
 http://www.phpclasses.org/browse/statistics/statistics.html
 
 The site has 2,200 approved packages but only 71 are PHP 5 specific.
 
 That is a lot of people reusing a lot of public class libraries!

Ah, that thing. The site that always gives me problems when I try to log
in after absence. I had switched to reregistering for every access
before Berlios came along (thanks for threatening to sue them) and now I
use the Monster TGZs.


AllOLLi


\let\thepage\relax

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



Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-15 Thread Robert Cummings
On Thu, 2005-09-15 at 08:32, Oliver Grätz wrote:
 Manuel Lemos schrieb:
 
 A reference where _I_ have to search is something like a non-answer...
  
  If you try searching the bug database for PHP 4 versus PHP 5 opened bug 
  reports you will get your answer.
 
 Same sentence still applies. But OK: PHP4 has 518 open bugs, PHP5 only
 203. What does this say about the stability of PHP4?
 
   http://bugs.php.net/bugstats.php?phpver=4
   http://bugs.php.net/bugstats.php?phpver=5

Bug count is not necessarily indicative of stability issues. If there
are 100 bugs for a seldom used function and a single bug for a
ubiquitous function then the latter decreases stability more than the
former.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] PHP combined with JAVA

2005-09-15 Thread Stasa Jerinic
Hallo,

I write one Java class that gives my name back. I implemented the call of
this Java class in php Unit, but there are some problems, because I will to
make only one time the instance of Java class and put it into Session and
everytime when the page is reloaded to load the Java object from the
session.
By first time calling the php unit its work, but after reloading the unit
(in the example below, after clicking the button Send) I get everytime
java.lang.NullPointerException.

The example:
?php
  session_start();
  echo form method=\post\ action=\$_SERVER[PHP_SELF]\;
  if (!isset($_SESSION['P_User'])) {
echo Class not setbr;
$t = new Java(User);
$_SESSION['P_User']= $t;
  } else {
echo Class setbr;
  }
  $t1= $_SESSION['P_User'];
  echo $t1-getUserName();
  echo 'input type=submit value=Send name=B1';
  echo /form
?

What I want to do, is to make only one time a instance of java class and to
use this object during the session (Internet browser of client) is opened
and not to create everytime the java instance by reloading or requesting
other php Unit.

Greetings,
Jerinic Stasa

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



[PHP] PHP combined with JAVA

2005-09-15 Thread Stasa Jerinic
Hallo,

I write one Java class that gives my name back. I implemented the call of
this Java class in php Unit, but there are some problems, because I will to
make only one time the instance of Java class and put it into Session and
everytime when the page is reloaded to load the Java object from the
session.
By first time calling the php unit its work, but after reloading the unit
(in the example below, after clicking the button Send) I get everytime
java.lang.NullPointerException.

The example:
?php
  session_start();
  echo form method=\post\ action=\$_SERVER[PHP_SELF]\;
  if (!isset($_SESSION['P_User'])) {
echo Class not setbr;
$t = new Java(User);
$_SESSION['P_User']= $t;
  } else {
echo Class setbr;
  }
  $t1= $_SESSION['P_User'];
  echo $t1-getUserName();
  echo 'input type=submit value=Send name=B1';
  echo /form
?

What I want to do, is to make only one time a instance of java class and to
use this object during the session (Internet browser of client) is opened
and not to create everytime the java instance by reloading or requesting
other php Unit.

Greetings,
Jerinic Stasa

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



[PHP] Re: trying to figure out the best/efficient way to tell whois loggedintoa site..

2005-09-15 Thread Dan Baker
Ben [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Dan Baker wrote:
 The *main* reason I use $_REQUEST is so I can code up GET and POST pages 
 that all are handled by the same php functions.  I may have an item 
 called Key that contains what the end-user is expected to be doing 
 (User.Create or User.Edit or whatever).  Then I may have a link (GET) 
 that has ?Key=User.Create, while a form (POST) that has a hidden value 
 Key with value User.Create.  I don't really care if it came from a 
 GET or POST --  if the data is all valid, I'll allow it to work.

 How are you passing your values to your functions?  If you stick to local 
 variables in your functions they won't care where you got the values from. 
 Deal with the post or get values in whatever script handles your form 
 submissions and have it pass the values on to your functions.

 IE
 In your post handling script:

 $result=doSomething($_POST['this'],$_POST['that']);

 In your get handling script:

 $result=doSomething($_GET['this'],$_GET['that']);

Aha!  I direct my form's to the *exact* same page as GET's, so I don't even 
know if a POST or GET sent the data (generally speaking).  A typical page 
looks something like the following:

*Every* request goes to a single page (Maybe called Page.php), which does 
session management, includes several files that every page needs, and then 
decodes what page the end-user is actually interested in, something like:
 $key = explode('.', danbRequest::clean('key', 'a0._'));

Now, $key[0] = the Primary key, the main critter the end-user is trying to 
do.
and $key[1]... = secondary keys (maybe Edit or Create or whatever).

This first key is used to branch off to various pages to handle that 
specific Key.  Usually, I have 1 file per Key:
if ($key[0] == 'Account')
{
include_once('..\Account.php');
account_Handler($key);
}
else if ($key[0] == 'Cart')
{
include_once('..\Cart.php');
cart_Handler($key);
}

DanB

ps The above function danbRequest::clean() is a handy little function that 
performs almost all my cleaning of $_REQUEST values.  The first argument is 
the name, the second argument is a list of valid characters to allow.  The 
example given (danbRequest::clean('key', 'a0._')) will look for 
$_REQUEST['key'], if not found it returns false, if found -- it takes the 
value and cleans it to only include 'a0._' (all letters, all digits, all 
dots and underscores).

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



Re: [PHP] size limit in mysql tables?

2005-09-15 Thread John Nichel

[EMAIL PROTECTED] wrote:

I have a simple database with one table with about 6 fields, just
holding filenames, filepaths and sizes.  Very basic audit for management

here.   


Problem is I import a load of records into this table and it

seems to only allow me to put in about 550,000 records.


Maybe it's

just mysqlFront that can only display that many records or something.

Anybody know of a size or record limit in mysql tables?  The actual size

of the database is about 70Mb.   Not huge really.


That is just a fascinating story.

Now, do you have a php question for the group?

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] php and .htaccess...can't figure it out!

2005-09-15 Thread John Nichel

blackwater dev wrote:
snip

Which means absolutely nothing to me...can someone shed some light on
all this?  Why can't I use .htaccess files as this is all driving me a
little batty!

/snip

Did you try as someone suggested before, and put bogus content in the 
.htaccess file to see if Apache was even reading it?  If Apache is not 
reading your .htaccess file, an Apache mailing list should be able to help.


http://httpd.apache.org/lists.html

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



[PHP] Domain Info Possible?

2005-09-15 Thread Chirantan Ghosh
Hello,

I was wondering if there was way to generate domain statistics by any PHP 
script?

I just need some basic info like:
Monthly Traffic( Sites, Kbytes, Visits, Pages, Files, Hits )

Example: http://server18.internetserver.com/stats/1800homecare/

If it is possible can I also create a Log In for that page?

I would appreciate any direction.
Thanks,

C. Ghosh


Re: [PHP] Domain Info Possible?

2005-09-15 Thread Jordan Miller
do you have log files? the page you linked to was generated by  
webalizer. is there a reason you can't use that (or Awstats, or  
something similar)? you probably don't need to reinvent the wheel  
here... though you may need to tweak your webserver to put more  
information in the log files so you can see all the stats you desire.


Jordan


On Sep 15, 2005, at 11:07 AM, Chirantan Ghosh wrote:



Hello,

I was wondering if there was way to generate domain statistics by  
any PHP script?


I just need some basic info like:
Monthly Traffic( Sites, Kbytes, Visits, Pages, Files, Hits )

Example: http://server18.internetserver.com/stats/1800homecare/

If it is possible can I also create a Log In for that page?

I would appreciate any direction.
Thanks,

C. Ghosh




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



[PHP] How to output a PNG with GD with same headers as pre-existing PNG file

2005-09-15 Thread Graham Anderson
I am trying to get a PNG created with GD to output exactly as a 
pre-existing PNG file on the server
I have an app that is being very finicky about how it is loading images 
:(


Within Quicktime, If I point to the PNG file  directly on the server, 
it works.


this works:
$image = isset($_GET['image'])? $_GET['image']:yolanda.png;
$image = ./.$image;
$imageInfo = getimagesize($image);
$mime = $imageInfo['mime'];

header(Content-type:.$mime);
header (Content-Length:.filesize($image));
header (Cache-Control:.$cacheInfo);
readfile($image);



If I output a PNG with GD, it does not work within Quicktime for the PC.
My guess is that Quicktime for PC is very finicky when it comes to 
headers :(


[excerpt from php script]

$im= imagecreatefrompng($image);
imagettftext($im, $fontSize, 0, 17, 20, $color, $font, $text);
imageAlphaBlending($im, true);
imageSaveAlpha($im, true);

//Output handler
function output_handler($im) {
   header('Content-type: image/png');
   header('Content-Length: ' . strlen($im));
   header('Cache-Control:no-store, no-cache');
   return $im;
}

//Image output
ob_start(output_handler);
imagepng($im);
ob_end_flush();


anyone know a bullet proof way to output the headers to look like a 
pre-existing PNG file ?


many thanks in advance

g

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



[PHP] basic validation wuestion for username/emails...

2005-09-15 Thread bruce
hi..

rather than recreate the wheel.. i'm looking for samples of
good/solid/comprehensive validation functions for user/form inputs.
specifically, i'm looking for ways to validate/verify that the user has
entered valid username/email. as i go forth, i'll be looking for
address/zip/phone/etc... as well.

doe you guys have any solid functions that you've created, or any particular
libraries that you use (open source) that handle form input validation
issues??

i've seen various sites/srticles on google, but i figured i'd ask here as
well.

thanks

bruce
[EMAIL PROTECTED]

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



Re: [PHP] Output of html without using functions?

2005-09-15 Thread Gustav Wiberg

Hi there!

With that codeline I get... (I have B-one as webhost)

Warning: file_get_contents(): URL file-access is disabled in the server 
configuration in /customers/varupiraten.se/varupiraten.se/httpd.www/test.php 
on line 2


Warning: file_get_contents(http://php.net): failed to open stream: no 
suitable wrapper could be found in 
/customers/varupiraten.se/varupiraten.se/httpd.www/test.php on line 2


/G
http://www.varupiraten.se/

- Original Message - 
From: Richard Lynch [EMAIL PROTECTED]

To: Gustav Wiberg [EMAIL PROTECTED]
Sent: Thursday, September 15, 2005 12:59 AM
Subject: Re: [PHP] Output of html without using functions?




?php
 echo htmlentities(file_get_contents('http://php.net'));
?

On Wed, September 14, 2005 3:31 am, Gustav Wiberg wrote:

Hi there!

Ok.. Thanx!

Yes, I must be able to get info from his site, BUT i can't install
anything
(Not Curl either) on the server because the server belongs to
b-one.net and
not me.

Is it impossible then?

/G
http://www.varupiraten.se/

- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: Gustav Wiberg [EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 10:08 AM
Subject: RE: [PHP] Output of html without using functions?



Gustav,


If I write a function in PHP.

Main question:
Would the partner be able to get the value from a function written
in PHP
across the Internet?


Two issues here.

1. Do you need to be able to get data from his site? If so you need
to
look
at curl functions - not used them myself.

2. Does he need to get info from your site? That's his problem - not
yours.

If you both decide that you won't converge to a single strategy then
you
will both have to build code to extract results from the other site.
It
wouldn't matter what the 'other' site was written in as long as it
was
generating the result in html (or soap, or xml etc).

Hope this helps the thinking.

George



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





--
Like Music?
http://l-i-e.com/artists.htm




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



[PHP] html forms in php

2005-09-15 Thread Philippe Reynolds


Good day all,

I have a problem for you all..
I have a form that has has the ability to delete a lot of information from 
my MySQL database.


I would like to create a bit of security, in case the user hits the button 
by accident.
I would like to create an additionnal window that would appear that would 
ask:
Are you sure? and then a yes and no buttons to confirm the deletion or 
to cancel the command.


Any thougts??

Thanks for the assistance
Phil

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



Re: [PHP] trying to figure out the best/efficient way to tell who is logged into a site..

2005-09-15 Thread Gustav Wiberg
- Original Message - 
From: Ben [EMAIL PROTECTED]

Newsgroups: php.general
To: Gustav Wiberg [EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 7:35 PM
Subject: Re: [PHP] trying to figure out the best/efficient way to tell who 
is logged into a site..




Gustav Wiberg wrote:

All you guys, please comment if the code is well or bad written and 
why... :-)


Since you asked, a few things popped out from a security perspective, 
though I didn't read through your code very thoroughly




?php

function chkIfPasswordTrue($un, $pw, $typeUser) {

//Make username and password in-casesensitive
//
$un = strtolower($un);

$pw = strtolower($pw);



Why limit your usernames/passwords to lower case?  You've just made them 
significantly easier to brute force.


That's a good point. The reason is that our targetgroup users is users with 
a little knowledge of computers and therefore it might be easy to miss that 
caps-lock is pushed in, and out... and the combination of  small and big 
letters... But you're right... Probably I'll change this. Thanx!







$sql = $sql . SELECT IDAnvandare FROM tbanvandare WHERE;

$sql = $sql .  Anvandarnamn= . safeQuote($un) .  AND;

$sql = $sql .  Losenord= . safeQuote($pw) .  AND;



Where is your safeQuote() function coming from?  From what I can see of 
your code you aren't doing any testing against the username and password 
before they are used as part of your SQL query.  Sure would suck to have 
an unauthenticated user drop or otherwise muck with your db!


Hm. The safeQuote() function is always called before these functions are 
called and is


?php
function safeQuote($value)
{
  // Stripslashes
  if (get_magic_quotes_gpc()) {
  $value = stripslashes($value);
  }
  // Quote if not integer
  if (!is_numeric($value)) {
  $value = ' . mysql_real_escape_string($value) . ';
  }

  return $value;
}
?






if (isset($_REQUEST[frmUsername])) {

$un = $_REQUEST[frmUsername];


If you're going to use $_REQUEST you might as well just turn on register 
globals (no, don't!).

*hehe*



If you're expecting a post look for a $_POST, if you're expecting a get 
look for a $_GET.  Ditto with cookies.  You really need to know where your 
variables are coming from if you want a measure of security.
Yes, you're right. I wrote this code before I came in contact with $_POST 
and $_GET. Thanx again! It's appreciated! :-)


/G
http://www.varupiraten.se/

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



Re: [PHP] Webservices and PHP?

2005-09-15 Thread Gustav Wiberg

Hi there!

Thanx!

/G

- Original Message - 
From: Clive Zagno [EMAIL PROTECTED]

To: Gustav Wiberg [EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 1:59 PM
Subject: Re: [PHP] Webservices and PHP?



I presume by web service you mean SOAP and WSDL etc

Have a look at something called nusoap, its a wrapper class, very easy 
to use.


clive

Gustav Wiberg wrote:

Hi there!

I want to learn about creating webservices with PHP? (Is it possible 
with PHP 4.3.11?)

and calling webservices against ASP.Net.

Anyone has suggestion where I should start looking?

/G
http://www.varupiraten.se/


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



RE: [PHP] html forms in php

2005-09-15 Thread Jay Blanchard
[snip]
Are you sure? and then a yes and no buttons to confirm the deletion or

to cancel the command.

Any thougts??
[/snip]

You can use JavaScript for this.

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



RE: [PHP] html forms in php

2005-09-15 Thread bruce
philippe,

you can accomplish this by using a piece of javascript that fires off an
alert, asking the user 'yes/no'. if the user selected yes, the app would do
a submit to the page that would then take care of the mysql/db
interaction...

search on google for 'php onsubmit alert' etc...

-bruce


-Original Message-
From: Philippe Reynolds [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 15, 2005 11:14 AM
To: php-general@lists.php.net
Subject: [PHP] html forms in php



Good day all,

I have a problem for you all..
I have a form that has has the ability to delete a lot of information from
my MySQL database.

I would like to create a bit of security, in case the user hits the button
by accident.
I would like to create an additionnal window that would appear that would
ask:
Are you sure? and then a yes and no buttons to confirm the deletion or
to cancel the command.

Any thougts??

Thanks for the assistance
Phil

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

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



Re: [PHP] Problems with strings being handled like numbers

2005-09-15 Thread J B
On 9/14/05, Richard Lynch [EMAIL PROTECTED] wrote:

 mssql_* and PHP know that the data is supposed to be integer
 
 But the largest integer that PHP can store is 0x.
 
 So when PHP tries to accept the integer from mssql_fetch_row, it's
 got no room to store it as integer, and HAS to convert it to float.


Ah, OK. I was beginning to suspect it might be that; thanks for confirming.

If you JUST want to display it, and not manipulate it in PHP, you can
 ignore that bit about BC_MATH and the other extension.


Yes, these serial numbers have no mathematical significance. In fact, I'm 
not even sure why they're stored as numbers in the database at all...maybe 
for performance reasons, my database design knowledge is still pretty 
minimal so I can't comment on that (I didn't create the database).

You'll need to use the typecast to char in MSSQL no matter what, cuz
 ain't no way PHP is gonna store an integer bigger than 0x as
 an integer.
 

OK...knowing that, doing the typecast in the SQL query doesn't seem 
inelegant any more. Thanks for the info!


RE: [PHP] html forms in php

2005-09-15 Thread Murray @ PlanetThoughtful
 Good day all,
 
 I have a problem for you all..
 I have a form that has has the ability to delete a lot of information from
 my MySQL database.
 
 I would like to create a bit of security, in case the user hits the button
 by accident.
 I would like to create an additionnal window that would appear that would
 ask:
 Are you sure? and then a yes and no buttons to confirm the deletion
 or
 to cancel the command.
 
 Any thougts??

Hi Phil,

You can achieve this in several ways. One would be to use a JavaScript
onClick event on the 'dangerous' button to pop up a dialog with your 'Are
you sure?' prompt and the yes/no buttons. If the user clicks on the 'no'
button, you use JavaScript to cancel the page submission. If they click on
the 'yes' button, the page submits. This approach would mean assuming that
your users have JavaScript enabled.

A second approach would be to have an intermediary page between the page
with the button, and the page that performs the actual delete. The
intermediary page would be little more than another form with the yes/no
buttons.

Much warmth,

Murray
---
Lost in thought...
http://www.planetthoughtful.org

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



RE: [PHP] html forms in php

2005-09-15 Thread Alan Fullmer
This might help you.

input type=submit name=DELETE onclick=return confirmDelete()



script
function confirmDelete()
{
var agree=confirm(WARNING!  This will blah blah delete etc yada yada
\n\rPress Cancel to go back, or OK to Continue.);
if (agree)
return true ;
else
return false ;
}
/script




-Original Message-
From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 12:32 PM
To: 'Philippe Reynolds'; php-general@lists.php.net
Subject: RE: [PHP] html forms in php

 Good day all,
 
 I have a problem for you all..
 I have a form that has has the ability to delete a lot of information from
 my MySQL database.
 
 I would like to create a bit of security, in case the user hits the button
 by accident.
 I would like to create an additionnal window that would appear that would
 ask:
 Are you sure? and then a yes and no buttons to confirm the deletion
 or
 to cancel the command.
 
 Any thougts??

Hi Phil,

You can achieve this in several ways. One would be to use a JavaScript
onClick event on the 'dangerous' button to pop up a dialog with your 'Are
you sure?' prompt and the yes/no buttons. If the user clicks on the 'no'
button, you use JavaScript to cancel the page submission. If they click on
the 'yes' button, the page submits. This approach would mean assuming that
your users have JavaScript enabled.

A second approach would be to have an intermediary page between the page
with the button, and the page that performs the actual delete. The
intermediary page would be little more than another form with the yes/no
buttons.

Much warmth,

Murray
---
Lost in thought...
http://www.planetthoughtful.org

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

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



[PHP] Re: basic validation wuestion for username/emails...

2005-09-15 Thread Manuel Lemos

Hello,

on 09/15/2005 03:11 PM bruce said the following:

rather than recreate the wheel.. i'm looking for samples of
good/solid/comprehensive validation functions for user/form inputs.
specifically, i'm looking for ways to validate/verify that the user has
entered valid username/email. as i go forth, i'll be looking for
address/zip/phone/etc... as well.

doe you guys have any solid functions that you've created, or any particular
libraries that you use (open source) that handle form input validation
issues??


You may want to take a look at this popular Open Source class for forms 
generation and validation that does what you are asking:


http://www.phpclasses.org/formsgeneration


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

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



Re: [PHP] html forms in php

2005-09-15 Thread D A GERM

Here's some javascript I use for such instances:

[CODE]

if (myForm.hidWhich.value == delete)
{
   var verify = prompt(You are about to delete this entry \n +
    \n \n +
   To delete this entry you must type this phrase in the prompt 
and click OK: \n \n +

   --  KILL ENTRY!);

   if (verify == KILL ENTRY!)
   {
   myForm.submit();
   return(true);
   }
   else
   {
   alert(Error: Could not delete entry becuase you either canceled 
out or entered the wrong phrase! \n  +

   Your entry WAS NOT deleted.);
   return(false);
   }
}

[/CODE]

The user must click a button to delete the entry. This button calls as 
function onClick; within that function is the above code. It requires 
the user to enter an exact phrase. If the exact phrase is not entered, 
it is returned false and the form never submits. If the correct phrase 
is entered, it sumbits the form and I remove the entry from Postgresql.


So far I have not had any users accidentally delete anything. 

The only problem is IE does not like the prompt() function -works 
perfect in FireFox. In IE it doesn't display the text in the prompt 
window, but if the correct phrase is entered it still works


Philippe Reynolds wrote:



Good day all,

I have a problem for you all..
I have a form that has has the ability to delete a lot of information 
from my MySQL database.


I would like to create a bit of security, in case the user hits the 
button by accident.
I would like to create an additionnal window that would appear that 
would ask:
Are you sure? and then a yes and no buttons to confirm the 
deletion or to cancel the command.


Any thougts??

Thanks for the assistance
Phil



--
D. Aaron Germ
Scarborough Library, Shepherd University
(304) 876-5423

Well then what am I supposed to do with all my creative ideas- take a bath and wash 
myself with them? 'Cause that is what soap is for (Peter, Family Guy)

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



Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-15 Thread Pooly
2005/9/13, Ryan A [EMAIL PROTECTED]:
 Hi,
 I work for a company that makes websites and does custom programming for
 private indviduals and
 companies, I also freelance (like many on this list)
 
 I'm a bit curious, so far I have had no need to upgrade my skills or use the
 slightly different format /
 functions of PHP 5.x.infact I have not seen all that many hosts actually
 having support for it, so I
 thought of this little poll :-)
 
 Simply cross all the boxes that applies and reply to the list (along with
 your name on top)
 eg:
 [x] blah blah
 
 
 [] I am still working on PHP 4
 [] I never work with PHP 4 anymore, all my work is with PHP 5
 [] Oops, call me old fashioned but i am still with 3!
 
 [] I have no problems finding a host with PHP 5 support
 [] I can handle PHP 5, but I only work with PHP 4
 [] Nah, will wait till PHP 6 is out, theres not much diff between 4 and 5
 [] PHP 5 sounds / looks too hard to learn
 

[x] I use a layer above PHP which is independant of whether it's PHP4
or PHP 5, which is running Migration from 4.x to 5.0.3 was as
simple as changing a DNS record :-)
http://templeet.org/

-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

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



Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-15 Thread Robert Cummings
On Thu, 2005-09-15 at 16:25, Pooly wrote:
 2005/9/13, Ryan A [EMAIL PROTECTED]:
  Hi,
  I work for a company that makes websites and does custom programming for
  private indviduals and
  companies, I also freelance (like many on this list)
  
  I'm a bit curious, so far I have had no need to upgrade my skills or use the
  slightly different format /
  functions of PHP 5.x.infact I have not seen all that many hosts actually
  having support for it, so I
  thought of this little poll :-)
  
  Simply cross all the boxes that applies and reply to the list (along with
  your name on top)
  eg:
  [x] blah blah
  
  
  [] I am still working on PHP 4
  [] I never work with PHP 4 anymore, all my work is with PHP 5
  [] Oops, call me old fashioned but i am still with 3!
  
  [] I have no problems finding a host with PHP 5 support
  [] I can handle PHP 5, but I only work with PHP 4
  [] Nah, will wait till PHP 6 is out, theres not much diff between 4 and 5
  [] PHP 5 sounds / looks too hard to learn
  
 
 [x] I use a layer above PHP which is independant of whether it's PHP4
 or PHP 5, which is running Migration from 4.x to 5.0.3 was as
 simple as changing a DNS record :-)
 http://templeet.org/


A layer above suggests you never touch PHP syntax. I doubt that's a true
claim. Otherwise you're just as prone to the difference between PHP4 and
PHP5 as soon as you start writing PHP syntax.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] adding string...

2005-09-15 Thread Gustav Wiberg

Hi guys!

Is there any difference in performance in these two ways?


$sql = $sql .

OR

$sql .=


/G
http://www.varupiraten.se/

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



Re: [PHP] Quick Poll: PHP 4 / 5

2005-09-15 Thread Oliver Grätz
Pooly schrieb:
 [x] I use a layer above PHP which is independant of whether it's PHP4
 or PHP 5, which is running Migration from 4.x to 5.0.3 was as
 simple as changing a DNS record :-)
 http://templeet.org/

A layer above PHP would mean this thing generates code specific to the
underlying PHP version or features PHP-version-based code switching. I
doubt that. It surely is a PHP application in itself and therefore
subject to problems depending on the PHP version used underneath.

AllOLLi

Hostage: You son of a bitch.
Soong: Actually mother was a chemist.
[Enterprise 405]

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



[PHP] Re: adding string...

2005-09-15 Thread Oliver Grätz
Gustav Wiberg schrieb:
 Hi guys!
 
 Is there any difference in performance in these two ways?
 
 
 $sql = $sql .
 
 OR
 
 $sql .=

No difference. Even if there was any difference it would be totally
negligible.

AllOLLi


Byers: What proof do you have?
Bond: I got this!
Byers: You're on the phone, Jimmy!
[Lone Gunmen 09]

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



Re: [PHP] Re: adding string...

2005-09-15 Thread Gustav Wiberg
- Original Message - 
From: Oliver Grätz [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Friday, September 16, 2005 1:34 AM
Subject: [PHP] Re: adding string...



Gustav Wiberg schrieb:

Hi guys!

Is there any difference in performance in these two ways?


$sql = $sql .

OR

$sql .=


No difference. Even if there was any difference it would be totally
negligible.

AllOLLi


Byers: What proof do you have?
Bond: I got this!
Byers: You're on the phone, Jimmy!
[Lone Gunmen 09]

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


Ok, thanx!

/G

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



[PHP] curl support for php 5.0.5

2005-09-15 Thread Ey-Chih Chow
I want to use curl support for php5.0.5 and iis.  I installed the downloaded
php binary and tried to configure the it to use curl by modifying php.ini.
But it always came with a message not able to find curl_init().  Is there
anybody out there knowing if we can configure the downloaded php 5.0.5 to
get the curl support and how?  

 

I also tried to compile PHP source using --with-curl, but this always
failed.  Can anybody provide a complete procedure to do this?  Thank.

 

E. Chow 

 



[PHP] curl support for php 5.0.5

2005-09-15 Thread ey-chih chow
I want to use curl support for php5.0.5 and iis.  I installed the downloaded
php binary and tried to configure the it to use curl by modifying php.ini.
But it always came with a message not able to find curl_init().  Is there
anybody out there knowing if we can configure the downloaded php 5.0.5 to
get the curl support and how?


I also tried to compile PHP source using --with-curl, but this always
failed.  Can anybody provide a complete procedure to do this?  Thank.



E. Chow

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



[PHP] curl support for php 5.0.5

2005-09-15 Thread ey-chih chow
I want to use curl support for php5.0.5 and iis.  I installed the downloaded
php binary and tried to configure the it to use curl by modifying php.ini.
But it always came with a message not able to find curl_init().  Is there
anybody out there knowing if we can configure the downloaded php 5.0.5 to
get the curl support and how?


I also tried to compile PHP source using --with-curl, but this always
failed.  Can anybody provide a complete procedure to do this?  Thank.



E. Chow

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



[PHP] Re: PHP combined with JAVA

2005-09-15 Thread Oliver Grätz
If I read this correctly then your question is in no way JAVA-specific.
You want to instantiate an object (which you suppose to be of large size
and slow in instantiation) and save this object in the session during
page requests.

First of all, any data put in the session array will be serialized
(read: converted into a string containing all the data in this object).
This in itself is slow for large objects. A performance gain for large
objects through using a session isn't likely.

The second problem with this - and this is the point where JAVA kicks in
- not all data in objects is serializable. The Java-API of PHP is just
some kind of adapter to the Java system. If you serialize an adapter
object then your adapter is saved but not the Java object it uses
(because PHP has no control over it). Think of the Java API as some kind
of socket connection where you only see the stuff on your side (the
client side) and the JAVA object on the server side is not under your
control but just used.

What happens is: you save you adapter object and the script terminates.
The JAVA VM notices that an object is no longer referenced and it is
thrown away by the garbage collection.

What could you do? Well, you could use it the other way round (Servlet
uses PHP), because then you control the JAVA side. Or you still do it
the way you do it now but write some clever JAVA code that keeps running
and retains your objects. You give those objects a name known to both
the PHP and JAVA side and this name can be serialized. You can then
re-reference any object on the next page request by its name.

AllOLLi

Jayne spits a large glob of saliva on his blade,
wipes it on his shirt, shining it.
Could you NOT do that while we're ever!
[Simon on firefly 09]

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