Re: [PHP] Help with mail() function

2004-02-02 Thread Russell Shaw
Pooya Eslami wrote:
Hi, I'm new to php and this newsletter. I have a form on my webpage and a
php file to email it to me but the contents of the text area are not emailed
to me. Can anyone help me with this?
here is the code for my html and php files:

html
headtitleTest/title/head
body
form action=textareamail.php method=POST
Comments: /br
textarea rows=10 cols=50 name=TextArea/textarea
/br
input type=reset value=Clear
input type=submit value=Submit
/form
/body
/html
?php
if ($TextArea=) {
echo You have to fill out the entire form,
go back and try again.;
} else {
$to = [EMAIL PROTECTED];
$from = From-Test;
$subject = Subject-Test;
$message = $TextArea;
$message=$_POST[TextArea];

mail($to, $subject, $message,From: $from);
echo Thankyou;
}
?
A better way (imo) is to do it as javascript and pop up a
window with the message. No server-side processing is then
needed until a successful message is submitted.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Nested PHP

2004-02-01 Thread Russell Shaw
Hi,
I have php code embedded in html, that is read by apache.
Is nested php code allowable such as:

?
  $phpcode=? echo \ some html \ ?;
?
...
html
...
  body
? echo $phpcode ?
  /body
/html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Nested PHP

2004-02-01 Thread Russell Shaw
Robby Russell wrote:
Russell Shaw wrote:

Hi,
I have php code embedded in html, that is read by apache.
Is nested php code allowable such as:

?
  $phpcode=? echo \ some html \ ?;
?
...
html
...
  body
? echo $phpcode ?
  /body
/html
Not sure what you're trying to do there.
I am generating dozens of rows of a table with entries from
a database. Each row has an option selector that has dozens
of choices, derived from another database. So, the first php
pass generates the table, then the second pass generates the
choices list in each row.
You can do this:

?php
  $phpcode = bhello world!/b\n;
?
html
  body
?php echo $phpcode; ?
  /body
/html
I have done that a lot.

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


Re: [PHP] stristr

2004-02-01 Thread Russell Shaw
Liam wrote:
I've been trying to make this error logger for hours now,

I get my webserver to forward all errors to error.php?message=404 etc.. 

The source can be found here
http://the-bronze.me.uk/ID/error.txt
Now Im at my wits end, I want all errors that come internaly eg from the-bronze.me.uk to be put into onserver.txt and all other ones to be put into 404.txt 

Unfortuantly I seem to be a little lost and confusded, can anyone see where im going wrong as far as my stristr(); usage is and if so what is the problem?
One useful diagnostic method is:

  $match = stristr($_SERVER['HTTP_REFERER'],'the-bronze');
  echo $_SERVER['HTTP_REFERER'] br $match;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP, Windows 2000/IIS MySQL

2004-02-01 Thread Russell Shaw
S Gex wrote:
I'm trying to install PHP on my system. I know absolutely nothing about it.
I installed MySQL and PHP, (PHP said that it configured IIS) When I attempt
to write a PHP statement and an HTML statement, the HTML statement runs, but
the PHP does not...Any suggestions?
If you embed the php code into an html file, the file should be renamed
with .php instead of .html so that the web server parses it for php
(unless you set it up to scan .html files too). There's many beginner
books on php/mysql.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Total NewB Q

2004-01-09 Thread Russell Shaw
Hi,
I'm using debian-unstable.
I just installed apache-1.3 and php4.

I don't know where else to ask. I made a php test file (phpinfo.php),
containing: ? phpinfo(); ?, and put it in ~/public_html.
When i try to see it by putting: http://127.0.0.1/phpinfo.php into
mozilla 1.2.1, mozilla changes it to http://211.27.78.162/.
Is this a mozilla config problem or apache problem? I have my dialup isp
nameservers in /etc/resolv.conf.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php