php-windows Digest 4 Nov 2002 06:21:07 -0000 Issue 1422

Topics (messages 16700 through 16714):

Re: Help on \t \r \n
        16700 by: Davy Obdam
        16702 by: Cam Dunstan

Unable to fork ...
        16701 by: Peter

uploading help please again
        16703 by: Marcelo

setup open_basedir with apache and php on a per-virtalhost basis?
        16704 by: Luke
        16710 by: Luke

open_basedir with apache on a per-virtalhost basis?
        16705 by: Luke
        16711 by: Luke

Form submossion with php - not passing variables
        16706 by: Luke

Any special functions need to be loded to accept forms?
        16707 by: Luke
        16708 by: Brad Thomas
        16712 by: Luke
        16713 by: Luke

calling a html file to a different frame
        16709 by: jan behrens

Re: 404 documents
        16714 by: Steve Yates

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi dee

> Can anyone help me on this very simple problem, I'm a newbie, 
> but the problem seems so simple and it's buggering me.
> 
> I have 423 xp version installed.  When trying out how to 
> display any of the escaped characters e.g.
> 
> echo("<p>blah blah..... \n");
> echo("more blahs...");

Use both <br /> and \n in this case. <br /> is a linebreak in HTML and
\n is a linebreak in your code, makes your html code more readable. 
<?php
echo("<p>blah blah..... <br />\n");
echo("more blahs...</p>");
?>

> 
> in an HTML file, with IE6, I get
> 
> blah blah..... more blahs...
> 
> why? -- shall I just forget it and use <br />?
>

If you want your code to be more readable instead of all the html codes
on one really big line, use dont forget \n 

:-)

Best regards,
 
Davy Obdam
mailto:info@;davyobdam.com


--- End Message ---
--- Begin Message ---
dee,

Use the string function nl2br($myblahstring)

This converts ordinary linebreaks (newline chars) to html <br> tags on the
fly when displaying text out of a database for instance.
In your example though with straight echos you have to expicitly echo <br>
at end of each blah echo, no matter what browser is used.

CD




----- Original Message -----
From: "dee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 12:18 PM
Subject: [PHP-WIN] Help on \t \r \n


> Can anyone help me on this very simple problem, I'm a newbie, but the
> problem seems so simple and it's buggering me.
>
> I have 423 xp version installed.  When trying out how to display any of
the
> escaped characters e.g.
>
> echo("<p>blah blah..... \n");
> echo("more blahs...");
>
> in an HTML file, with IE6, I get
>
> blah blah..... more blahs...
>
> why? -- shall I just forget it and use <br />?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi!

I use PHP 4.2.3 on Windows XP and IIS 5.1.
It works fine, but when I try to execute ImageMagick I get the following
message:
Warning: Unable to fork [C:\PHP\ImageMagick\convert ...]

You can find a lot of Sites if you search the Internet, but I couldn't find
a solution or a workaround up to now.

Has anyone an idea, how I can get rid of this problem?

Thanks.
Peter


--- End Message ---
--- Begin Message ---
Ok I'm back

This script is to upload 2 image files

Whit register_globals = on it Works fine



script A

"p.php"

<title>Jornal O Leme</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#006699">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="100%" height="70" valign="top"><img src="test.jpg"
width="600" height="120">
    </td>
  </tr>
  <tr>
    <td height="262" valign="top"><p>&nbsp;</p>
      <form method="post"  action="pi.php"  enctype="multipart/form-data">
        <table width="75%" border="0" align="center" bgcolor="#FFFFFF">
          <tr>
            <td width="23%"><div align="center"><font face="BankGothic Md
BT">
                </font></div></td>
            <td width="77%" bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td><div align="left"><strong>Imagem pequena</strong></div></td>
            <td bgcolor="#FFFFFF"> <input type=hidden name=MAX_FILE_SIZE
value=102400>
              <input type="File" name="origem"> </td>
          </tr>
          <tr>
            <td><div align="left"><strong>Imagem grande</strong></div></td>
            <td bgcolor="#FFFFFF"><input type=hidden name=MAX_FILE_SIZE
value=102400>
              <input type="File" name="origem2"> </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        <p align="center">
          <input name="submit" type="submit" value="Adicionar">
    <input type="hidden" name="page" value="inserir1">
      </form></p>
      </td>
  </tr>
  <tr>
    <td height="81" valign="top"><div align="center">
        <p>&nbsp;</p>
        <p>
  <?php

  include ('menu.php');

  ?>
  &nbsp;</p>
      </div></td>
  </tr>
</table>




----------------------------------------------------------------------------
------------------------

"pi.php"



echo $page;      ---> returns inserir1   _correct
echo $origem;   ---> returns the temp path of the file _correct
set_time_limit(60);
$path=(dirname($PATH_TRANSLATED))."/primeirapagina/";
$origem_name="fdx.jpg";
$dest= $path.$origem_name;

if (($origem <> "none") && ($origem <> "")){
   if (copy($origem,$dest)){;

     } else {
      echo "directoria sem direitos de escrita <br>";
      }
unlink ($origem);
}

set_time_limit(60);
$path2=(dirname($PATH_TRANSLATED))."/primeirapagina/";
$origem2_name="porra.jpg";
$dest2= $path2.$origem2_name;
//printf("$path");
//printf("<br>");
//printf("$origem_name");
if (($origem2 <> "none") && ($origem2 <> "")){
   if (copy($origem2,$dest2)){;
//echo "<br>upload do ficheiro $origem_name efectuada com sucesso !!!";
//      echo "<br>tamanho do ficheiro $origem_size";
//      echo " <br>tipo de ficheiro $origem_type";
     } else {
      echo "directoria sem direitos de escrita <br>";
      }
unlink ($origem2);
}
?>


</body>
</html>








but Whit register_globals = off the script B dont work

script B:



"p.php"

<title>Jornal O Leme</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#006699">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="100%" height="70" valign="top"><img src="test.jpg"
width="600" height="120">
    </td>
  </tr>
  <tr>
    <td height="262" valign="top"><p>&nbsp;</p>
      <form method="post"  action="pi.php"  enctype="multipart/form-data">
        <table width="75%" border="0" align="center" bgcolor="#FFFFFF">
          <tr>
            <td width="23%"><div align="center"><font face="BankGothic Md
BT">
                </font></div></td>
            <td width="77%" bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td><div align="left"><strong>Imagem pequena</strong></div></td>
            <td bgcolor="#FFFFFF"> <input type=hidden name=MAX_FILE_SIZE
value=102400>
              <input type="File" name="origem"> </td>
          </tr>
          <tr>
            <td><div align="left"><strong>Imagem grande</strong></div></td>
            <td bgcolor="#FFFFFF"><input type=hidden name=MAX_FILE_SIZE
value=102400>
              <input type="File" name="origem2"> </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td bgcolor="#FFFFFF">&nbsp; </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        <p align="center">
          <input name="submit" type="submit" value="Adicionar">
    <input type="hidden" name="page" value="inserir1">
      </form></p>
      </td>
  </tr>
  <tr>
    <td height="81" valign="top"><div align="center">
        <p>&nbsp;</p>
        <p>
  <?php

  include ('menu.php');

  ?>
  &nbsp;</p>
      </div></td>
  </tr>
</table>




----------------------------------------------------------------------------
------------------------

"pi.php"



 echo $_REQUEST['page']; returns inserir1   _correct


echo $_FILES['origem']; returns ARRAY _error  why ? what i have to do to
return the temp path of the file to ? im lost
 set_time_limit(60);
$path=(dirname($PATH_TRANSLATED))."/primeirapagina/";
$origem_name="fdx.jpg";
$dest= $path.$origem_name;

if (($origem <> "none") && ($origem <> "")){
   if (copy($origem,$dest)){;

     } else {
      echo "directoria sem direitos de escrita <br>";
      }
unlink ($origem);
}

set_time_limit(60);
$path2=(dirname($PATH_TRANSLATED))."/primeirapagina/";
$origem2_name="porra.jpg";
$dest2= $path2.$origem2_name;
//printf("$path");
//printf("<br>");
//printf("$origem_name");
if (($origem2 <> "none") && ($origem2 <> "")){
   if (copy($origem2,$dest2)){;
//echo "<br>upload do ficheiro $origem_name efectuada com sucesso !!!";
//      echo "<br>tamanho do ficheiro $origem_size";
//      echo " <br>tipo de ficheiro $origem_type";
     } else {
      echo "directoria sem direitos de escrita <br>";
      }
unlink ($origem2);
}
?>


</body>
</html>



--- End Message ---
--- Begin Message ---
Does anyone know how to set the open_basedir in Apache 1.3x running on win2k
on a per-virtual host basis?  I've been looking for hours and I haven't
found any information that works :(  PHP is running as several SAPI modules
(maybe this is the problem, but I've read that SAPI is better than the cgi
executable..?)

I have tried configurations like:

<VirtualHost yourdomain.com>
DocumentRoot /www/
ServerName test.yourdomain.com
php_admin_value user_dir "/www/yourdomain.com/"
</VitualHost>

That gives this error when I restart apache :(

C:\>Syntax error on line 96 of C:/apache/config/virtualhosts.conf:
php_admin_value not allowed here

Can anyone help me?

Thanks,


--- End Message ---
--- Begin Message ---
Sorry for so many of the same posts, but this was my first time ever
submitting to a news group, and I kept getting emails saying that I needed
to validate my email address... oops

I finally figured out how to setup the open_basedir in windows! yay :)  For
people who want to know, or for people that would care to add to this, here
is what I found:

<Location />
php_admin_value open_basedir /www/
</Location>

Is that all I should need in each virtual host block, or are there more
settings I should add to make php more secure?

Thanks,

Luke!


"Luke" <[EMAIL PROTECTED]> wrote in message
news:20021104012043.67066.qmail@;pb1.pair.com...
> Does anyone know how to set the open_basedir in Apache 1.3x running on
win2k
> on a per-virtual host basis?  I've been looking for hours and I haven't
> found any information that works :(  PHP is running as several SAPI
modules
> (maybe this is the problem, but I've read that SAPI is better than the cgi
> executable..?)
>
> I have tried configurations like:
>
> <VirtualHost yourdomain.com>
> DocumentRoot /www/
> ServerName test.yourdomain.com
> php_admin_value user_dir "/www/yourdomain.com/"
> </VitualHost>
>
> That gives this error when I restart apache :(
>
> C:\>Syntax error on line 96 of C:/apache/config/virtualhosts.conf:
> php_admin_value not allowed here
>
> Can anyone help me?
>
> Thanks,
>
>


--- End Message ---
--- Begin Message ---
Does anyone know how to set the open_basedir in Apache 1.3x running on win2k
on a per-virtual host basis?  I've been looking for hours and I haven't
found any information that works :(  PHP is running as several SAPI modules
(maybe this is the problem, but I've read that SAPI is better than the cgi
executable..?)

I have tried configurations like:

<VirtualHost yourdomain.com>
DocumentRoot /www/
ServerName test.yourdomain.com
php_admin_value user_dir "/www/yourdomain.com/"
</VitualHost>

That gives this error when I restart apache :(

C:\>Syntax error on line 96 of C:/apache/config/virtualhosts.conf:
php_admin_value not allowed here

Can anyone help me?

Thanks,
Luke!


--- End Message ---
--- Begin Message ---
Sorry for so many of the same posts, but this was my first time ever
submitting to a news group, and I kept getting emails saying that I needed
to validate my email address... oops

I finally figured out how to setup the open_basedir in windows! yay :)  For
people who want to know, or for people that would care to add to this, here
is what I found:

<Location />
php_admin_value open_basedir /www/
</Location>

Is that all I should need in each virtual host block, or are there more
settings I should add to make php more secure?

Thanks,

Luke!

"Luke" <[EMAIL PROTECTED]> wrote in message
news:20021103230908.10040.qmail@;pb1.pair.com...
> Does anyone know how to set the open_basedir in Apache 1.3x running on
win2k
> on a per-virtual host basis?  I've been looking for hours and I haven't
> found any information that works :(  PHP is running as several SAPI
modules
> (maybe this is the problem, but I've read that SAPI is better than the cgi
> executable..?)
>
> I have tried configurations like:
>
> <VirtualHost yourdomain.com>
> DocumentRoot /www/
> ServerName test.yourdomain.com
> php_admin_value user_dir "/www/yourdomain.com/"
> </VitualHost>
>
> That gives this error when I restart apache :(
>
> C:\>Syntax error on line 96 of C:/apache/config/virtualhosts.conf:
> php_admin_value not allowed here
>
> Can anyone help me?
>
> Thanks,
> Luke!
>
>


--- End Message ---
--- Begin Message ---
I am trying to submit a form using php on my apache 1.3 server running win2k
and php4, but I get the error:

Notice: Undefined variable: submitform in C:\www\emailform.php on line 9

The exact same php script works on another server running
linux/apache1.3/php4

Do I need to load any extensions in my php.ini file in order for php to
receive variables defined in an html form? Maybe you have another suggestion
of what the problem might be?

Here is the script:

<HTML>
<HEAD>
<TITLE>Email</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<?php
$youremail = "[EMAIL PROTECTED]";
$subject = "Contact Form";
if($submitform) {
$dcheck = explode(",",$require);
while(list($check) = each($dcheck)) {
if(!$$dcheck[$check]) {
$error .= "Missing $dcheck[$check]<BR>";
}
}
if($error) {
?>
<P>
<CENTER>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#004080"> <TABLE WIDTH="394" BORDER="0"
CELLSPACING="1" CELLPADDING="2">
<TR>
<TD WIDTH="26%" BGCOLOR="#004080"> <P><B><FONT COLOR="#ffffff" SIZE="-1"
FACE="Verdana">Error</FONT></B></TD>
</TR>
<TR>
<TD WIDTH="26%" BGCOLOR="#ffffff"> <FONT COLOR="#000000" SIZE="-1"
FACE="Verdana"><?php echo $error; ?></FONT></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
<?php
exit();
}
if ($YourName) {
$yeshow = "\n\nFrom, $YourName\n";
}
mail($YourEmailAddress,"$subject"," $Message $yeshow ","From: $YourName
<$YourEmailAddress>");
print(" <CENTER>
<b>Thanks!<P>
<a href='javascript:history.go(-1)'>Go Back</a></b>
</CENTER>
</BODY>
</HTML>\n");
exit();
} else {
?>
<FORM ACTION=emailform.php METHOD="POST">
<CENTER>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR> <TD WIDTH="100%" BGCOLOR="#004080"> <TABLE WIDTH="394" BORDER="0"
CELLSPACING="1" CELLPADDING="2">
<TR><TD COLSPAN="2" BGCOLOR="#004080"> <B><FONT COLOR="#ffffff" SIZE="-1"
FACE="Verdana">Contact Form</FONT></B></TD></TR>
<TR> <TD WIDTH="48%" BGCOLOR="#ffffff"> <B><FONT COLOR="#000000" SIZE="-1"
FACE="Verdana">Your Name:</FONT></B></TD>
<TD WIDTH="52%" BGCOLOR="#ffffff"> <INPUT NAME="YourName" TYPE="text"
SIZE="25"></TD></TR>
<TR><TD WIDTH="48%" BGCOLOR="#ffffff"> <B><FONT COLOR="#000000" SIZE="-1"
FACE="Verdana">Your Email:</FONT></B></TD>
<TD WIDTH="52%" BGCOLOR="#ffffff"> <INPUT NAME="YourEmailAddress"
TYPE="text" SIZE="25"></TD></TR>
<TR> <TD COLSPAN="2" BGCOLOR="#ffffff"><B><FONT COLOR="#000000" SIZE="-1"
FACE="Verdana">Message:<BR>
<INPUT TYPE="hidden" NAME="require"
VALUE="YourName,YourEmailAddress,Message">
<TEXTAREA NAME="Message" ROWS="5" COLS="45"></TEXTAREA>
</FONT></B></TD></TR>
</TABLE></TD></TR>
</TABLE>
<INPUT NAME="submitform" TYPE="submit" VALUE="Submit">
</CENTER>
</FORM>
</BODY></HTML>
<?php
exit();
}
?>

Thanks!

Luke :)


--- End Message ---
--- Begin Message ---
I am trying to submit a form on my apache server running win2k and php4
using php, but I get the error:

Notice: Undefined variable: submitform in C:\www\\emailform.php on line 9

The exact same php script works on another server running linux/apache/php4

Does anyone know if I need to load any extensions in my php.ini file in
order for php to receive variables defined in an html form? Or maybe what
else might be the problem?

here are the lines around line 1-20:

<HTML>
<HEAD>
<TITLE>Email</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<?php
$youremail = "[EMAIL PROTECTED]";
$subject = "Contact Form";
if($submitform) {
$dcheck = explode(",",$require);
while(list($check) = each($dcheck)) {
if(!$$dcheck[$check]) {
$error .= "Missing $dcheck[$check]<BR>";
}



Thanks!

Luke :)
}


--- End Message ---
--- Begin Message ---
Hi

"Luke" <[EMAIL PROTECTED]> wrote in message
news:20021103231622.13841.qmail@;pb1.pair.com...
> I am trying to submit a form on my apache server running win2k and php4
> using php, but I get the error:
>
> Notice: Undefined variable: submitform in C:\www\\emailform.php on line 9
>
> The exact same php script works on another server running
linux/apache/php4
>
> Does anyone know if I need to load any extensions in my php.ini file in
> order for php to receive variables defined in an html form? Or maybe what
> else might be the problem?
>
> here are the lines around line 1-20:
>
> <HTML>
> <HEAD>
> <TITLE>Email</TITLE>
> </HEAD>
> <BODY BGCOLOR="#ffffff">
> <?php
> $youremail = "[EMAIL PROTECTED]";
> $subject = "Contact Form";
> if($submitform) {
> $dcheck = explode(",",$require);
> while(list($check) = each($dcheck)) {
> if(!$$dcheck[$check]) {
> $error .= "Missing $dcheck[$check]<BR>";
> }
>
>
>
> Thanks!
>
> Luke :)
> }
>
>

This is due to a setting in your php.ini file

register_globals: off

If this is the case, variables that come from a form need to be accessed by
the superglobals (PHP 4.2+) ie $_POST["variablename"];

OR
the HTTP vars.. $HTTP_POST_VARS["variablename"];

HTH
Brad


--- End Message ---
--- Begin Message ---
Thanks for the help!  You were right about the register_globals being off!
I tried to turn it on just to see if it fixes the problem, but I still get
the same error:
When I use:   if($submitform){
I get the error:

Notice: Undefined variable: submitform in C:\www\emailform.php on line 9

and when I use:   if($_POST["submitform"])   or
if($HTTP_POST_VARS["submitform"])
I get the error:

Notice: Undefined index: submitform in C:\www\emailform.php on line 9

Does anyone have any more suggestions?

Thanks Brad!

Luke


"Brad Thomas" <[EMAIL PROTECTED]> wrote in message
news:20021104020732.94208.qmail@;pb1.pair.com...
> Hi
>
> "Luke" <[EMAIL PROTECTED]> wrote in message
> news:20021103231622.13841.qmail@;pb1.pair.com...
> > I am trying to submit a form on my apache server running win2k and php4
> > using php, but I get the error:
> >
> > Notice: Undefined variable: submitform in C:\www\\emailform.php on line
9
> >
> > The exact same php script works on another server running
> linux/apache/php4
> >
> > Does anyone know if I need to load any extensions in my php.ini file in
> > order for php to receive variables defined in an html form? Or maybe
what
> > else might be the problem?
> >
> > here are the lines around line 1-20:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>Email</TITLE>
> > </HEAD>
> > <BODY BGCOLOR="#ffffff">
> > <?php
> > $youremail = "[EMAIL PROTECTED]";
> > $subject = "Contact Form";
> > if($submitform) {
> > $dcheck = explode(",",$require);
> > while(list($check) = each($dcheck)) {
> > if(!$$dcheck[$check]) {
> > $error .= "Missing $dcheck[$check]<BR>";
> > }
> >
> >
> >
> > Thanks!
> >
> > Luke :)
> > }
> >
> >
>
> This is due to a setting in your php.ini file
>
> register_globals: off
>
> If this is the case, variables that come from a form need to be accessed
by
> the superglobals (PHP 4.2+) ie $_POST["variablename"];
>
> OR
> the HTTP vars.. $HTTP_POST_VARS["variablename"];
>
> HTH
> Brad
>
>


--- End Message ---
--- Begin Message ---
I just noticed something.  I never wrote this script, and the variable
submitform comes from the line:

<INPUT NAME="submitform" TYPE="submit" VALUE="Submit">

I think I just have to figure out what setting I have to change in php.ini
so that it automatically looks at each element of the form.  -- I say that
I think I need to edit php.ini because the script works on my linux server..
here is the entire form submitter:

<HTML>
<HEAD>
<TITLE>Email</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<?php
$youremail = "[EMAIL PROTECTED]";
$subject = "Contact Form";
if($_POST["submitform"]) {
$dcheck = explode(",",$require);
while(list($check) = each($dcheck)) {
if(!$$dcheck[$check]) {
$error .= "Missing $dcheck[$check]<BR>";
}
}
if($error) {
?>
<P>
<CENTER>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#004080"> <TABLE WIDTH="394" BORDER="0"
CELLSPACING="1" CELLPADDING="2">
<TR>
<TD WIDTH="26%" BGCOLOR="#004080"> <P><B><FONT COLOR="#ffffff" SIZE="-1"
FACE="Verdana">Error</FONT></B></TD>
</TR>
<TR>
<TD WIDTH="26%" BGCOLOR="#ffffff"> <FONT COLOR="#000000" SIZE="-1"
FACE="Verdana"><?php echo $error; ?></FONT></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
<?php
exit();
}
if ($YourName) {
$yeshow = "\n\nFrom, $YourName\n";
}
mail($YourEmailAddress,"$subject"," $Message $yeshow ","From: $YourName
<$YourEmailAddress>");
print(" <CENTER>
<b>Thanks!<P>
<a href='javascript:history.go(-1)'>Go Back</a></b>
</CENTER>
</BODY>
</HTML>\n");
exit();
} else {
?>
<FORM ACTION=emailform.php METHOD="POST">
<CENTER>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR><TD WIDTH="100%" BGCOLOR="#004080"> <TABLE WIDTH="394" BORDER="0"
CELLSPACING="1" CELLPADDING="2">
<TR><TD COLSPAN="2" BGCOLOR="#004080"> <B><FONT COLOR="#ffffff" SIZE="-1"
FACE="Verdana">Contact Form</FONT></B></TD></TR>
<TR> <TD WIDTH="48%" BGCOLOR="#ffffff"> <B><FONT COLOR="#000000" SIZE="-1"
FACE="Verdana">Your Name:</FONT></B></TD>
<TD WIDTH="52%" BGCOLOR="#ffffff">
<INPUT NAME="YourName" TYPE="text" SIZE="25">
</TD></TR>
<TR><TD WIDTH="48%" BGCOLOR="#ffffff"> <B><FONT COLOR="#000000" SIZE="-1"
FACE="Verdana">Your Email:</FONT></B></TD>
<TD WIDTH="52%" BGCOLOR="#ffffff">
<INPUT NAME="YourEmailAddress" TYPE="text" SIZE="25"></TD></TR>
<TR> <TD COLSPAN="2" BGCOLOR="#ffffff"><B><FONT COLOR="#000000" SIZE="-1"
FACE="Verdana">Message:<BR>
<INPUT TYPE="hidden" NAME="require"
VALUE="YourName,YourEmailAddress,Message">
<TEXTAREA NAME="Message" ROWS="5" COLS="45"></TEXTAREA>
</FONT></B></TD></TR>
</TABLE></TD></TR>
</TABLE>
<INPUT NAME="submitform" TYPE="submit" VALUE="Submit">
</CENTER>
</FORM>
</BODY></HTML>
<?php
exit();
}
?>

Thanks again!

Luke

"Luke" <[EMAIL PROTECTED]> wrote in message
news:20021104030118.29591.qmail@;pb1.pair.com...
> Thanks for the help!  You were right about the register_globals being off!
> I tried to turn it on just to see if it fixes the problem, but I still get
> the same error:
> When I use:   if($submitform){
> I get the error:
>
> Notice: Undefined variable: submitform in C:\www\emailform.php on line 9
>
> and when I use:   if($_POST["submitform"])   or
> if($HTTP_POST_VARS["submitform"])
> I get the error:
>
> Notice: Undefined index: submitform in C:\www\emailform.php on line 9
>
> Does anyone have any more suggestions?
>
> Thanks Brad!
>
> Luke
>
>
> "Brad Thomas" <[EMAIL PROTECTED]> wrote in message
> news:20021104020732.94208.qmail@;pb1.pair.com...
> > Hi
> >
> > "Luke" <[EMAIL PROTECTED]> wrote in message
> > news:20021103231622.13841.qmail@;pb1.pair.com...
> > > I am trying to submit a form on my apache server running win2k and
php4
> > > using php, but I get the error:
> > >
> > > Notice: Undefined variable: submitform in C:\www\\emailform.php on
line
> 9
> > >
> > > The exact same php script works on another server running
> > linux/apache/php4
> > >
> > > Does anyone know if I need to load any extensions in my php.ini file
in
> > > order for php to receive variables defined in an html form? Or maybe
> what
> > > else might be the problem?
> > >
> > > here are the lines around line 1-20:
> > >
> > > <HTML>
> > > <HEAD>
> > > <TITLE>Email</TITLE>
> > > </HEAD>
> > > <BODY BGCOLOR="#ffffff">
> > > <?php
> > > $youremail = "[EMAIL PROTECTED]";
> > > $subject = "Contact Form";
> > > if($submitform) {
> > > $dcheck = explode(",",$require);
> > > while(list($check) = each($dcheck)) {
> > > if(!$$dcheck[$check]) {
> > > $error .= "Missing $dcheck[$check]<BR>";
> > > }
> > >
> > >
> > >
> > > Thanks!
> > >
> > > Luke :)
> > > }
> > >
> > >
> >
> > This is due to a setting in your php.ini file
> >
> > register_globals: off
> >
> > If this is the case, variables that come from a form need to be accessed
> by
> > the superglobals (PHP 4.2+) ie $_POST["variablename"];
> >
> > OR
> > the HTTP vars.. $HTTP_POST_VARS["variablename"];
> >
> > HTH
> > Brad
> >
> >
>
>


--- End Message ---
--- Begin Message --- hello,
how am i able to call an normal html file to a different frame from php?

Clarification: I got two frames, in the left one you log in, then the database will be connected,in the left frame an navigationmenu will(should) appear, but on the main frame an html file with various things should appear..

so how do i target that file for the "main"frame from within php script?

Please help its rather urgent

thanks in advance

jan

--- End Message ---
--- Begin Message ---
>I there a way to have the .php page pickup the url that was typed in e.g.
>usertype= www.mydomain.com/wRongurl

$usertype = getenv('REQUEST_URI');

I believe this is one of those server-dependent environment variables, but
it works with Apache.

 - Steve Yates
 - Who is General Failure and why is he reading my drive?

~ Do you like my taglines? Add them to your messages and
~ laugh through hundreds more by downloading Taglinator
~ at www.srtware.com today!


--- End Message ---

Reply via email to