Here's an OOP function from an HTML class i wrote to simplify forms
myself -- It might come in handy for ya later :-)
// Single Select dropdown box
/*
@params
$name String Name of this form element
$items Array Array of items to place in this select box
$selected String Single item to s
Well how would you do it on paper?
$numerator = 8;
$denominator = 12;
$factor = 1;
//Start at the greater of the 2, and loop down til you find a common factor
for ($i=max($numerator,$denominator);$i>1;$i--) {
//Check if each number divided by $i has no remainder
if (($numerator % $i) ==
Ok, I got one. It finds the great common divisor. I divide the numerator and
denominator by it. Then I do an if statement to see if the numerator is
greater then the denominator. If so, I divide them by each other. How can I
tell if there's a remainder, and if so, put it into a fraction in simplies
With RedHat, AFAIR you have to compile PHP from source
*after* first configuring the GD libraries.
It's always been a massive PITA when i've had to compile PHP
on Redhat with Graphic ext's -- try debian instead ;-)
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Ray Hunt
You're limited to one action per statement, not one record.
Using "UPDATE ... WHERE", you can update any number of rows
with a single SQL statement.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Hugh Danaher" <[EMAIL PROTECTED]> wrote in message
001301c29fc8$b20f06c0$0
If you do it correctly, yes.
The apache module usually lives somewhere in the apache hierarchy,
whereas the 'php' binary is '/usr/bin/' or '/usr/local/bin/', so they
can quite happily co-exist.
Beware though, when upgrading one, upgrade BOTH.
It drove me nuts once when i forgot, and ended up havi
it doesn't look like the FTP is failing becuase of the if() construction,
becuase this works fine...
Have you tried checking error messages (IIRC, $php_errmsg can be
setup to hold the most recent error message), or try turning up the
error reporting on your test server to E_ALL (look in php.ini)
... or, if the file is HUGE and you don't want to read it all into RAM
using file(), you could open the file using fopen() and read line-by-line
until you get to the one you want. (or use fseek() fread() funcs to grab
a big chunk of text at once and then count the newlines, and loop until
you find
Would this also print out as a mixed number if it should?
- Original Message -
From: "Andrew Brampton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 6:44 PM
Subject: Re: [PHP] Fractions
> Well how would you do it on paper?
>
> $numerator = 8;
> $denominator
Hi All,
I'm a newbie and try to learn a little php, so a searched the internet for
documentation and wow...find a real course.
Fanatic I typed the code below and ..yes the first part of my form works
fine:
My first orderform...looks cool, works fine
Orderform.html
**
> I'm getting a really weird return from Strpos. What I'm doing is this,
and
> anyone familiar with any of the table-runner programs for RPG's will
know
> what I'm getting at here, I have a fields, like [adjective], [noun],
etc.,
> which I need to pull out and replace with values from included php
If you have globals on, then I see your problem. Rename $totalqty to
something else
- Original Message -
From: "Marco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 4:30 AM
Subject: [PHP] Variables problem
> Hi All,
>
> I'm a newbie and try to learn a l
What should I do in order to view a currency format field?
For example: I have a double-type field in my table that receives values in
currenct,
and I want to show the user the following message:
print "Your monthly fee is R$50,00" ?
thanks
--
PHP General Mailing List (http://www.php.net/)
To
The problem is as the error says, totalqty is not the name of one of your
form elements, I think infact you want:
echo "Items ordered: " . $totalqty . "\n";
Since the $_POST is just used to read varibles sent to you from a form,
whereas any other varibles you make ie:
$totalqty = $_POST["tireqty"
I found how it works, and it doesn't put it into a mixed number. I work on
it this week and see if I can't fix it. Thanks for all the help people!
- Original Message -
From: "Andrew Brampton" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 7:17 PM
Sub
Look at this function in the manual:
number_format()
HTH,
Ray
On Mon, 2002-12-09 at 17:38, Adriano Santos wrote:
> What should I do in order to view a currency format field?
> For example: I have a double-type field in my table that receives values in
> currenct,
> and I want to show the user
At 12/9/2002 07:20 PM, John W. Holmes wrote:
> It'd be easier to use a regular expression for something like this.
> Something like this would work (from PHP Architect):
I appreciate that, but considering I'm working from about 1200 files that
already exist and use [] to denote table names, I k
Hi,
I have a problem with my php4.1.2 from debian woody (because this
version that why I didn't post a bug report).
When I parsing an xml file.
Returns (\r or \n) don't appear in string resulted from xml object
attribut.
_exple_:
function startElement($parser, $name, $attrs) {
...
va
Yes you can. Just use clean source, but the config line can be the same
less the "--with-apache" switch.
[EMAIL PROTECTED] wrote:
Can I do that using the same src I used to create the dynamic module and
both would work hapilly together?
Thanks,
Ed
On Mon, 9 Dec 2002, John Nichel wrote:
N
So you mean do something like:
Doesn't that create 2 additional arrays though?
Basically my form is just row after row of the html code above... each row
has a different ID of course. The update query should only update fields
with checked checkboxes.
Thanks for your input!
Jason
> -O
Thanks to all that replied.
Ed
On Mon, 9 Dec 2002, John Nichel wrote:
> Yes you can. Just use clean source, but the config line can be the same
> less the "--with-apache" switch.
>
> [EMAIL PROTECTED] wrote:
> > Can I do that using the same src I used to create the dynamic module and
> >
I went thru the same problem, so one day I just sat down, and wrote a
Perl script that does the module and binary at the same time. Saved me
alot of grief.
Scott Hurring wrote:
If you do it correctly, yes.
The apache module usually lives somewhere in the apache hierarchy,
whereas the 'php' bin
I know this seems easy, but I can't get it to work for the freaking life
of me. I have number that is an integer, lets say 15, and I need it to
be 15.00, for a monetary value. I've casted every which way to no avail.
Any help would be greatly appreciated.
--
PHP General Mailing List (http://
> I know this seems easy, but I can't get it to work for the freaking
life
> of me. I have number that is an integer, lets say 15, and I need it
to
> be 15.00, for a monetary value. I've casted every which way to no
avail.
www.php.net/number_format
---John W. Holmes...
PHP Architect - A monthl
Hello,
As announced last week, Metastorage is an application that generates
customizable APIs made of classes that store and retrieve objects stored
in persistent storage containers like for instance relational databases.
The generated code uses Metabase API and consequently supports PEAR::MDB
Hi,
Tuesday, December 10, 2002, 2:31:00 AM, you wrote:
FW> Hi Tom,
FW> I had this checked out before, but I did only check the errorlog for this
FW> virtual host, there is an entry in the error log of the main server for
FW> each request to the page in question:
FW> [Mon Dec 9 17:27:05 2002
Hi,
Tuesday, December 10, 2002, 2:31:48 AM, you wrote:
>> Have you checked:
>>
>> Browser versions? (is the browser the same type/version as on the other
>> machines)
>> Is it a laptop? If so, are you using the internal keyboard with Numlock
1JWH> on?
>> Is the machine in question set-up on the ne
excellent. thanks.
John W. Holmes wrote:
I know this seems easy, but I can't get it to work for the freaking
life
of me. I have number that is an integer, lets say 15, and I need it
to
be 15.00, for a monetary value. I've casted every which way to no
avail.
www.php.net/number_forma
Hi John,
Can we share your Perl script?
I compiled with switch "--with-apxs=/usr/local/apache/bin/apxs"
Is it that apache switch?
Thanks
Tariq
John Nichel wrote:
I went thru the same problem, so one day I just sat down, and wrote a
Perl script that does the module and binary at the same time
It probably wouldn't help you all that much. Since it was for my own
personal use, I hardcoded directory paths and such for my personal set
up. I used to do it with a shell script too (nothing fancy there either).
Just configure it again without apxs
./configure --with-whateveroptions
mak
Thanks very much John :)
John Nichel wrote:
It probably wouldn't help you all that much. Since it was for my own
personal use, I hardcoded directory paths and such for my personal set
up. I used to do it with a shell script too (nothing fancy there either).
Just configure it again without ap
On Tuesday 10 December 2002 07:06, Jason Dulberg wrote:
> I am displaying a list of data (from an sql query) and some of the fields
> in that list are editable through a form. If the user chooses to edit one
> or more of the rows of data, they must click on a checkbox to add that row
> to an "updat
Does anyone know what the limit is for a FULLTEXT Index in MySQL 3.23.49+?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks scott,
This might definatly come in handy later as i am new too OOP in PHP. I
am now trying to generate a set of radio boxes... but without succes yet...
Best regards,
Davy Obdam
mailto:[EMAIL PROTECTED]
Scott Hurring wrote:
Here's an OOP function from an HTML class i wrote to simplify
On Tuesday 10 December 2002 09:45, Steve Keller wrote:
> At 12/9/2002 07:20 PM, John W. Holmes wrote:
> > It'd be easier to use a regular expression for something like this.
> > Something like this would work (from PHP Architect):
>
> I appreciate that, but considering I'm working from about 120
101 - 135 of 135 matches
Mail list logo