Hi,
I'm new to the list so Hello to all. I'm drafting a function.php
page, which will be included() in the pages in need. How would I pass
a form as an argument of a function? From the name parameter of the
form element or perhaps an ID:
function checkForm(theForm){
//Form
Best group member,
I have this process:
1. Fill out a form on a web page
2. Lands on a thank you page and force a download of a pdf
Right now I solve this by outputting the thank you page and then using a
javascript to redirect to the download.php that consist of the following:
Hi,
Anyone who know about a UML editor that can generate PHP code?
/Peter
You guys make me laugh... :)
(And I really actually mean that in a nice way... that last bit was
quite funny. And yes, size does matter... some don't like it _too_
big.)
But, I digress.
I'm OK with taking this off-list... though I'd rather publicly reply.
Yeah, I meant procedural, not
Hi,
I am a newbie to libPDF and I am actually wanted to install it. When I look
at the installation manual from the website it asked me to recompile with
libPDF library directory. But if possible I don't wish to recompile the whole
of PHP because I am using Suse Linux and PHP is packaged
On 21 Apr 2006, at 10:20, Ko Ko wrote:
I am a newbie to libPDF and I am actually wanted to install it.
When I look at the installation manual from the website it asked me
to recompile with libPDF library directory. But if possible I don't
wish to recompile the whole of PHP because I am
Nicolas Verhaeghe wrote:
[snip]
I'm creating my own Object Oriented PHP Shopping Cart.
Okaaay.
...
To answer our friend, he seems to have to learn to develop simple
applications before starting building something as complex as a shopping
cart. Not only complex, but also
Martin Alterisio wrote:
You wouldn't feel/look stupid if you had RTFM:
no no thats not right - I RTFM all the time and still feel stupid ;-)
http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single
to to OP: do read up on strings some more (look for the
No words... Just :)
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 2:48 AM
To: John Nichel
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Script to open phpBB2 accounts
[some SERIOUS text-deleting happened here...]
On Thu, April 20,
Yes, Chuck is correct here. The security issue I raised has to do
with multiple users on the same shared server, which is how some
hosting companies manage their clients. Each user may have a
different home directory and has separation from other users,
however, usually the same /tmp
You guys make me laugh... :)
:-)
(And I really actually mean that in a nice way...
that last bit was
quite funny. And yes, size does matter... some don't
like it _too_
big.)
Damn, just my luck
:-D
As far as AJAX is concerned: yeah, it's a bitch.
I've gotten it to
work
Ach, correction: Chuck is correct here. = *Richard* is correct here.
No morning coffee yet, sorry.
- Ben
On Apr 20, 2006, at 7:22 PM, Richard Lynch wrote:
On Thu, April 20, 2006 1:46 pm, Ben Liu wrote:
After a bit more research, I think I understand why Jochem recommends
use of
Hi Chuck,
Glad this discussion has been of use to you. I can't help much with
where your /tmp directory might be. if you echo session_save_path()
it should tell you where your session cookies are being saved to on
your server.
I have read recommendations that you set a different path for
Hi,
We have a big multilanguage project. For a while we used gettext to translate
the pages, but we gave up on this because of many problems.
Out solution is to create a file for each language which includes the label
definitions.
for ex:
define(LABEL1, label 1);
define(LABEL2, label 2);
Hello,
Probably a stupid one but anyway...
In PHP. Is it possible to point to a variable with the HTML form name by
which it was posted from?
Example:
//point to the variable with something like or somenthing???
$AddNew.SomeVar
form name=AddNew method=post action=? $PHP_SELF ?
$SomeVar =
Andy wrote:
Hi,
We have a big multilanguage project. For a while we used gettext to translate the pages, but we gave up on this because of many problems.
Out solution is to create a file for each language which includes the label definitions.
for ex:
define(LABEL1, label 1);
[snip]
Probably a stupid one but anyway...
In PHP. Is it possible to point to a variable with the HTML form name by
which it was posted from?
Example:
//point to the variable with something like or somenthing???
$AddNew.SomeVar
form name=AddNew method=post action=? $PHP_SELF ?
$SomeVar = Add;
php_uname('n')
Edin
Venkat Venkataraju wrote:
Hi All
I'm writing a bunch of cron scripts that send reports periodically using
phpmailer.
I'm having a hard time trying to find the FQDN of the server. I need
that information to construct the from address for the emails.
The
take the following code and do some experimentation:
?
echo 'pre';
echo POST vars: \n;
var_dump($_POST);
echo GET vars: \n;
var_dump($_GET);
echo '/pre';
?
stick that in your page that contain the form and start playing with
different form fields, different form fields names, etc, etc -
[snip]
it's about our philosophies.
[/snip]
Too bad your article didn't reflect that as well as you might have
liked. And Web 2.0 is a label, the underlying philosophy has been there
for years (before you ever got Dreamweaver to write your first line of
HTML for you). Ajax is a label for a loose
Jochem Maas wrote:
apparently calling a dynamic function using static syntax
will cause an E_FATAL.
? That's just how OO design works... If you have a non-static method you
can always have a $this- lingering in there. Now, if you call this
method with the static syntax, $this suddenly
Hi there,
I would like to associate to 2 variables the same content.
Example:
'gm_GM', 'gm_CH' = array(
unfortunatelly this syntax does not work. It simply overwrites gm_GM
Any ideas on how to make this possible?
Thank you for any hint,
Merlin
--
PHP General Mailing List
At 3:45 PM +0300 4/21/06, William Stokes wrote:
Hello,
Probably a stupid one but anyway...
In PHP. Is it possible to point to a variable with the HTML form name by
which it was posted from?
Example:
//point to the variable with something like or somenthing???
$AddNew.SomeVar
form
Hello,
I'm using PhpMyadmin 2.6.3 on operators server for DB management. I would
from time to time like to export the whole DB to text file and move the DB
to my own test server. Problem is that when I dump the whole DB to a file
all scandic fonts are incorrect. If I dump the data to screen
Forgot to say that the scandic fonts are ok in the tables...
William Stokes [EMAIL PROTECTED] kirjoitti
viestissä:[EMAIL PROTECTED]
Hello,
I'm using PhpMyadmin 2.6.3 on operators server for DB management. I would
from time to time like to export the whole DB to text file and move the DB
phpmyadmin have their own support channels.
as do mysql.
William Stokes wrote:
Hello,
I'm using PhpMyadmin 2.6.3 on operators server for DB management. I would
from time to time like to export the whole DB to text file and move the DB
to my own test server. Problem is that when I dump the
You don't need the unserialize(), it's done internally by the
session_start().
All the things you put inside $_SESSION, except for resources, will be
rebuilt when the session is regenerated. This way you don't need to worry
about serializing.
Read the manual section about sessions.
2006/4/21,
Thanks for the suggests.
I will have to make some tests to see what will happen, especially how fast.
I will post after that my opinion.
Regards,
Andy.
- Original Message -
From: Jochem Maas [EMAIL PROTECTED]
To: Andy [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Friday,
Nicolas Verhaeghe wrote:
[snip]
I'm creating my own Object Oriented PHP Shopping Cart.
Okaaay.
...
To answer our friend, he seems to have to learn to develop simple
applications before starting building something as complex as a
shopping cart. Not only complex, but also
Peter Lauri wrote:
[···]
1. Fill out a form on a web page
2. Lands on a thank you page and force a download of a pdf
Right now I solve this by outputting the thank you page and then using a
javascript to redirect to the download.php that consist of the following:
header('Content-type:
At 3:46 PM -0700 4/20/06, Chris Kennon wrote:
I'm new to the list so Hello to all. I'm drafting a function.php
page, which will be included() in the pages in need. How would I
pass a form as an argument of a function? From the name parameter of
the form element or perhaps an ID:
function
Merlin wrote:
I would like to associate to 2 variables the same content.
Example:
'gm_GM', 'gm_CH' = array(
unfortunatelly this syntax does not work. It simply overwrites gm_GM
Any ideas on how to make this possible?
'gm_GM' is not overwritten, do a print_r($array) to verify. What
Use mysqldump. Quick easy.
-Original Message-
From: William Stokes [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 8:56 AM
To: php-general@lists.php.net
Subject: [PHP] Re: Export data with PHPMyAdmin
Forgot to say that the scandic fonts are ok in the tables...
William Stokes
Hi,
could anyone tell me why the following url doesn't generate a page not
found ?
http://www.php.net/manual/en/function.checkdnsrr.php/manual/
you can try with a longer url after the last .php.
I tried with ../manual instead of manual and this produces a 404.
I checked with www.php.net
Not sure about php.net specifically, but two things to note here:
If you leave off a filename at the end of the URL, the web server will look for
a 'default' document. On apache and unix systems I believe the default is
index.html and on IIS systems it's something like Default.htm. Most of
Hey all,
Regex pattern question here. I need to match on Foo-F00, Foo-foo,
foo-Foo. I know in perl you can use the /i to specify case
insensitive matching. Is there any such switch that can be used in
preg_match() in PHP?
Thanks,
Jeff
--
PHP General Mailing List (http://www.php.net/)
To
Hello,
Anyone have pointers to good tutorials out there for validating XML with
DTD?
I have looked at the top comment on:
http://www.php.net/manual/en/ref.xmlreader.php#xmlreader.constants
Where you set the parser property to validate, but it is kind of like a
black box...what is it using the
On Friday 21 April 2006 9:44 am, Jeff wrote:
Regex pattern question here. I need to match on Foo-F00, Foo-foo,
foo-Foo. I know in perl you can use the /i to specify case
insensitive matching. Is there any such switch that can be used in
preg_match() in PHP?
Hi,
could anyone tell me why the following url doesn't
generate a page not found ?
http://www.php.net/manual/en/function.checkdnsrr.php/manual/
you can try with a longer url after the last .php.
I tried with ../manual instead of manual and this produces a 404.
I checked with www.php.net
I believe Kevin is on the right track there. To expand a bit, you can use
$_SERVER['PATH_INFO'] with these urls instead of $_GET to make use of the
data it contains
example for url http://www.example.com/index.php/foo/bar
?php
echo $_SERVER['PATH_INFO'];
?
produces:
/foo/bar
You can then parse
As Joe implied with his link, the preg_* family is called PCRE (Perl
Compatible Regular Expression), and that's because they accept a
Perl-style regexp as a string, i.e. '/foo-foo/i' would do it.
Jeff wrote:
Regex pattern question here. I need to match on Foo-F00, Foo-foo,
foo-Foo. I know
You could do that... a poor man's mod_rewrite might involve something like
this and making the main PHP parsing script your 404 page.. so no matter where
you went on a page, the 404 redirect to your PHP script would parse the request
(or would you get the post-redirected URL? in which case
On Thursday 20 April 2006 19:23, Richard Lynch wrote:
Actually, it's possible just bloody difficult.
You're looking into a topic known as OCR (Optical Character Recognition).
One OS project for this is:
GOCR (aka JOCR)
It's GOCR on freshmeat and JOCR on sourceforge because they name they
Yes I am using that for the moment. The problem is that for the moment I
require javascript to make it work. And I know there are browsers that block
javascript, my client has already had a customer complaining that the
download did not start. Temporary I solved it by puttning a link it the
Jay Blanchard wrote:
[snip]
I am trying to find a way for a program to search through the text on
a
PDF. My first thought was to use pdftotext, but the PDFs generated by
our
commercial scanner/copier/printer machine do not seem to work with
pdftotext... it just outputs two CRLFs. I've been
No arguments here ;-). For what it's worth, I've used this technique just to
simply clean up the url's a bit. With that in mind, I usually don't need to
do a terrible amount of scrubbing because I'm using the variables in the url
more for navigation. So
All depends on how the data is used after it's interpreted/split:
http://www.example.com/index.php/edit/customer/1234
$action = edit;
$type = customer;
$id = 1234;
header(Location:
http://www.example.com/index.php?action=$actiontype=$typeid=$id;);
In this case, what happens if someone does:
With php5, I'm trying to create an object that has a property that is
another object. First I have this class:
?php
class Address {
public $address1;
public $address2;
public $city;
public $state;
public $zip;
}
?
Then I have another class:
?php
On Fri, April 21, 2006 2:17 pm, Paul Barry wrote:
public $address = new Address();
I believe this is true:
At this time, you can only initialize class properties to CONSTANTS.
So you could use 'Address' or 42 or NULL or TRUE/FALSE, but not new
Address();
Actually, I think an array might
On Fri, April 21, 2006 10:44 am, Jeff wrote:
Regex pattern question here. I need to match on Foo-F00, Foo-foo,
foo-Foo. I know in perl you can use the /i to specify case
insensitive matching. Is there any such switch that can be used in
preg_match() in PHP?
If you go to the
On Fri, April 21, 2006 10:04 am, nicolas figaro wrote:
could anyone tell me why the following url doesn't generate a page
not
found ?
http://www.php.net/manual/en/function.checkdnsrr.php/manual/
you can try with a longer url after the last .php.
I tried with ../manual instead of manual and
On Fri, April 21, 2006 1:11 pm, [EMAIL PROTECTED] wrote:
You could do that... a poor man's mod_rewrite might involve
something like this and making the main PHP parsing script your 404
page.. so no matter where you went on a page, the 404 redirect to your
PHP script would parse the request (or
On Fri, April 21, 2006 7:45 am, William Stokes wrote:
In PHP. Is it possible to point to a variable with the HTML form name
by
which it was posted from?
The FORM name attribute was an add-on for Javascript client-side.
It is not transmitted by HTTP.
PHP never sees it.
Or do I just have
On Fri, April 21, 2006 7:52 am, Jochem Maas wrote:
Andy wrote:
Now, one of this file can contain more than 2000 defines and we make
a calculation that we will reach 8000 in 2 years.
Seems to me you could extend your testing to generate 8000 constants
in a file pretty easily, and just benchmark
I have a text file that is just being read by php
Can I change the permissions of it so www can not read it?
what username does php uses to read files?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, April 21, 2006 1:53 am, Peter Lauri wrote:
1. Fill out a form on a web page
2. Lands on a thank you page and force a download of a pdf
Right now I solve this by outputting the thank you page and then using
a
javascript to redirect to the download.php that consist of the
following:
On Fri, April 21, 2006 1:02 am, Nicolas Verhaeghe wrote:
I'm new to the list so Hello to all. I'm drafting a function.php
page, which will be included() in the pages in need. How would I pass
a form as an argument of a function? From the name parameter of the
form element or perhaps an ID:
Benjamin Adams wrote:
I have a text file that is just being read by php
Can I change the permissions of it so www can not read it?
what username does php uses to read files?
Usually www, so you could have a bit of a problem there. PHP runs under
the same user Apache does, although there are
On Thu, April 20, 2006 11:24 pm, Steve wrote:
Yes, there is a TON of source code, and Yes, most of it is very
very
very badly-written, and Yes, that's because they started typing
just
like you are now instead of actually figuring all this [bleep] out
in
advance. :-)
Thank you for
On Fri, April 21, 2006 12:21 am, Steve wrote:
So basically, on every page, be it a page that displays the contents
of
the cart, the checkout, or catalog pages, at the top of the code I
always need to check if files are being added, deleted or changed qty.
Is this correct?
Yes.
This is my
Richard Lynch wrote:
Or not, as I'm betting not one of you can say something I haven't
heard yet...
When I close my eyes I see images of donkeys with unicorn-like horns
jumping over the moon with ponies on their backs. To be perfectly honest
it does worry me sometimes.
-Stut
--
PHP
On Fri, April 21, 2006 4:20 am, Ko Ko wrote:
I am a newbie to libPDF and I am actually wanted to install it. When
I look at the installation manual from the website it asked me to
recompile with libPDF library directory. But if possible I don't
wish to recompile the whole of PHP because I am
On Thu, April 20, 2006 11:05 pm, Chuck Anderson wrote:
As to session save path, when I run phpinfo (at my remote Linux
server)
it tells me that it is set to no value. This means it would default
to
/tmp. Where is this tmp directory? I have looked at the tmp directory
that is one level above
Benjamin Adams wrote:
I have a text file that is just being read by php
Can I change the permissions of it so www can not read it?
what username does php uses to read files?
Use a .htaccess file, if your web server supports it.
For example, in apache2 you can do this:
FilesMatch yourfile.txt
On Fri, April 21, 2006 5:09 am, Jochem Maas wrote:
Nicolas Verhaeghe wrote:
get ready for a 'Richard Lynching' with regard to the CC statement.
;-)
Oh, let's do the children's version today. :-)
You know that game Hot Potato?
Yeah?
Good.
A CC # is just like the Hot Potato in that game.
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 2:18 PM
To: Steve
Cc: php-general@lists.php.net; Richard Lynch
Subject: Re: [PHP] Creating an OO Shopping Cart
On Thu, April 20, 2006 11:24 pm, Steve wrote:
Yes, there is a TON of source
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 2:15 PM
To: Nicolas Verhaeghe
Cc: php-general@lists.php.net
Subject: RE: [PHP] Passing Form As Argument
On Fri, April 21, 2006 1:02 am, Nicolas Verhaeghe wrote:
I'm new to the list so Hello to all. I'm drafting a
On Fri, April 21, 2006 3:48 pm, Benjamin Adams wrote:
I have a text file that is just being read by php
Can I change the permissions of it so www can not read it?
Yes.
Then PHP cannot read it, if your setup is what I think it is...
what username does php uses to read files?
That depends.
[snip]
Some guys are shaking their heads in denial on this, but I swear to god, I
have seen it. I am not making this [bleep] up. Credit card numbers have
been sitting for YEARS in some boutique home-rolled shopping cart system
MySQL database with the oh-so-clever username/password of
Paul Barry wrote:
..
Then I have another class:
?php
require_once('model/Address.class.php');
class User {
public $name;
public $address = new Address();
this is wrong. you can define the property in the class
with a constant or scalar value (i.e. literal string,
numeric value or
On Fri, April 21, 2006 6:28 am, Ben Liu wrote:
Yes, Chuck is correct here. The security issue I raised has to do
with multiple users on the same shared server, which is how some
hosting companies manage their clients. Each user may have a
different home directory and has separation from other
On Thu, April 20, 2006 9:52 pm, benifactor wrote:
I am trying to come up with the best way to check for errors on a
form. I have done this before by checking each $_POST variable
seperatly but needed a better way that would display more then one
error. The following is what i came up with...
On Thu, April 20, 2006 9:47 pm, Peter Lauri wrote:
I feel stupid.
In many examples I have seen similar to:
echo 'pWhatever./p\n';
echo 'pAn other whatever./p\n';
But my PHP outputs the \n instead of a new line in the source.
I am stupid?
No, just naive. :-)
Quotes () and Apostrophes
hi Derick,
Derick Rethans wrote:
Jochem Maas wrote:
apparently calling a dynamic function using static syntax
will cause an E_FATAL.
? That's just how OO design works... If you have a non-static method you
can always have a $this- lingering in there. Now, if you call this
method with the
Richard Lynch wrote:
On Thu, April 20, 2006 9:47 pm, Peter Lauri wrote:
I feel stupid.
In many examples I have seen similar to:
echo 'pWhatever./p\n';
echo 'pAn other whatever./p\n';
But my PHP outputs the \n instead of a new line in the source.
I am stupid?
No, just naive. :-)
Quotes
On Fri, April 21, 2006 4:56 pm, Nicolas Verhaeghe wrote:
I have functions which dynamically generate client-side javascript
validation functions according to the name of the field, its type
(text,
password, email, drop down, radio button, textarea, and what not).
Same thing server-side.
On Fri, 2006-04-21 at 17:59, Nicolas Verhaeghe wrote:
[snip]
Some guys are shaking their heads in denial on this, but I swear to god, I
have seen it. I am not making this [bleep] up. Credit card numbers have
been sitting for YEARS in some boutique home-rolled shopping cart system
MySQL
Jochem Maas wrote:
Paul Barry wrote:
..
Then I have another class:
?php
require_once('model/Address.class.php');
class User {
public $name;
public $address = new Address();
this is wrong. you can define the property in the class
with a constant or scalar value (i.e. literal
On Fri, April 21, 2006 4:56 pm, Nicolas Verhaeghe wrote:
I have functions which dynamically generate client-side javascript
validation functions according to the name of the field, its type
(text, password, email, drop down, radio button, textarea, and what
not).
Same thing server-side.
Hello list,
We have recently upgraded our database to PostgreSQL 8.1.x which
handles UTF-8 more strictly than previous versions. The new version
will not allow illegal byte sequences when inserting data.
This has caused some errors in our system which inputs data.
Basically, what the system does
Richard... you're amazing. Good on you for just standing up there,
stating your position and defending it like there's no tomorrow!
So everyone's aware, I have NO intention of storing credit card #'s. I
don't see why anyone needs to.. especially after reading Richard's past
posts in the
M. Sokolewicz wrote:
Jochem Maas wrote:
Paul Barry wrote:
..
Then I have another class:
?php
require_once('model/Address.class.php');
class User {
public $name;
public $address = new Address();
this is wrong. you can define the property in the class
with a constant or scalar
Matt Arnilo S. Baluyos (Mailing Lists) wrote:
Hello list,
We have recently upgraded our database to PostgreSQL 8.1.x which
handles UTF-8 more strictly than previous versions. The new version
will not allow illegal byte sequences when inserting data.
This has caused some errors in our system
83 matches
Mail list logo