On Wed, 2006-10-25 at 22:53 -0700, Paul Novitski wrote:
> > > At 10/25/2006 04:09 PM, Stut wrote:
> > > > print ' > > > if ($selected_day_of_month == $day)
> > > > print ' selected';
> > > > print '>'.$day.'';
>
> On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski
> At 10/25/2006 04:09 PM, Stut wrote:
> > print ' > if ($selected_day_of_month == $day)
> > print ' selected';
> > print '>'.$day.'';
On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski wrote:
> print <<< hdDay
> $day
>
> hdDa
Well since the consensus seemed to be to allow job postings, I'll make
one. :-)
My company is looking for a few good PHP programmers.
We are a Chicago-area web consulting firm developing web sites and web
applications for a variety of clients, including several large academic
institutions. We
On Wednesday 25 October 2006 14:48, Jon Anderson wrote:
> Take this with a grain of salt. I develop with PHP, but I am not an
> internals guy...
>
> [EMAIL PROTECTED] wrote:
> > Are the include files only compiled when execution hits them, or are
> > all include files compiled when the script is fi
On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski wrote:
> At 10/25/2006 04:09 PM, Stut wrote:
> >Dang that's painful!! Try this...
> >
> > > foreach (range(1, 31) as $day)
> > {
> > print ' > if ($selected_day_of_month == $day)
> > print ' selected';
> >
At 10/25/2006 04:09 PM, Stut wrote:
Dang that's painful!! Try this...
'.$day.'';
}
?>
Ouch! Gnarly mix of logic and markup. I suggest something more like:
foreach (range(1, 31) as $day)
{
$sSelected = ($selected_day_of_month == $day) ? '
selected="sele
...and if you wanted to go an extra step you could try an alternate
syntax of the exact same code:
' . $day . '';
?>
Either way, Stut is correct. Don't type this out 31 times unless you
really really really like to type. ;-)
- Joe
On 10/25/06, Stut <[EMAIL PROTECTED]> wrote:
Ron Piggott (PHP)
M.Sokolewicz wrote:
Dotan Cohen wrote:
On 24/10/06, Chris Boget <[EMAIL PROTECTED]> wrote:
> $languages = array(
>"af" => array("Afrikaans", "Afrikaans", "South Africa"),
>"sq" => array("Albanian", "Shqipe", "Albania"));
>
> foreach ($languages as $language){
>if ( strstr
Ron Piggott (PHP) wrote:
I am creating a form right now. I am using the html SELECT tag.
The most number of days in a month is 31
I want the output to be ## based on the value of
$selected_day_of_month variable. For the days of the month where the
number is not selected the output I am desi
I am creating a form right now. I am using the html SELECT tag.
The most number of days in a month is 31
I want the output to be ## based on the value of
$selected_day_of_month variable. For the days of the month where the
number is not selected the output I am desiring is
1
2
etc.
to be g
ok thx all, works great now :)
On 10/25/06, Stut <[EMAIL PROTECTED]> wrote:
Gert Cuykens wrote:
> BINGO :)
Indeed.
> ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] =>
> ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1
>
> Can you explain a bit more what this do ?
Gert Cuykens wrote:
BINGO :)
Indeed.
ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] =>
ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1
Can you explain a bit more what this do ? 2>&1 For example will i only
get stderr or do i get stdout and stderr messages ?
BINGO :)
ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] =>
ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1
Can you explain a bit more what this do ? 2>&1 For example will i only
get stderr or do i get stdout and stderr messages ?
On 10/25/06, Stut <[EMAIL PROTECT
Can't say why you're not getting an error message, but when I have a valid
user, password, host, and sql in a .txt file, I get the last record from the
select statement I run output in the browser. Maybe start with getting it to
work with everything used correctly, then work backwards.
HTH,
On
Gert Cuykens wrote:
i do not get any output from mysql except form echo $bin that displays 1 ?
I don't know for sure but chances are that mysql outputs errors on
stderr not stdout, so you need to redirect stderr to stdout for exec to
capture it...
exec("mysql -h hhh -u uuu - < test.php
when i do echo exec... i get a blank screen
(print_r $out i get Array() echo $bin i get 1)
On 10/25/06, David Giragosian <[EMAIL PROTECTED]> wrote:
What do you get if you run:
echo exec("mysql -h hhh -u uuu - wrote:
> actually something like 'asdadsuiashdiasdh' :) test.php is just some
>
What do you get if you run:
echo exec("mysql -h hhh -u uuu - wrote:
actually something like 'asdadsuiashdiasdh' :) test.php is just some
text file i maybe should have renamed it to test.txt sorry.
But the thing is i dont get any feedback like 'cant connect to host'
or 'invalid sql' etc.
actually something like 'asdadsuiashdiasdh' :) test.php is just some
text file i maybe should have renamed it to test.txt sorry.
But the thing is i dont get any feedback like 'cant connect to host'
or 'invalid sql' etc.
exec(mysqldump...) works but exec(mysql...) doesnt
On 10/25/06, David Girag
Take this with a grain of salt. I develop with PHP, but I am not an
internals guy...
[EMAIL PROTECTED] wrote:
Are the include files only compiled when execution hits them, or are
all include files compiled when the script is first compiled, which
would mean a cascade through all statically lin
Ok - This is a reply to ALL - Thanks for the great help - I now understand
why it wasn't displaying - it was all due to caching of data at the client
end before displaying in blocks. With some help in the comments of the php
manual for flush() I found a nice script that uses echo str_pad('',1024
What is the SQL you are running in test.php?
David
On 10/25/06, Gert Cuykens <[EMAIL PROTECTED]> wrote:
i do not get any output from mysql except form echo $bin that displays 1 ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
i do not get any output from mysql except form echo $bin that displays 1 ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I'm using PHP 4.x and I'm trying to understand a bit about memory usage...
Firstly, when I say 'include files' below, I mean all forms, include,
require and the _once versions.
That said, when a script runs and it's made of several include files,
what happens?
Are the include files onl
Hi,
I wanted to give some feedback on PHP 5 hosting in case it helps
someone. I signed up with DreamHost last Thursday. I also signed up
with OCS Solutions to compare the two services. I also maintain a
server with CalPop.
When I signed up with Dreamhost, I discovered that you have to
On 24 Oct 2006, at 19:07 , Brad Chow wrote:
$date=("2006-10-26");
$date=strtotime($date);
$date=date('Y-m-1',$date);
$now=strtotime("+3 month", strtotime($date));
$lastday=strtotime("-1 day", $now);
echo date('Y-m-d',$lastday);
//2006-12-31
Yep, that's pretty much exactly what I do. I suspect
Matt Beechey wrote:
I am writing a php website for users to edit a global whitelist for Spam
Assassin - all is going fairly well considering I hadn't ever used php until
a couple of days ago. My problem is I need to restart AMAVISD-NEW after the
user saves the changes. I've acheived this using SU
Ron Piggott (PHP) wrote:
I have used the strtotime command to calculate a week ago (among other
things) with syntax like this:
$one_week_ago = strtotime("-7 days");
$one_week_ago = date('Y-m-d', $one_week_ago);
How would you use this command to figure out the last day of the month
in two months
On 25/10/06, Ivo F.A.C. Fokkema <[EMAIL PROTECTED]> wrote:
Ah, in that case using $HTTP_ACCEPT_LANGUAGE relies on the
register_globals setting, which is a security risk (and turned off by
default). Please read up on this, so you know what you're up against...
See: http://www.php.net/register_glob
On Wed, 25 Oct 2006 13:53:47 +0200, Dotan Cohen wrote:
> On 25/10/06, Ivo F.A.C. Fokkema <[EMAIL PROTECTED]> wrote:
>>
>> Because that wouldn't work :)
>>
>> This variable may contain stuff like "nl,en-us;q=0.7,en;q=0.3". You'll
>> need to do something with this variable first to use
>> array_key_
On 25/10/06, Ivo F.A.C. Fokkema <[EMAIL PROTECTED]> wrote:
Because that wouldn't work :)
This variable may contain stuff like "nl,en-us;q=0.7,en;q=0.3". You'll
need to do something with this variable first to use
array_key_exists (or as you do, isset). That said, I agree that
strstr() might not
On Wed, 25 Oct 2006 10:19:24 +0200, Max Belushkin wrote:
> Whatever form information you want to pass has to be part of the form.
>
>> WILLEMS Wim (BMB) wrote:
>>
>
> In the second script, the value of this will be in $_POST["database"].
... which will contain absolutely nothing, since you hav
On Wed, 25 Oct 2006 20:35:29 +1300, Matt Beechey wrote:
> I am writing a php website for users to edit a global whitelist for Spam
> Assassin - all is going fairly well considering I hadn't ever used php until
> a couple of days ago. My problem is I need to restart AMAVISD-NEW after the
> user sav
> -Original Message-
> From: Edward Kay [mailto:[EMAIL PROTECTED]
> Sent: 19 October 2006 14:53
> To: php-general@lists.php.net
> Subject: [PHP] IMAP extension causing delays
>
> Hello,
>
> I need PHP's IMAP extension for my web app but it is really slowing my
> server up.
>
> My setup: Fed
# [EMAIL PROTECTED] / 2006-10-25 20:35:29 +1300:
> I am writing a php website for users to edit a global whitelist for Spam
> Assassin - all is going fairly well considering I hadn't ever used php until
> a couple of days ago. My problem is I need to restart AMAVISD-NEW after the
> user saves the c
http://google.com/search?q=phpmyadmin
phpmyadmin has all the functionality you are trying to build - and it
implements it securely - even if you are writing the code/tool mentioned below
as a learning exercise (as opposed to writing it because you need to
be able to execute arbitrary queries easil
I am writing a php website for users to edit a global whitelist for Spam
Assassin - all is going fairly well considering I hadn't ever used php until
a couple of days ago. My problem is I need to restart AMAVISD-NEW after the
user saves the changes. I've acheived this using SUDO and giving the
www-
Whatever form information you want to pass has to be part of the form.
WILLEMS Wim (BMB) wrote:
In the second script, the value of this will be in $_POST["database"].
$wim isn't part of your form - it will /not/ get saved into the next PHP
script. You can handle it through input type hid
WILLEMS Wim (BMB) wrote:
Dear all,
I am trying to pass variables from one php-file to another but that
doesn't seem to work. Anyone an idea what I am doing wrong?
The first file shows a dropdown with all the databases on the server
(only 1 for me). You have to select a database and put an S
Marco Sottana wrote:
i find jscalendar element for HTML_QuickForm
http://www.netsols.de/pear/jscalendar/
Ask on the pear-general list, you'll get more responses.
http://pear.php.net/support/lists.php
and please don't cross-post.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
Dear all,
I am trying to pass variables from one php-file to another but that
doesn't seem to work. Anyone an idea what I am doing wrong?
The first file shows a dropdown with all the databases on the server
(only 1 for me). You have to select a database and put an SQL query in
the textarea.
Pus
i find
jscalendar element for HTML_QuickForm
http://www.netsols.de/pear/jscalendar/
i need to use
multiple dates feature
http://www.dynarch.com/demos/jscalendar/multiple-dates.html
anyone can help me?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
On Tue, 24 Oct 2006 20:36:08 -0400, Ron Piggott (PHP) wrote:
>
> I have used the strtotime command to calculate a week ago (among other
> things) with syntax like this:
>
> $one_week_ago = strtotime("-7 days");
> $one_week_ago = date('Y-m-d', $one_week_ago);
>
> How would you use this command t
On Tue, 24 Oct 2006 23:55:49 +0200, M.Sokolewicz wrote:
> Dotan Cohen wrote:
>> On 24/10/06, Chris Boget <[EMAIL PROTECTED]> wrote:
>>> > $languages = array(
>>> >"af" => array("Afrikaans", "Afrikaans", "South Africa"),
>>> >"sq" => array("Albanian", "Shqipe", "Albania"));
>>> >
>
43 matches
Mail list logo