[PHP] MySQL Current Row??

2002-09-18 Thread Beeman

What function/array index should I use to determine the current row of a
MySQL query when outputting using a do..while.. Loop?



[PHP] Form Variables

2002-06-07 Thread Beeman

I recently installed PHP 4.2.1 on my G4 Powerbook (OS X v10.1.4) running
Apache 1.3.2. I have verified that php is running and apache is running.
When I access a page locally http://127.0.0.1/simple_form.php, fill in the
only text box and submit the form to form_act.php. The variable doesn't
exist (as far as PHP is concerned. I have tested for its existance using an
IF ELSE). This happens with POST as well as GET, but when using GET I can
obviously see the variable name and value in the URL. Do I need to change
the default config for apache?? Or PHP? Can anyone please help before I go
completely crazy.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Form Variables

2002-06-07 Thread Beeman

I just read the release notes and do not believe they are referring to my
dilemma.

Here is the code I am using. Just a basic form

<>


  Phrase: 

  
  




<>



On 6/7/02 9:08 PM, "Stuart Dallas" <[EMAIL PROTECTED]> wrote:

> On Saturday, June 8, 2002 at 1:56:35 AM, you wrote:
> 
>> I recently installed PHP 4.2.1 on my G4 Powerbook (OS X v10.1.4) running
>> Apache 1.3.2. I have verified that php is running and apache is running.
>> When I access a page locally http://127.0.0.1/simple_form.php, fill in the
>> only text box and submit the form to form_act.php. The variable doesn't
>> exist (as far as PHP is concerned. I have tested for its existance using an
>> IF ELSE). This happens with POST as well as GET, but when using GET I can
>> obviously see the variable name and value in the URL. Do I need to change
>> the default config for apache?? Or PHP? Can anyone please help before I go
>> completely crazy.
> 
> Are you using $_GET['varname']/$_POST['varname'] or just $varname? If you are
> trying to use the latter, I suggest you read the release note for the software
> you just installed: http://www.php.net/release_4_2_1.php (specifically the
> 'External Variables' section).


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Form Variables

2002-06-07 Thread Beeman

You are correct. My web server is Running 4.2.1 and all of the sites are
still working.. That is why I assumed that it was a problem locally, but
after looking at the web server the globals is turned on. Thanks.. I can go
forward now. I appreciate your help


On 6/7/02 9:33 PM, "Philip Olson" <[EMAIL PROTECTED]> wrote:

> Actually, they are.  You are assuming the PHP directive
> register_globals = on when using $phrase from the form
> below.  register_globals = on is what creates $phrase.
> 
> As of PHP 4.2.0 the default value for register_globals
> has become off.  Regardless, there are other options:
> 
> Try either:
> 
> // Worked since PHP 3 (forever)
> print $HTTP_GET_VARS['phrase'];
> 
> // Worked since PHP 4.1.0
> print $_GET['phrase'];
> print $_REQUEST['phrase'];
> 
> // Worked since PHP 4.1.0 too
> // See docs for details (see also extract())
> import_request_variables('gpc', 'r_');
> print $r_phrase;
> 
> Those are some options.  See also:
> 
> http://www.php.net/manual/en/language.variables.predefined.php
> 
> Regards,
> Philip Olson
> 
> 
> On Fri, 7 Jun 2002, Beeman wrote:
> 
>> I just read the release notes and do not believe they are referring to my
>> dilemma.
>> 
>> Here is the code I am using. Just a basic form
>> 
>> <>
>> 
>> 
>>   Phrase: 
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> <>
>> > if ($phrase){ echo "Phrase-- $phrase";}
>> Else{ echo "No Variables";}
>> ?>
>> 
>> 
>> On 6/7/02 9:08 PM, "Stuart Dallas" <[EMAIL PROTECTED]> wrote:
>> 
>>> On Saturday, June 8, 2002 at 1:56:35 AM, you wrote:
>>> 
>>>> I recently installed PHP 4.2.1 on my G4 Powerbook (OS X v10.1.4) running
>>>> Apache 1.3.2. I have verified that php is running and apache is running.
>>>> When I access a page locally http://127.0.0.1/simple_form.php, fill in the
>>>> only text box and submit the form to form_act.php. The variable doesn't
>>>> exist (as far as PHP is concerned. I have tested for its existance using an
>>>> IF ELSE). This happens with POST as well as GET, but when using GET I can
>>>> obviously see the variable name and value in the URL. Do I need to change
>>>> the default config for apache?? Or PHP? Can anyone please help before I go
>>>> completely crazy.
>>> 
>>> Are you using $_GET['varname']/$_POST['varname'] or just $varname? If you
>>> are
>>> trying to use the latter, I suggest you read the release note for the
>>> software
>>> you just installed: http://www.php.net/release_4_2_1.php (specifically the
>>> 'External Variables' section).
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Frames JavaScript and PHP

2002-07-02 Thread Beeman

I am trying to get the value of a frames path into a PHP variable. Is it
possible to access DOM values from PHP?? If not how do I set a PHP variable
to the value of the window.frame.path that I get in javascript?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Cobalt RAQ4 apache config index.php

2002-01-29 Thread Beeman

I am using a Cobalt RAQ4 server and need to edit my config file to allow
index.php as the directory index. the config file appears non standard, ad
it has the pearl for the web based server administration.. What and where do
I need to add the DirectoryIndex? also how do I disable the directory
listing.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Cobalt RAQ4 apache config index.php

2002-01-29 Thread Beeman

The config file currently doesn't have any occurance of DirectoryIndex, can
I just add it within the virtual host for the site that I want to modify. it
currently will default to index.html or index.htm and then the directory
listing if neither index is found. Is the DIrectoryIndex param similiar to
IIS where you can enter multiple values, and it searches for the index in
the order they are in the list??
"Mike Frazer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> RaQ4 systems still use what is *basically* a standard config (the only
real
> difference is some really stupid Perl code for SSL that can screw the
whole
> system up).  I don't recall where in the Web-based admin area you change
> these values, but the httpd.conf still has the DirectoryIndex line.  Just
> open it in a text editor and do a search for DirectoryIndex.
>
> NOTE: Remember that changing these files manually will void your Cobalt
> warranty!
>
> Mike Frazer
>
>
> "Beeman" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I am using a Cobalt RAQ4 server and need to edit my config file to allow
> > index.php as the directory index. the config file appears non standard,
ad
> > it has the pearl for the web based server administration.. What and
where
> do
> > I need to add the DirectoryIndex? also how do I disable the directory
> > listing.
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] DATE FORMAT ISSUES

2001-10-22 Thread Beeman

I have inserted the date into MySQL using now() in the query. However, when
I retrieve the using MySQL_Date_Format in the query the time is always
wrong. on the other hand, if I format the date using Date() in PHP it always
makes the date DEC 31 1969 at 700PM. Please Help



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: DATE FORMAT ISSUES

2001-10-22 Thread Beeman

No it is definitely a DATETIME and the date and time are correct in the
database, but when I try to format and display them the date is correct but
the time is not
"_lallous" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> maybe you have in your database a DATE field instead of DATETIME field?
>
> "Beeman" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I have inserted the date into MySQL using now() in the query. However,
> when
> > I retrieve the using MySQL_Date_Format in the query the time is always
> > wrong. on the other hand, if I format the date using Date() in PHP it
> always
> > makes the date DEC 31 1969 at 700PM. Please Help
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: DATE FORMAT ISSUES

2001-10-22 Thread Beeman

Yeah, I select it using UNIX_TIMESTAMP(creation_datetime) and then I am
using date("M d, Y g:ia",$myrow["creation_datetime"]) at the end of a printf
statement but the date comes back as Dec 31 1969 7:00pm for all entries.
When the date was inserted I used now() in the insert statement.
"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Are you retrieving it using MySQL's UNIX_TIMESTAMP() function?  PHP's
> date() function needs a unix timestamp to work with.
>
> -Rasmus
>
> On Mon, 22 Oct 2001, Beeman wrote:
>
> > No it is definitely a DATETIME and the date and time are correct in the
> > database, but when I try to format and display them the date is correct
but
> > the time is not
> > "_lallous" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > maybe you have in your database a DATE field instead of DATETIME
field?
> > >
> > > "Beeman" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > I have inserted the date into MySQL using now() in the query.
However,
> > > when
> > > > I retrieve the using MySQL_Date_Format in the query the time is
always
> > > > wrong. on the other hand, if I format the date using Date() in PHP
it
> > > always
> > > > makes the date DEC 31 1969 at 700PM. Please Help
> > > >
> > > >
> > >
> > >
> >
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: DATE FORMAT ISSUES

2001-10-22 Thread Beeman

That worked. Thanks a lot... You rock
-Beeman
"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Yeah, I select it using UNIX_TIMESTAMP(creation_datetime) and then I am
> > using date("M d, Y g:ia",$myrow["creation_datetime"]) at the end of a
printf
> > statement but the date comes back as Dec 31 1969 7:00pm for all entries.
> > When the date was inserted I used now() in the insert statement.
>
> You should be doing:
>
>   select UNIX_TIMESTAMP(creation_datetime) as foo
>
>   date("M d, Y g:ia",$myrow['foo'])
>
> -Rasmus
>
> > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Are you retrieving it using MySQL's UNIX_TIMESTAMP() function?  PHP's
> > > date() function needs a unix timestamp to work with.
> > >
> > > -Rasmus
> > >
> > > On Mon, 22 Oct 2001, Beeman wrote:
> > >
> > > > No it is definitely a DATETIME and the date and time are correct in
the
> > > > database, but when I try to format and display them the date is
correct
> > but
> > > > the time is not
> > > > "_lallous" <[EMAIL PROTECTED]> wrote in message
> > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > maybe you have in your database a DATE field instead of DATETIME
> > field?
> > > > >
> > > > > "Beeman" <[EMAIL PROTECTED]> wrote in message
> > > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > > I have inserted the date into MySQL using now() in the query.
> > However,
> > > > > when
> > > > > > I retrieve the using MySQL_Date_Format in the query the time is
> > always
> > > > > > wrong. on the other hand, if I format the date using Date() in
PHP
> > it
> > > > > always
> > > > > > makes the date DEC 31 1969 at 700PM. Please Help
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Update Query - Urgent

2001-10-23 Thread Beeman

Does the form you are using to update use checkboxes??
what kind of values are being passed?
"Mak" <[EMAIL PROTECTED]> wrote in message
008001c15bc8$3c73e6a0$7e8f9cca@athlon700delta">news:008001c15bc8$3c73e6a0$7e8f9cca@athlon700delta...
> What does the error message say? What sort of error is it?
> - ycmak
>
> - Original Message -
> From: "Mark Roedel" <[EMAIL PROTECTED]>
> To: "Srinivasan Ranganathan" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, October 23, 2001 9:35 PM
> Subject: RE: [PHP] Update Query - Urgent
>
>
> > -Original Message-
> > From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 23, 2001 7:22 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Update Query - Urgent
> >
> >
> > I have a php script generate a sql update statement.
> > when i query the database, the update doesn't happen.
> > but when i echo the sql string and copy and paste it
> > in my mysql client window, the update happens like it
> > should!
>
> After the update fails, does an 'echo mysql_error()' tell you anything
> useful?
>
>
> ---
> Mark Roedel   | "Blessed is he who has learned to laugh
> Systems Programmer|  at himself, for he shall never cease
> LeTourneau University |  to be entertained."
> Longview, Texas, USA  |  -- John Powell
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]