Blake Schroeder wrote:
Hey
I cant figureout the syntax please help
echo Some text.aFunction().some more text;
The function is not working.
Thanks
-B
What is it you expect, and what is actually happening?
--
David Robley
What do batteries run on?
--
PHP General Mailing List
Here is a nice trick guys...
if you want to page the result of this query :
SELECT * FROM user;
turn it into this one:
SELECT SQL_CALC_FOUND_ROWS * FROM user LIMIT $offset,$limit;
so in the end all you have to do is to perform one single query and even
before fetching the rows you can call
Hello, how to make the firs letter of the word Big?
for example I have:
$colour = car is red;
but I need:
$colour = Car is big.
Thank you very much,
I would look for the answer myself using google,
but I have no time for it.
I hope there is an easy solution for this.
Lab.
--
PHP General
Use ucfirst()
Labunski wrote:
Hello, how to make the firs letter of the word Big?
for example I have:
$colour = car is red;
but I need:
$colour = Car is big.
Thank you very much,
I would look for the answer myself using google,
but I have no time for it.
I hope there is an easy solution for this.
Thank you very much! That helps!
As I sad before, I would look for it myself , but I wasn't sleepinng all the
night,
this way I think it would be a liittle bit difficult to find it.
Thank you once more,
Lab.
Miguel J. Jiménez wrote in message news:[EMAIL PROTECTED]
Use ucfirst()
Labunski
since there aren't much data you can do something like this:
1 . make db table
tableName
id INT
title VARCHAR(30)
Data TEXT
timestamp VARCHAR(30)
2. just dump the data you get from the user into a db..
3. when you are ready to get the data back for view from database you can
simply
===
Please feel free to add more points and send
to the list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en first. You
can download a copy and use it offline also.
Please also try
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each week.
I want to have a page that displays the results for the last week only.
The date format in the field is -MM-DD
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each
week.
I want to have a page that displays the results for the last week only.
The date format in the field is -MM-DD
if you want the latest row
Jeffrey,
Thanks for this,
I've just realised that it's always the same no of inserts, so perhaps I
should just order by date then my previous sort field and then limit the
result to 20?
(It's all 20 results that I need displayed)
Thanks,
Tom
-Original Message-
From: [EMAIL PROTECTED]
select * from table where week(date_field) = ( week(now()) -1 )
Tom Chubb wrote:
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each week.
I want to have a page that displays the results for the last week
Hi,
I have a form on my page. The form action is linked to itself so that the
values entered will refresh the page accordingly. Is it possible to add
another button to the form that utilises my JavaScript popup function and
takes the values from the same form?
function openQueryWindow(URL) {
On Friday 25 June 2004 13:20, Jim Rainville wrote:
system(write_port 0x);
When I call this from the script the port does not get written to.
1) Enable FULL error reporting
2) Use /full/path/to/write_port
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software
another button to the form that utilises my JavaScript popup function and
takes the values from the same form?
This is not a php question.
All you need to do is loop through the form fields on you page and add
them to the end of your url.
--
PHP General Mailing List (http://www.php.net/)
Matt M. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
another button to the form that utilises my JavaScript popup function
and
takes the values from the same form?
This is not a php question.
All you need to do is loop through the form fields on you page and add
them to the
Thanks for your reply, the problem here is that if I loop through the values
and them to the URL when the other button is pressed to submit the form the
form action will still kink to itself rather than opening a new popup
window...
input type=submit name=submit value=Submit onclick=return
Shaun wrote --- napsal::
Matt M. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
another button to the form that utilises my JavaScript popup function
and
takes the values from the same form?
This is not a php question.
All you need to do is loop through the form fields on you page and
I have a small image resize function which works great on my local server as
I have the gd2 library. It uses the imagecreatetruecolor function which
makes the thumbnails look good, without it, they look bad. The problem is,
my webhost is not going to upgrade to gd2 sois there anyway I can
What I'm basically trying to do is make the database display out the
information from it's tables as soon as it possibly can without the need for
refreshing. For example:
Someone enters in some text, and it's put into the database. As soon as
possible, the text is shown in a page that wasn't
Greetings all, just installed Fedora with the bundled PHP Version
4.3.4. Upon calliing mysql_* functions I get errors like:
Fatal error: Call to undefined function: mysql_pconnect() blah blah blah
A call to phpinfo() reveals it was configured with:
--with-mysql=shared,/usr'
And doing a locate
Install php-mysql package
Jough P wrote --- napísal::
Greetings all, just installed Fedora with the bundled PHP Version
4.3.4. Upon calliing mysql_* functions I get errors like:
Fatal error: Call to undefined function: mysql_pconnect() blah blah blah
A call to phpinfo() reveals it was
I'm trying to do socket_bind() and it works fine from the command line as
root, but when I try to use it through apache I get this error
Warning: socket_bind() unable to bind address [13]: Permission denied in
..
Is there a way to have this run through apache?
-Josh
--
PHP General Mailing
I think all sockets less then 1024 need superuser permission to bind. And because
Apache typically runs as nobody you don't have permission, so either run apache as
root (DANGER!) or choose a socket above 1024.
-Brad
- Original Message -
From: Josh Close [EMAIL PROTECTED]
Date:
Thanks, changing the port worked.
-Josh
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 9:22 AM
To: [EMAIL PROTECTED]
Cc: PHP (E-mail)
Subject: Re: [PHP] socket_bind
I think all sockets less then 1024 need superuser permission
Hi,
is there a way configure mod_php4 (for apache) so as to be *absolutely* sure
that it will always load all definitions in php.ini when apache starts up?
Maybe with some directive in http.conf ?
Almost every time I reboot my pc apache and php start, but php is not
running with /etc/php.ini,
Your problem is the paren's
echo 'some text' $aFunction 'some more text';
You need double quotes for the entire string, but single quotes around
the text so it knows it is text.
Alicia Riggs
Professional Services Group
Senior Web Development Engineer
214-550-7452
-Original
Nico Sabbi wrote --- napísal::
Hi,
is there a way configure mod_php4 (for apache) so as to be *absolutely* sure
that it will always load all definitions in php.ini when apache starts up?
Maybe with some directive in http.conf ?
Almost every time I reboot my pc apache and php start, but php is
I'm a system administrator who's dabbled a bit in PHP, but am not very experienced in
it. My PHP developer came to me with a behavior which neither of us can understand.
If you go to this URL, you'll get a broken version of the main home page on our site:
Hi,
I've been pulling my hair out over this problem for a while...
?php
$msg = Hi, this is a test;
$to = [EMAIL PROTECTED];
$sbj = test message from my.edu;
$rev = mail($to,$sbj,$msg);
echo mail from my.edu result is $rev;
?
--
Since the result of the mail()
Hi Everyone,
Last week I posted about having a problem displaying TIFFs thru PHP.
This week I'm back to issues, tho slightly different. I'll start over with
my case.
I have a docroot:
/usr/local/apache/htdocs-chm/
I have an images dir:
/usr/local/apache/chm-images/
These are
KEVIN ZEMBOWER wrote:
If you go to this URL, you'll get a broken version of the main home
page on our site: http://www.hcpartnership.org/index.php/search . We
can't understand this, because 'index.php' is a file, not a
directory. (The correct web page is just at
On Fri, 25 Jun 2004 11:08:26 -0500 (CDT), Bing Du [EMAIL PROTECTED] wrote:
Since the result of the mail() returned is 1, the message should have been
delivered fine. but I did not get anything. Where can I look for more
clues of what the problem might be, like possible log, or turn on some
select * from table where TO_DAYS(date_field) ( TO_DAYS(NOW()) -7 )
this will give the entries of the last 7 days (and the ones that are in the
future)
Tom Chubb [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
How can I query a MySQL table to get the latest results from a date field?
Michael, thank you for finding out this information. I think you're right on the money.
Unfortunately, when I tried to implement the --disable-path-info-check on my PHP
system, it didn't work. Reading the fine print at
http://www.php.net/manual/en/configure.php showed:
--disable-path-info-check
What I'm trying to do is find a substring in a much longer string and
insert another string before and after the substring. For example:
string to find: weather
string to search in: This is the worst weather ever. Weather around
here is terrible.
string to add before: strong
string to add
I have code which attempts to upload some files and create thumbnails. The
same code on one server works ok, the same code on another server throws an
error everytime I hit submit that says The document contains no data...it
appears to be a javascript error. It is not an error that I am
There's a number of functions in PHP that will give me the position of
the *first* instance of the matched string, but it doesn't look like the
function would keep searching after the first match. Anyway, am I
overlooking a function that already has the functionality that I'm
searching for?
Your message could have bounced or been rejected for some other reason, in
which case you wouldn't have recieved it, but it'll look like it's sent
fine.
-Josh
-Original Message-
From: Bing Du [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 11:08 AM
To: [EMAIL PROTECTED]
[snip]
I have code which attempts to upload some files and create thumbnails.
The same code on one server works ok, the same code on another server
throws an error everytime I hit submit that says The document contains
no data...it
appears to be a javascript error. It is not an error that I am
Matt M. wrote:
There's a number of functions in PHP that will give me the position of
the *first* instance of the matched string, but it doesn't look like the
function would keep searching after the first match. Anyway, am I
overlooking a function that already has the functionality that I'm
That would work if aFunction was a variable - more less. It would
display the inner single quotes, so you'd really want:
echo some text $aFunction some more text;
However, aFunction is, ironically, a function, so it needs to be a
function call.
echo some text . aFunction() . some more text;
On
I cant figureout the syntax please help
echo Some text.aFunction().some more text;
The function is not working.
Your problem is the paren's
echo 'some text' $aFunction 'some more text';
You need double quotes for the entire string, but single
quotes around the text so it knows it
I'm trying to use socket_set_block and php.net says (php4 = 4.2, php5).
I'm using version 4.3.1 but I get this error
Fatal error: Call to undefined function: socket_set_block() in .
Any idea why this is? Has the name changed or been something else?
socket_set_nonblock() work fine.
-Josh
There's a number of functions in PHP that will give me the position of
the *first* instance of the matched string, but it doesn't look like the
function would keep searching after the first match. Anyway, am I
overlooking a function that already has the functionality that I'm
searching for?
Philip Olson wrote:
There's a number of functions in PHP that will give me the position of
the *first* instance of the matched string, but it doesn't look like the
function would keep searching after the first match. Anyway, am I
overlooking a function that already has the functionality that I'm
Everyone
Thank you for all the great feedback. Since my function doesnt return
data it just echos it to the browser.
When I use this format it does not display correctly
echo some text . aFunction() . some more text;
If I use the orginal code it displays fine.
echo Some text;
aFunction();
echo
I'm trying to use socket_set_block and php.net says (php4 = 4.2, php5).
I'm using version 4.3.1 but I get this error
Fatal error: Call to undefined function: socket_set_block() in .
Any idea why this is? Has the name changed or been something else?
socket_set_nonblock() work
Well, here's the code i'm using. Let me know if I'm doing something silly.
if(!socket_set_nonblock($this-socket)){
if($this-logging){ syslog(LOG_ERR, Could not set socket to nonblock.); }
exit();
}
//connection part goes here
if(!socket_set_block($this-socket)){
also, i know socket_set_option() used to be socket_setopt(), that's why i
ask
-Josh
-Original Message-
From: Philip Olson [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 2:11 PM
To: Josh Close
Cc: PHP (E-mail)
Subject: Re: [PHP] socket_set_block undefined
I'm trying to
Perhaps you have multiple PHP versions on your system? Like
an old CLI or CGI laying around somewhere? Maybe try checking
the PHP version in the code as well. If it's not that then
I have no idea.
Regards,
Philip
On Fri, 25 Jun 2004, Josh Close wrote:
Well, here's the code i'm using. Let
I want to get rid of the version on php in /urs/local, how do I do this?
There is no src to do a make uninstall from. I deleted some
file/directories, but when I do php -v it's still looking for the version
in /usr/local/bin instead of /usr/bin.
-Josh
-Original Message-
From: Philip
Hi there, I've looked in many places but have not found any clues on how
to work around this problem.
I'm using imagecopyresampled to resize an image and crop part of it at
the same time. The area I need to crop, unfortunately, is sometimes a
float, which leads to my problem.
Hi There,
I'm trying to develop a band listing site and was just wondering if there is
a php function that could limit the amount of words added into a text area.
I'm aware that this can be done in javascript but the only one I found
doesn't work properly if you try and paste in text to the text
I want to have something similar to this but as mentioned above want
something more reliable so does anyone know a php function to do this or
have a better option?
http://us3.php.net/manual/en/function.str-word-count.php, also some
good suggestions in the user comments
--
PHP General Mailing
Chris wrote --- napísal::
Hi there, I've looked in many places but have not found any clues on how
to work around this problem.
I'm using imagecopyresampled to resize an image and crop part of it at
the same time. The area I need to crop, unfortunately, is sometimes a
float, which leads to my
Marek Kilimajer wrote:
Chris wrote --- napísal::
Hi there, I've looked in many places but have not found any clues on
how to work around this problem.
I'm using imagecopyresampled to resize an image and crop part of it
at the same time. The area I need to crop, unfortunately, is
sometimes a
-Original Message-
From: Gabe
Sent: Friday, June 25, 2004, 9:06:15 PM
Philip Olson wrote:
There's a number of functions in PHP that will give me the position of
the *first* instance of the matched string, but it doesn't look like the
function would keep searching after the first match.
Did you try calling the word counter function in the onChange event of
textbox and truncate the characters/words
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No other way. Use one query to count the total record and then another
query for limiting
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi everyone,
I would like to know how to handle code breaks or code blocks
that takes up more than two lines.
For readability, I would like to know if there is something like the
following:
function input($type,$size,$name,$value)
{
return input type=\$type\ size=\$size\ value=\$value\
On Fri, 25 Jun 2004 22:13:03 -0400, gohaku [EMAIL PROTECTED] wrote:
Hi everyone,
I would like to know how to handle code breaks or code blocks
that takes up more than two lines.
For readability, I would like to know if there is something like the
following:
function
gohaku wrote --- napísal::
Hi everyone,
I would like to know how to handle code breaks or code blocks
that takes up more than two lines.
For readability, I would like to know if there is something like the
following:
function input($type,$size,$name,$value)
{
return input type=\$type\
* Thus wrote Joe Lewis:
The script works perfectly from the command line. It turns out to be
related directly to Apache 2.0 and the handling of buckets.
yeah, I was afraid of that, and I'm really at a loss with any
suggestions as is, except for:
Ideal solution:
use apache 1.x
Alternate
Just to re-enforce Michael Sims, post...
* Thus wrote KEVIN ZEMBOWER:
I'm a system administrator who's dabbled a bit in PHP, but am not very experienced
in it. My PHP developer came to me with a behavior which neither of us can
understand.
If you go to this URL, you'll get a broken
* Thus wrote Bing Du:
$rev = mail($to,$sbj,$msg);
echo mail from my.edu result is $rev;
?
--
Since the result of the mail() returned is 1, the message should have been
delivered fine. but I did not get anything. Where can I look for more
Negative! $rev will simply let
* Thus wrote Nico Sabbi:
Hi,
is there a way configure mod_php4 (for apache) so as to be *absolutely* sure
that it will always load all definitions in php.ini when apache starts up?
Maybe with some directive in http.conf ?
As far as I know, there isn't a php directive in apache to tell it
* Thus wrote Richard Harb:
-Original Message-
From: Gabe
Sent: Friday, June 25, 2004, 9:06:15 PM
Philip Olson wrote:
lots of ...
I'd say it will do the job just fine if case sensitivity is not an
issue:
$word = 'weather';
$new = str_replace($word, strong$word/strong,
* Thus wrote Edward Peloke:
I have code which attempts to upload some files and create thumbnails. The
same code on one server works ok, the same code on another server throws an
error everytime I hit submit that says The document contains no data...it
appears to be a javascript error. It is
* Thus wrote Josh Close:
I want to get rid of the version on php in /urs/local, how do I do this?
This can be a long story.. but basically in normal conditions if
php is compiled with --prefix=/usr/local (by default) then you'll
find the php binary in /usr/local/bin/php and stuff in
* Thus wrote gohaku:
Hi everyone,
I would like to know how to handle code breaks or code blocks
that takes up more than two lines.
you just might start a war of the gods here
For readability, I would like to know if there is something like the
following:
function
* Thus wrote Dan Joseph:
...
I was using ImageMagick, however it took a multipage tiff and turned it
into:
1.TIFF
1.JPG.0
1.JPG.1
1.JPG.2
1.JPG.3
Sometimes they are 1.JPG, sometimes only 2 pages, sometimes 10 pages. We've
decided to go with a TIFF viewer plug-in, and just use
* Thus wrote Chris:
Marek Kilimajer wrote:
Chris wrote --- napísal::
Hi there, I've looked in many places but have not found any clues on
how to work around this problem.
I'm using imagecopyresampled to resize an image and crop part of it
at the same time. The area I need to crop,
72 matches
Mail list logo