Looks like your problem is on line 24. See below.
-Steve
On Tuesday, April 30, 2002, at 12:48 PM, Jule wrote:
Hey guys, i'm writing this guestbook script for my site, and i'm
getting a
random parse error where i think everything is normal, it gives it on
line 26
which is
echo Your
On Monday, April 29, 2002, at 12:02 PM, Bo Pritchard wrote:
I know without the accompanying code there's no way to help me...But
without
having to get real specific what does the following message tell me is
wrong?
Thanks
Warning: Cannot add header information - headers already sent
On Thursday, April 18, 2002, at 04:38 PM, Jason Lam wrote:
$arr2 is a 2d array.
$arr1[0] = 1;
$arr1[1] = 10;
$arr2[0] = $arr1;
print $arr2[0][1];
Result will be 10
But,
$arr1[0] = 1;
$arr1[1] = 10;
$arr2[0] = $arr1;
$arr3 = each($arr2);
print $arr3[1];
What are you expecting?
Check out the bottom of each message...
-Steve
On Tuesday, April 16, 2002, at 10:43 AM, Omland Christopher m wrote:
Can anyone tell me how to unsubscribe. There is just a bit too much
volume
for me.
Thanks.
-Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
You could convert it to a timestamp using strtotime(), subtract 7*60*60,
then convert it back to a string with strftime().
-Steve
On Monday, April 15, 2002, at 09:50 AM, Torkil Johnsen wrote:
What date/time was it 7 hours ago?
I'm just trying to make a log using mysql/php
This log is
You could port Date::Calc from perl... or just call a perl script to do
the calculation. Probably the easiest way to figure out Easter (for the
extreme example) that I can think of.
-Steve
On Monday, April 15, 2002, at 03:05 PM, Tom Beidler wrote:
That's fine for fixed dates, and I have
Or try the usort() function?
?php
...
myArray[1][firstname] = Joe;
myArray[1][lastname] = Smith;
myArray[1][company] = Bullock;
myArray[1][email] = [EMAIL PROTECTED];
myArray[2][firstname] = Jim;
myArray[2][lastname] = Cords;
myArray[2][company] = Jamen;
myArray[2][email] = [EMAIL PROTECTED];
Well, start here probably:
http://www.php.net/manual/en/language.oop.php
-Steve
On Friday, April 12, 2002, at 12:50 PM, Chuck PUP Payne wrote:
Hi, I was up on freshmeat and I saw a TON of php classes. I like to
know how
can I use them? And is a class a bit of code that you are always
Yeah, sure.
-Steve
On Thursday, April 4, 2002, at 10:42 AM, Gerard Samuel wrote:
Maybe a simple question.
But can one file contain 2 or more classes??
Thanks
-- PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing
Are you using unicode? I don't know the answer for you - maybe check the
mysql site - but I'd be interested in hearing an answer as well if
anyone has one.
-Steve
On Thursday, April 4, 2002, at 12:11 AM, Dhaval Desai wrote:
Hello people,
I am making a bilingual website English/Arabic. I
On Thursday, April 4, 2002, at 04:21 PM, Erik Price wrote:
I looked in the manual, but didn't see anything about this. I've read
that PHP isn't a true object-oriented language, but rather simulates
elements of object-oriented programming. Can I write a class that
performs operations
Doh, typo:
// this next line would generate a parse error
// print(c:a1: . $c-echo($a)-method1() . br /\n);
should read
// this next line would generate a parse error
// print(c:a1: . $c-echoMethod($a)-method1() . br /\n);
On Thursday, April 4, 2002, at 05:25 PM, Steve Cayford wrote
On your first email you loop through all the news in the $newsfetch
resource. I think you need to then do a mysql_data_seek() call against
that to reset it for the next time through the loop. Otherwise you'll
just get a null result because you're already at the end of the data.
-Steve
On
Try putting session_start() in your retief.php script as well as
piet.php.
-Steve
On Wednesday, April 3, 2002, at 01:06 PM, R. Lindeman wrote:
okay i've posted something before here are my scripts either you tell me
what i do wrong or i'll go beserk
you can check the outcome of the code
It looks like you've got a closing curly bracket } for your switch
statement, but not for your while statement.
Also, have you read up on the switch statement? Keep in mind that if
something matches your case 1, it will also fall through and execute
case 2, case 3, etc... unless you include
On mine it's in /usr/local/lib, but I seem to recall discussion earlier
about some OSX installations lacking the ini file.
-Steve
On Tuesday, March 26, 2002, at 04:53 PM, Chuck PUP Payne wrote:
Can some one please tell me where php.ini is located on Mac OS X?
Thanks,
Chuck Payne
Magi
It looks like your sql query failed, so the result is invalid.
Assuming that this is really the whole script, then you're counting on
the mysql_db_query function to open a connection to the database db
using the default connection values which (according to the manual) are
host: localhost,
On Wednesday, March 6, 2002, at 12:13 PM, Kris Vose wrote:
I have a problem with reading the contents of $r[1] into a string
called = $mail. Does anyone have any suggestions? Any help is greatly
appreciated.
Kris Vose
if ($czero != )
{
$t = mysql_query(SELECT * FROM
If you're running a perl script on the command line you would use
/path/to/perl/script.pl value1 value2 value3 ...
In your perl script $ARGV[1] should hold value1, $ARGV[2] should hold
value2, etc.
-Steve
On Wednesday, March 6, 2002, at 02:48 PM, [EMAIL PROTECTED] wrote:
I need to pass a
however it prints the varforPHP to the broswer, I need it saved it var
Any (more) help would be great!!
Michael
On
Wed, 6
Mar 2002, Steve Cayford wrote:
If you're running a perl script on the command line you would use
/path/to/perl/script.pl value1 value2 value3 ...
In your perl script
You could wrap your function calls, maybe. Like
function my_Draw_Image() {
if(function_exists('Draw_Image')) {
return Draw_Image(func_get_args());
} else {
// do whatever...
}
}
Haven't tested this at all, but it seems plausible. Might be
On Thursday, January 17, 2002, at 10:11 AM, Mike Krisher wrote:
I can not wrap my head around variable variables today, not awake yet or
something.
For instance I trying something like this:
while ($i$loopcounter) {
$temp = size;
$valueofsize = $$temp$i;
try $valueofsize =
On Tuesday, January 8, 2002, at 09:37 AM, Dean Ouellette wrote:
Hi I am learning php with Sams leanr php in 24 hours.
This is one example
?php
function addNums($firstnum, $secondnum)
{
$result = $firstnum + $secondnum;
return $result;11:
Well, I'll chime in as well. I'd recommend doing all your calculations
in timestamps in seconds, then convert the results into days, dates, or
whatever. If you only have a date to start with then convert to a
timestamp, do the calculation, and convert back. You could wrap it in a
function
Two other lines to look for in your php.ini file:
display_errors = On
log_errors = Off
If display_errors is on the error will be displayed on the web page, if
log_errors is on the error will be logged--assuming you're using Linux
check /var/log/messages, but you can change this with the
You can do as Jim says here or go back and read the manual section again
for eregi and ereg. What you're trying to do should be written more like
this:
?php
$str = 'body bgcolor=#ff';
$numMatches = eregi('(body)(.*)()',$str,$results);
print(numMatches: $numMatches br\n);
print(body
I don't know all the details about how PHP compiles a program, but
having your function definitions in an if-else statement that may not be
executed looks suspicious to me.
You've got
if(!$Phone)
{
do something
}
else
{
function is_phone() { ...blah, blah...}
}
is_phone($Phone);
If
Hi. Is there a way to find the class name of a method when called in the
class::method() format? If called on an object (eg. object-method()) I
could just ask for get_class($this), but when called as class::method(),
$this should not be defined. Anyway around this?
Thanks.
-Steve
--
PHP
On Monday, December 10, 2001, at 09:35 PM, phantom wrote:
What would be an easy what to format a date value into month day year??
I want to specially display a date stored in mysql in date format
-MM-DD
The manual says: string date (string format, int [timestamp])
I tried
Here's one way to do it by converting dates into timestamps.
?php
$date1 = mktime(0,0,0,10,1,2001); // in the form (hours, minutes,
seconds, month, day, year)
$date2 = mktime(0,0,0,10,1,2000);
$timedif = $date1 - $date2;
print(strftime(date 1 is %b %d, %Y, $date1) . br\n);
print(strftime(date
This is what I used to do what you're trying:
header(Content-Type: image/ . $imagetype); // $imagetype is jpeg or gif
header(Content-Length: . strlen($image));
echo $image;
Note that Type is capitalized in Content-Type, and include the
Content-Length as well.
-Steve
On Thursday, December
.
Thanks.
-Steve
Good luck Steve,
Tyler Longren
- Original Message -
From: Martin Towell [EMAIL PROTECTED]
To: 'Steve Cayford' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, December 03, 2001 6:04 PM
Subject: RE: [PHP] Why are slashes automatically stripped from db
result
On Tuesday, December 4, 2001, at 02:22 AM, George Pitcher wrote:
Hi all,
I'm a PHP newbie, my main scipring being done in Blueworld's Lasso.
I have used php fro time to time with Lasso to do some file handling.
My question is: 'Can I run a file from a PHP script?'
The file in question
On Tuesday, December 4, 2001, at 06:04 AM, Xavier Antoviaque wrote:
Hello all,
I have a problem with a php script, which I want to use to fetch two
data
(integer) from a MySQL table, divide the first by the second, and store
the
value resulting in an double array. That seems not very
is running and if it
isn't
then I want to 'run' it. Platform is NT, server is IIS4
George
- Original Message -
From: Steve Cayford [EMAIL PROTECTED]
To: George Pitcher [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 3:39 PM
Subject: Re: [PHP] 'Running
Hey all. I'm storing some jpeg images in a mysql database using the PEAR
classes. Before inserting the image into the db I call addslashes() on
the data, I was, accordingly, calling stripslashes() on the data after
pulling the image back out of the database, but the image was getting
mangled.
You don't need to put in the final semi-colon when running a query from
php. Take that out and you should be fine.
-Steve
On Monday, November 19, 2001, at 04:58 PM, Olav Drageset wrote:
Hi
$sql = SELECT user FROM persons WHERE user = '$firstName' and domain =
'$domainName' ; ;
$result
You can roll your own fairly easily:
function mycmp($a,$b) {
return strcmp($a[1],$b[1]);
}
usort($array, 'mycmp');
...something like that at any rate.
-Steve
On Thursday, November 15, 2001, at 10:07 AM, Richard S. Crawford wrote:
Of the type...
$array[0][0] = !row of c's;
Sure sounds like you're hitting this function twice by accident. Are you
sure you're only calling it once? That would explain why you only get
one output with the die(), but two without it.
-Steve
On Wednesday, November 14, 2001, at 10:34 AM, Christian Dechery wrote:
I don't know what it
Don't know offhand what the problem is, but a couple thoughts:
1. Why are you using session_name(mysession) instead of
session_name('mysession')?
2. Assuming you have register_globals on, you're trying to pass $count
both as a session variable and a post variable. One of these is going to
On Tuesday, October 30, 2001, at 11:41 AM, Henrik Hansen wrote:
[EMAIL PROTECTED] (Alberto) wrote:
Ok, it works fine for me, i can redirection, but I don't want the
browser to
load another page, I want to IF A THEN RUN A.PHP, IF B THEN RUN
B.PHP, I
know i can use include('a.php') or
Well, it's probably me that's confused. I have an authenticate()
function which should start a session and if the user is not logged in
then show the login screen otherwise return after storing and
registering a user object in a session variable. This object has
accessor methods to get the
was doing wrong.
Thanks for any suggestions.
-Steve
On Thursday, October 25, 2001, at 12:07 PM, Steve Cayford wrote:
Well, it's probably me that's confused. I have an authenticate()
function which should start a session and if the user is not logged in
then show the login screen otherwise return
On Thursday, October 25, 2001, at 02:08 PM, Martín Marqués wrote:
On Jue 25 Oct 2001 15:36, you wrote:
Hello php-general,
I have such code:
class A
{
var $xxx;
function print()
{
echo $xxx;
$xxx is internal to the print function.
I think you want UNIQUE.
create table sometable (
somecolumn char(40),
someothercolum int,
unique somecolumn
)
...something like that. I haven't messed with it much.
-Steve
On Thursday, October 25, 2001, at 04:31 PM, Jeff Gannaway wrote:
Does anyone know how to set
So both include() and require() *are* subject to conditional statements
in the code? Guess I missed that.
Thanks.
-Steve
On Tuesday, October 23, 2001, at 01:00 AM, Rasmus Lerdorf wrote:
That's outdated. The only difference today is that if a file can't be
included/required for some
http://www.php.net/manual/en/function.require.php
require() pulls in the target file when the source file is
parsed/compiled, include() pulls in the target file when the source file
is executed. So an include() nested in an if statement will only be
included if the if statement evaluates to
Where is the closing brace for your while loop?
-Steve
On Monday, October 1, 2001, at 07:04 AM, Tom Churm wrote:
hi,
my problem is this: i'm using a while loop to check elements in an
Array for valid email syntax. if $User[0] is a valid email address but
$User[1] is not, the code for
On Wednesday, September 26, 2001, at 02:48 AM, [EMAIL PROTECTED]
wrote:
Steve Cayford [EMAIL PROTECTED] on 25/09/2001 17:28:57
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Getting my head around nulls
On Tuesday, September 25, 2001
Just looking up that extract function, the manual says it extracts into
the current symbol table. I assume that means that within foo() the
array would be extracted into local variables. Is that right?
-Steve
On Wednesday, September 26, 2001, at 06:50 AM, Alister wrote:
Follow up to my own
Also look for missing semicolons and unclosed braces in the lines above
22.
-Steve
On Wednesday, September 26, 2001, at 09:19 AM, Derek Mailer wrote:
oops...I was going to add...
2) -
$result = mysql_query($query, $mysql_link);
doesn't require the $mysql_link argument, try
$result =
Maybe this? A bit verbose, but functional.
-Steve
?php
function foo($p)
{
if (empty($p['fred'])){
$p['fred'] = 'hello';
}
if (empty($p['banana'])){
$p['banana'] = 'world';
}
echo $p['fred'] . $p['banana'];
}
foo(array('fred' = 'hello', 'banana' = 'world'));
?
On
On Tuesday, September 25, 2001, at 10:30 AM, [EMAIL PROTECTED]
wrote:
Thanks for correcting my misspelling, Andrey, IS NULL not IS_NULL.
Another thing to look at, Ben, is IFNULL(). I would give you an
example,
but
I never got it to work like I thought it should ;) I think it is
Is there any way in PHP 4.0.6 to query an object for its member
functions? For example I have a couple classes that have an htmlString()
function to display themselves in some special way as html. I'd like to
go through a list of various objects, find out if each can run
htmlString() and if
Thanks. Sorry for missing that.
-Steve
On Monday, September 24, 2001, at 05:54 PM, Rasmus Lerdorf wrote:
http://www.php.net/manual/en/function.get-class-methods.php
On Mon, 24 Sep 2001, Steve Cayford wrote:
Is there any way in PHP 4.0.6 to query an object for its member
functions
55 matches
Mail list logo