[PHP] php in html-- what gives?

2001-07-24 Thread CGI GUY

I'm trying to test the following:

I have created a simple cookie script:



I have placed it in an html page, at the very top (no
spaces, lines, etc.), and have left no lines/spaces
between the '?>' and '' tags. Yet the script
does not execute (nor does it return an error of any
kind). What gives?!?! 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




[PHP] html form question

2001-07-25 Thread CGI GUY

What's the method for populating any number of html
form ... tags with query results?
I've seen lots of php-embedded examples for CHECKBOX,
RADIO and even SELECT, but I can't seem to figure out
how to create a simple drop-down menu. HELP!!! 

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




[PHP] dumb mysql_connect issue

2001-07-31 Thread CGI GUY

Is there anything (add. parameters, etc.) that I'm
missing that would possibly explain why the following
code won't execute?



Thanks in advance. This mailing list rules!!!


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




Fwd: Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread CGI GUY

Okay, well I used the mysql_error() print-out, and it
returned something weird:

" Access denied for user: 'username@hostname' to
database 'tablename' "

This is incongruous because:

1. The uid/password set I am using has full
privileges.
2. *tablename* is not a database (the code I listed in
my previous email is syntactically identical to the
script)-- it's a table.

Why is this happening to me?!?! ;)

Note: forwarded message attached.


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


or, echo $sql and copy/paste it into an sql client and see what it tells
you.

on 7/31/01 4:21 PM, Philip Olson at [EMAIL PROTECTED] wrote:

> Try putting mysql_error() in your die statements so :
> 
> or die(mysql_error());
> 
> and see what it tells you.
> 
> Regards,
> Philip
> 
> 
> On Tue, 31 Jul 2001, CGI GUY wrote:
> 
>> Is there anything (add. parameters, etc.) that I'm
>> missing that would possibly explain why the following
>> code won't execute?
>> 

 -- mike cullerton



-- 
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 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] subroutines?

2001-08-07 Thread CGI GUY

How does PHP compensate for an apparent lack of
traditional subroutines (as with Perl, etc.)? It seems
like I'm going to have to script separate pages for
ea. set of processes in my search (i.e., print FORM,
print results for SEARCH,
print DETAILS, etc.).  Please tell me I'm mistaken!

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




Re: [PHP] Virtual Servers (apache) and php

2001-08-14 Thread CGI GUY

Wouldn't it be just to add, say,

AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps

or approximation within the 
tags?

I think (fingers crossed here) that should do it...
--- Jay Paulson <[EMAIL PROTECTED]> wrote:
> Hello-
> 
> I'm using the virutal hosting in Apache 1.3.19 and I
> was wondering how to I
> load php as a module in apache for each virutal web
> site?  anyone have a
> good link telling you how to do this.. ie a tutorial
> on the topic?  i've
> read the docs on apache.org and it doesn't really
> say much at all about
> this.. because one of the problems i'm having is
> that i get a "Forbidden
> 403" error because it's says that i don't have
> permission to access
> /phpinfo.php on the virtual server i just set up..
> 
> any thoughts?
> 
> thanks,
> jay
> 
> 
> -- 
> 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!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




Re: [PHP] Re: inserting a remote html file

2001-08-14 Thread CGI GUY

As long as you have sendmail configured on your
server, and you're working with a standard php
install, it should be working properly.

mail() needs to see things happen in this fashion and
order:

mail("[EMAIL PROTECTED]", "subject", "body", "headers")

The headers are optional, and you can concatenate as
needed.  None of the email addresses need to be on the
domain local to the server.

Not sure about this html mail mime class thing you're
talking about, and would have to know what the server
error message was to get a better idea of what's going
on with the script...
--- Boaz Amit <[EMAIL PROTECTED]> wrote:
> 
> <[EMAIL PROTECTED]> wrote:
> >hi all,
> 
> >I cant seem to get my mail function to work. OK so
> i am a noob, that might
> >have something to do with it.  I am using a script
> I found called the HTML
> >Mime Mail Class, which does everything i need
> except actually send the mail.
> >I am guessing that there is some config problems,
> but i am not sure.  Even
> >when i try and use the mail() function i get a
> server error.  So i guess
> >that my problem is that my return address is messed
> up.  Does it have to  be
> >my own domain, or the domain that the server is
> running on?  Can i set the
> >return address as a hotmail account, or do i need
> my own server mail
> >program?  And is there anything that i need to
> config in the php.ini file?
> >
> >Thanks for helping,
> >
> >T P K Cannell
> 
> This article by the most helpful Julie Meloni
> answers your question:
>
http://www.zdnet.com/devhead/stories/articles/0,4413,2802264,00.html
> 
> 
> ---
>  Regards,
>   Boaz Amit
> 
> -- 
> 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!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




[PHP] looong date formatting for MySQL

2001-08-17 Thread CGI GUY

There's gotta be an easier way to get create a date
properly formatted for MySQL's standard -MM-DD
DATE field format.  Any suggestions,
smacks-upside-the-head, etc. on how to reduce this
would be greatly appreciated.

Here's my code:



It works, but sheesh...

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




Re: [PHP] looong date formatting for MySQL

2001-08-17 Thread CGI GUY

Thanks for the reply, however, that function call
doesn't zero-substitute (i.e., "07" for "7", "03" for
"3", etc.); that's why I've added this:

if ($month < 10) {
$month = "0";
$month .= $today['mon'];
}

By default, MySQL only accepts dates as -MM-DD;
PHP's getdate(Y-m-d) prints out -M-DD or
-MM-DD IF AND ONLY IF the month is two-digit.


--- Adam Rambousek <[EMAIL PROTECTED]> wrote:
> date("Y-m-d") should do the job
> 
> > There's gotta be an easier way to get create a
> date
> > properly formatted for MySQL's standard -MM-DD
> > DATE field format.  Any suggestions,
> > smacks-upside-the-head, etc. on how to reduce this
> > would be greatly appreciated.
> 
> 
> 
> -- 
> Adam Rambousek
> email: [EMAIL PROTECTED] ICQ: 47596279
> Jabber: [EMAIL PROTECTED]
> www: http://adamovy.cestiny.cz   
> http://hemzeni.poda.cz/matrix
> * I'll save you from yourself, From those demons of
> the night
>   They promise fame and fortune, All that you
> eagerly desire.  - Era
> 
> 
> -- 
> 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!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




[PHP] array_unique() and count issue

2001-08-18 Thread CGI GUY

OK, I want to count the number of unique elements in
an array, then print the total.  However, both methods
I've tried return "1"; the man pages explain that  the
count() function will return 1 if the var is set but
not an array. But if you look at the 2nd method esp.,
I've set an if-else !is_set() alert which doesn't
appear... Either way, it's a 1.  Help!

Method 1:



Method 2:

 $value)  {
$count[$key] = $value++; 
}

print($value);


} 
?>

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]




[PHP] option tags and WHILE

2001-08-19 Thread CGI GUY

What's wrong with this code?  I keep getting a parse
error at the form/select lines...

$array = mysql_fetch_array($mysql_result) or die("no
go");

print ("");
print ("");
while ($array[1] => $array[0]) {
print ("$array[1]\n");
}
print ("");
print ("");
?>

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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]