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 "
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
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
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 unsubs
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 th
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 i
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
Or try the usort() function?
-Steve
On Friday, April 12, 2002, at 12:26 PM, Kevin Stone wrote:
> This is a terribly inneficient way of handling your situation but I
> believe
> it would work.
>
> // First we're going to make a list of all company values
> for($i=0; $i {
> $company_value
Keep in mind that there is no common memory space for all the users.
Each request is being handled by a different process with its own memory
space that's forked off of the original web server. (Assuming apache, I
don't know how IIS works).
-Steve
On Thursday, April 11, 2002, at 01:52 PM, [
Doh, typo:
// this next line would generate a parse error
// print("c:a1: " . $c->echo($a)->method1() . "\n");
should read
// this next line would generate a parse error
// print("c:a1: " . $c->echoMethod($a)->method1() . "\n");
On Thursd
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 operation
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.
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
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 Wedn
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 co
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
>
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, u
CGI")
> and in the CGI script I do a print $varforPHP
>
> 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
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 v
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
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 $va
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 p
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
>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 like
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:
';
$numMatches = eregi('()',$str,$results);
print("numMatches: $numMatches \n");
print("body contents: $results[2] \n");
print("all results: ")
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
error
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
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 $For
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 G
Here's one way to do it by converting dates into timestamps.
\n");
print(strftime("date 2 is %b %d, %Y", $date2) . "\n");
print("the difference in seconds is " . $timedif . "\n");
print("the difference in days is " . ($timedif / (60 * 60 * 24)) .
"\n");
?>
-Steve
On Friday, December 7, 2001, a
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, D
> Basically I want to be able to test that the db 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: &quo
On Tuesday, December 4, 2001, at 09:16 AM, Brian V Bonini wrote:
> I still can't get this to do what I want:
> $bikes = array(
> "Road" => array(
> "Trek" => array(
> "Trek 5200" => "road.php?brand=t5200"
> ),
> "LeMond" => arra
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 n
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
ng at first, though.
Thanks.
-Steve
>
> Good luck Steve,
> Tyler Longren
>
> - Original Message -
> From: "Martin Towell" <[EMAIL PROTECTED]>
> To: "'Steve Cayford'" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent:
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' ; ";
> $r
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 i
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
get
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
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
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
to figure out what I 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 i
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 log
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 reas
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 tr
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 f
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
>
> $
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
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]
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
Maybe this? A bit verbose, but functional.
-Steve
'hello', 'banana' => 'world'));
?>
On Tuesday, September 25, 2001, at 06:25 AM, Andrey Hristov wrote:
> Yeap, I know that. I thought about this bit of hack but this breaks the
> conception on giving parameters. Also this trick cannot
> solv
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 obj
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 so
57 matches
Mail list logo