4096);
if($buffer > 0){
echo "buffer is $buffer";
}
}
Or I suppose you could say if(!$buffer), will make for less code
HTH!
Jay
***
* Texas PHP Developers Conf Spring 2003
uld use strcomp() to compare strings against other strings though, since
data types like this may cause problems since PHP variables are loosely
typed.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
utton
HTH!
Jay
I need somebody really bad
are you really bad?
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfe
'TARIFF'];
break;
'OFFPEAK': $offpeak = $row3['TARIFF'];
break;
}
}
echo "{$row2['GROUP']} {$row3['TIME']} {$row3['TARIFF']}\n";
}
}
[/snip]
Actually it can
by many old programs.
SELECT a,b,a+b INTO OUTFILE "/tmp/result.text"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
FROM test_table;
HTH!
Jay
Im talking to myself
please dont eavesdrop!
*
INTO. Therfore
$file=READ INTO THIS FILE(/myfile/myfile.txt/);
HTH!
Jay
Im really easy to get along with, once you people learn to worship me
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conferen
write it out? I didn't see your originl post and don't know if there was
more detail available, but I hope this helps.
Jay
Im not tense
just terribly, terribly alert
***
* Texas PHP Developers Conf Spring 2003 *
*
[snip]
What is in the file? Do you have a print($file) or echo somewhere? Does the
included file have print() or echo() in it?
No, in the file is only html
[/snip]
There you go ... HTML will be parsed by the browser and displayed. So it is
doing exactly what it is supposed to do.
HTH!
Jay
I
]
Are you wanting to place the file into the variable so that you can echo it
out later? That is an extra step that you do not need. Just place the
include() function where you want it to appear.
HTH!
Jay
***
* Texas PHP Developers Conf
[snip]
Are you wanting to place the file into the variable so that you can echo it
out later? That is an extra step that you do not need. Just place the
include() function where you want it to appear.
But what do if i want echo it out later -> That's exactly what i want do
[/snip]
You mean more
say
that I am in good company, where HTML is involved and I need to use it again
I just call another include() function. I do this for navigation items,
footers, headers, and other odd items.
Jay
Im just working here till a good fast-food jo
a table or text file
if($current_number < $max_users){
//when this registration is done
$current_number++;
}
HTH!
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center
ays){
print("Your account has expired.\n");
}
HTH!
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas
[snip]
I seem too have lost my e-mail regarding removing myself off the list. I
use the newsgroups now. If anyone can send me the e-mail on how too
remove my self off the mailing list. That would be greatly appreciated.
Paul
[/snip]
Look at the footer of this message, there is a link.
Jay
n
the lines?
Thanks!
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas*
* San Antonio Area PHP D
-Original Message-
From: Christian Ista [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 3:17 PM
To: 'Jay Blanchard'
Subject: RE: [PHP] Error
> How large is the page, can you send more? If not, can ou put line
numbers
> on the lines?
Not a of lines 20 fo
thought. I'd love to see some solutions
based on this though, and maybe when I get a little time next week I'll give
it a go.
HTH!
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Con
w what else you could do.
HTH!
Jay
I havent lost my mind. Its backed up on disk somewhere
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* N
the register_globals statement in your php.ini, and see if it is set
to "Off". If it is, set it to "On" (damn the security for now) and restart
your web server.
HTH!
Jay
If you want breakfast in bed, sleep in the kitchen
***
nly with a single
dimensional array. Can someone suggest a more elegant solution? Thanks, Rich
[/snip]
That is kind of an ambiguos question there Rich. What needs to be more
elegant, the method? the output? You could use a foreach key/value pairing
if your values are such. See
http://www.php.net/manual/e
o the file
when no more records
close file
Maybe you need to place a proper newline character at the end of each record
or something like that. Can we have some more information to go on?
Thanks!
Jay
***
* Texas PHP Develope
.=
-Original Message-
From: Alexander Ross [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] +=
Is there a += equivilant for strings??
$string = "Hello";
$string += "world.";
I know that
$string = $string." world.";
would work, but
[snip]
to my big surprise when i am executing test.php?abc=testvalue
where test.php =
I get empty string
can somebody say what's wrong?
[/snip]
register_globals = Off in php.ini
try
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
side it makes code much cleaner and easier to document.
HTH!
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas
ve to escape
quotes, they are escaped magically for you. A better bet is to turn magic
quotes off and use addslashes();
http://www.php.net/manual/en/function.addslashes.php
HTH!
Jay
***
* Texas PHP Developers Conf Sp
priate authentication.
If the root is /var/www/html then outside of the root could be
/var/www/secure so that the path cannot be hacked from the browser, but you
should still apply appropriate restrictions.
HTH!
Jay
***
* Texas PHP
sonably assured of security. Me
personally? I would take the extra step. That way you know that you have
done all that you could possibly do.
As I have said (and many others have said), "If you don't want anyone to get
a hold of the file, d
Can someone give me a URL for a php.net mirror? I am having trouble with
access...
Thanks!
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braun
se a
person posting to the guestbook has either single or double quotes (or both)
within the message which aren't escaped properly. addslashes() does this.
Use stripslashes() when retrieving the message for display to remove the
slashes so that the message looks normal.
HTH!
[snip]
... but surely one should store files across directories, as 1 images in
a single directory might slow down access to those images in the filesystem,
or not so?
[/snip]
Not really. The server really does not care where the files are and no
performance would be lost.
Jay
I am sure that there would be some
dependent upon the file system (and OS), not to mention hardware factors,
the most significant which comes to mind is hard-drive seek times. But as
yet, none noticed...
Jay
***
* Texas PHP Develop
]
How about POSTING the whole querystring...
http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51
posting without using a form, can probably be re-engineered to for ASP to
send information back
HTH!
Jay
***
* Texas PHP Developers
keep disabling them.
They think a web site can use a cookie to break into their computer. They
also disable JavaScript a lot too.
[/snip]
What about installing PHP on the IIS server and when time comes to pass back
the information using the same method?
Trying to think outside the box ...
ting older?
yes -> move to 'lower' directory, upload newer into current
directory
Opinions, ideas, criticisms?
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar
[snip]
Is there a way to "pause" a script?
[/snip]
Do you want it to wait for input? Or just pause? If the second try sleep()
Jay
***
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Con
59-6464', 'Email', 'August 25, 2002', '64.252.232.82', 'Newly
Requested', 'Testing')";
$result = mysql_query($query) or die("Query failed");
[/snip]
Have you printed the query to make sure that the syntax is right? The fi
se
statement that would take into account each possible combination. I have
been thinking this through for an hour or so, but I am not seeing a clear,
elegant, and efficient piece of code. Has anyone done anything like this, or
does anyone have an idea of how this might be done?
TIA!
Jay
*
. "' ";
}
}
$qpon .= "ORDER BY BillDate ";
if(!($dbpon = mysql_query($qpon, $dbconnect))){
print("MySQL reports: " . mysql_error() . "\n");
exit();
}
?>
I am sure that the
. Trap MySQL errors for the query by doing something like this;
if(!($result = mysql_query($query, ))){
print("MySQL reports: " . mysql_error . "\n");
exit();
}
WHERE IS YOUR DB CONNECTION VARIABLE?
I believe that your error is that the following line
$result = mysql_q
[snip]
2. Trap MySQL errors for the query by doing something like this;
if(!($result = mysql_query($query, ))){
print("MySQL reports: " . mysql_error . "\n");
exit();
}
[/snip]
TYPO!!! :^] Should be mysql_error() (note the par
s no way to control this with PHP. Each
browser is different on how this is handled.
HTH!
Jay
***
* Central Texas PHP Developers Group *
* San Antonio, Austin, San Marcos, New Braunfels, *
* Seguin, Boerne, Blanco, the H
[snip]
So it seems that the browser in the failing case is trying to deal with the
URL in its encoded form.
Anyone have any ideas about what I'm missing?
[/snip]
A quick thought, run and see what register_globals is
set to in the php.ini
HTH!
Jay
--
PHP General Mailing List
[snip]
How can I use CURL if I cannot recompile PHP with --with-curl.
I am using PHP4.2.2 on a shared server with an ISP so I do not get the
ability to recompile.
[/snip]
Use cURL from the command line with an exec() in your PHP script.
HTH!
Jay
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 9:03 AM
To: Jay Blanchard
Subject: Texas PHP Developers Conference
Howdy!
Thanks for taking interest in the (hopefully annual!) Texas PHP Developers
Conference. I am in the process of
file '/tmp/#sqld0e_76_1.MYI' (Errcode:
13)
Removing the "group by" clause prevents the error.
[/snip]
Using perror 13 I get;
root@myserver:/var/www/htdocs# perror 13
Error code 13: Permission denied
So perhaps /tmp/ or #sqld0e_76_1.MYI has the wrong permissions
HTH!
Jay
(searched millisecond and milliseconds) and found some things which might
point you in the right direction.
HTH!
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center
(searched millisecond and milliseconds) and found some things which might
point you in the right direction.
[/snip]
Have a look at http://www.php.net/manual/en/printwn/function.microtime.php
HTH!
Jay
*
* Texas PHP Developers Conf Spring 2003
e it created the file. But it stays emty.
[/snip]
You need to place METHOD=POST in the original form tag and remove it from
the submit tag. Try that
HTH!
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar
G
RA>what version?
The latest one, of course.
[/snip]
I refer you to;
http://www.ietf.org/rfc/rfc2795.txt?number=2795
I am having the thought of writing a similar IETF informational RFC about
Google Searches and monkeys who cannot be bothered with same.
HTH!
Jay
**
with the other not-so-useful stuff. And to keep
bandwidth usage down, I snip.
Today is a day I should go home and go back to bed :^[
> HTH!
>
> Jay
>
>
> * Ask smart questions: *
> * http:
[snip]
i want to format the filename of an uploaded file as follows :-
-- replace blankspace with "_"
-- remove any illegal characters.
Which string functions should I use to do this?
[/snip]
http://www.php.net/manual/en/function.eregi-replace.php
HTH!
Jay
--
PHP General Ma
still emty. (the dropdown field is NOT emty
by
the time i press the select button)
Any other ideas?
[/snip]
Did you put a closing form tag?
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if anything.
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e wants to try the
script out, it is newsPHP from http://www.nphp.net/. Please, someone help!
[/snip]
My SWAG is that you need to set register_globals = On in your php.ini.
Either that or you need the rtfm() function.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
TE? If you set those
on the database did you flush the grant tables?
HTH!
Jay
In clinical trials for diabetes medications do they give sugar pills as
placebos?
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort
[snip]
is there any function which removes white spaces inse a string?
[/snip]
eregi_replace(), there are others as well.
http://www.php.net/manual/en/function.eregi-replace.php
rtfm(); HTH!;
Jay
I bet I can stop gambling
*
* Texas PHP
[snip]
I have a string with the html source, but want to fetch only some
Of the code ...
I want to use alle the codes inside start->end ..
Example:
[/snip]
Have a look at the regex functions ...
http://www.php.net/manual/en/ref.regex.php
HTH!
Jay
HONK if you love peace &
!
Jay
He who laughs last thinks slowest!
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center*
* New Braunfels, Texas *
* Contact [EMAIL PROTE
what,
if anything, is contained there. I would also like to see more than;
...log_message reports: PHP Notice: Undefined index: action in
HTH!
Jay
Here I am. Now what were your other two wishes?
*
* Texas PHP Developers Conf Spring 2003
a solution. Break down the process into managable
portions, solving each portion before moving on to the next.
Challenge; Can this be made as simple for rows too?
Peace and I HTH someone else!
Jay
Hard work has a future payoff. Laziness pays off NOW.
*
loop ...
print("" . ($row->value + $row->another_value) . "\n");
... giving you another column with the row total. That way you could avoid
adding columns that do not contain numerical values if that is the case in
your result set. And I think that you would want t
nd go into the entire record to
update.
[/snip]
while($row = mysql_fetch_object($result)){
print("" . field1 . "");
}
You just print the desired field into an a tag, if I am understanding you
correctly. I would have to see your code to let you know more.
HTH!
Jay
--
need to do \r\n or chr(13) chr(10) at each
place you want a break (or a ^m). This happens to be an anomaly with
Notepad, which unlike popular belief is not really a text editor, it just
plays one on TV. Open your file in WordPAd, and prepare to be amazed.
HTH!
Jay
***
[snip]
[/snip]
Try this;
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ot work in combination with PHP? I am using query
above as $query and do the following standard procedure:
[/snip]
Good point! Now as to your question, try this...
SELECT @idsum:=(IFNULL(@idsum, id)+id) AS idsum, id FROM yourtable;
When you output your query info output the value as $row->idsu
quot; . $add_Williams . "', '', '" . $row_num .
"', '" . $last_update . "')", $sql4)
or die ("could not do update");
}
First of all, seems there is extra stuff in the query that shouldn't be
there (what is $sql4?) and you may have parentheses out of place.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, then it would be checked for original_size
minus bits_uploaded, flush the reults to the IFRAME drawing a GD graph, and
continue to do this as it went on.
Another method is to start the upload with a non-progressive animation that
quits when is_upload_file() returns true.
Jay
--
PHP General Ma
quot; . $table_prefix . "teams WHERE username = 'admin'
Here is a useful troubleshooting method; if the query returns an error,
print it out. You can generally find errors quite easily.
HTH!
Jay
Guys have feelings too. But, like
who cares?
/snip]
Why not use fopen()? A CSV file is a plain text file and therefore cannot be
treated as a database. The CSV file has no data engine with which to connect
to.
HTH!
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M R
ot;,"") OR die("There is an error
connecting to the CSV file.");
Make sure that you trap every potential error.
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Cente
[snip]
// ODBC commands to explore connection:
$result = odbc_tables($odbc);
odbc_fetch_into($result,$row);
print_r($row);
[/snip]
Have you tried a WHILE loop to print out each row? I am not sure of the
exact syntax but something like;
\n"); //at end of row
}
?&
it and had a look at the
manual, so I don't know where to point you now.
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center*
* New Braunfel
ose to turn register_variables ON (it used to be on by default
in earlier versions of PHP) or you could choose to turn it on in an
.htaccess directive by folder since you're running Apache.
HTH!
Jay
*
* Texas PHP Developers Conf Spring 2003
ct
Oriented Programming features we have come to know and love it still has
very robust OOP features and more are coming.
Again, I would need to know his arguement(s).
[snip]
3.If this is not true, what arguments can I use to refute this?
[/sni
o say about it.
Thanks
[/snip]
Zen & The Art of Commenting Code
1. Comment only that which does not make obvious sense, and comment well on
that. Explain as clearly, but succinctly as possible. If 2 words suffice,
do not use 14.
2. Comments are only part of the documentation.
:^]
Jay
--
PH
ocode
if($contract_amount == "" || $contract_amount == NULL){
print("Fee-based");
}
HTH! Peace ...
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center
[snip]
Thanks Jay. How would that work into something like:
printf("Total Budget: $%s\n", mysql_result($result,0,"budget"));
or
printf("%s%s%s%s%s%s%s\n",
$myrow[0], $myrow[0], $myrow[4], $myrow[8], $myrow[9], $myrow[7],
$myrow[10]);
[/snip]
You have to d
e can point you to a link.
HTH! Peace ...
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
te LIKE "%man%"
OR history.description LIKE "%man%"
OR modified.first_name LIKE "%man%"
OR modified.last_name LIKE "%man%"
GROUP BY customer.customer_name
ORDER BY customer.customer_name
Note the MAX(history.modify_date) in the SELECT and the GROUP BY
customer_name
HTH! Peace ...
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nes of code, though I am sure it could be rewritten now.
HTH! Peace ...
Jay
Growing old is mandatory, growing up is optional
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center*
* New B
ffect says
id = $id AND reporter = $reporter
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sions, and if accessed from the
browser will always run as Apache allows (which is generally
nobody/nogroup). What you need to do is change the permission/owner of the
file that you're trying to update with either chown(), chmod(), or both.
HTH!
Jay
Good Judgement comes from experience; e
[snip]
Is this the appropriate way to handle this?
' . "\n";
?>
What's everyone else do? I'm not missing something here am I?? :)
[/snip]
You can also place the XML declaration outside of the php tags. I have been
able to get proper validation both ways.
HTH!
Ja
[snip]
When I do that PHP complains about the echo '' . "\n";
> ?>
>
> What's everyone else do? I'm not missing something here am I?? :)
[/snip]
Try
\n");
?>
I just copied this from a page that I have that validates properly
HTH!
Jay
--
[snip]
which function divides astring to the pieces accorrding to another string.
for example according to a comma ..
[/snip]
explode()
http://www.php.net/manual/en/function.explode.php
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
ke ...
http://www.evolt.org/article/Using_MySQL_and_PHP_to_Present_Excel_Spreadshee
ts/20/26896/index.html
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g to achieve from it.
[/snip]
All you have to change to make this right is change the ON statement after
'left join position c' to 'on b.staffno = c.staffno'. Remember that you are
moving from left to right in the join, so your ON must also move from left
to right.
HTH!
J
p]
I also just realized that your where statement may be too ambiguous, so
change it (again think from left to right) to 'where a.staffno = $staffno'.
Since a.staffno should match b.staffno should match c.staffno.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
FPDF (http://www.fpdf.org)? It may be just what you are
looking for as it seems you could combine the code with the dynamic v-vard
image.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
file which contains the above
code you should be OK. If not, you need to supply the path.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
current value
3. UPDATE the new value
HTH!
Jay
"I ain't gonna write your code for ya' or fix your computer neither"
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center
[snip]
So I if I create the form, is there way that I can have it echo on the same
page if I am using a form?
[/snip]
Yes, using $PHP_SELF as your form action
HTH
Jay
"Ever stop to think, and forget to start again?"
*
* Texas PHP
until the spreadsheet
is either delivered or the system times out. I thought that using output
buffering would lower use of client system resources. Is this not true?
Thanks!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
delivering spreadsheets?
Thanks!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. I am
researching some classes, but they all seem to take just as long to create
the spreadsheet.
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
::BiffBase();
53 $this->_fill_AA_notation();
54 }
This is on a server with PHP 4.04. Does anyone have any clues as to why it
might not work?
ACCCK! I am so frustrated at this point that I would almost rather write
spreadsheets by hand!
Thanks for your help!
Jay
--
PHP Gene
to clear some time for an upgrade.
Thanks!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?
name="txtSubTotalAmount" size="40"
readonly>
I apologize if this is not what you are asking.
Jay
Errors have been made. Others will be blamed.
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Res
tripslashes(), unless, of
course, magicquotes is on, and then if register_globals is off then;
or
:^]
Jay
*
* Texas PHP Developers Conf Spring 2003*
* T Bar M Resort & Conference Center*
* New Braunfels, Texas
[snip]
Is there a way to determine what platform PHP is running on? I'm trying
to write a script that parses path names which we all know unix and
windose don't agree with each other.
[/snip]
Put in a page and then load in the browser from your
server. It's revealing ...
HTH!
401 - 500 of 3770 matches
Mail list logo