httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CSU Internet Inc." <csuinter...@yahoo.com>
Subject RE: [users@httpd] Apache 2.0.40 & PHP 4.3
Date Sun, 15 Sep 2002 02:58:32 GMT
Ahh.......didn't know that. I'll use the new standard
instead of turning on globals. I guess I should also
pick up the most recent PHP book too.

Thnx for the info and the URL :o)


--- MET <met@uberstats.com> wrote:
> Just guessing here, but if you weren't aware as of
> PHP 4.2.0 global
> variables have been turned off.  Meaning that in
> order to pick up
> variables upon a form submission either POST or GET
> you cannot just
> write the name of the form field with $ in front of
> it.  
> 
> So here are your options:
> 
> 1.  The easiest way, and less secure is this.  Find
> your php.ini file
> and search for 'register_globals' and make it equal
> to 'On' instead of
> 'Off'.  This is not suggested as it creates a pretty
> big security hole.
> 
> 2.  The best way, but creates using old scripts
> extremely annoying.
> When grabbing the variable for printing on the form
> submission page do
> this.
> 
> 
> 	<?php
> 		if ( !isset($_POST['name']) )
> 		{
> 			print "Please enter name.";
> 		}
> 		else
> 		{
> 			print "Hello " . $_POST['name'];
> 		}
> 	?>
> 
> Notice the $_POST variable, its basically an array
> holding each of the
> variables that came across from the form post.  You
> can also replace
> $_POST with $_GET depending on what type of form
> submission you use.
> 
> I would suggest reading this...
> http://www.zend.com/zend/art/art-sweat4.php
> 
> 
> ~ Matthew
> 
> 
> -----Original Message-----
> From: Lynne K. [mailto:lynzk@tht.net] 
> Sent: Saturday, September 14, 2002 10:03 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Apache 2.0.40 & PHP 4.3
> 
> 
> Hello,
> 
>   Try the following:
> 
>    <FORM action='test.php' method='post'>
>     Enter name: <input type='text' name='name'>
>     <input type='submit' value='Say hello'>
>    </FORM>
> 
>    <?php
>              if (!$name)
>             {
>                 print "Please enter name.";
>              }
>             else
>             {
>                 print "Hello ".$name;
>              }
>        ?>
> 
> ----- Original Message -----
> From: "CSU Internet Inc." <csuinternet@yahoo.com>
> To: <users@httpd.apache.org>
> Sent: Saturday, September 14, 2002 9:41 PM
> Subject: [users@httpd] Apache 2.0.40 & PHP 4.3
> 
> 
> > I compiled PHP 4.3 with Apache 2.0.40 and it
> parses
> > PHP files OK.........the problem I'm having is
> that
> > it's not processing forms. Can someone tell me
> what's
> > wrong with this script?
> >
> > <HTML>
> >  <HEAD>
> >    <TITLE>test</TITLE>
> >  </HEAD>
> >
> >  <BODY>
> >   <FORM action='test.php' method='post'>
> >    Enter name: <input type='text' name='name'>
> >    <input type='submit' value='Say hello'>
> >   </FORM>
> >
> >   <? if (!$name) {
> >     echo "Please enter name.";
> >     }
> >     else {
> >     echo "Hello $name";
> >     }
> >   ?>
> >
> > </BODY></HTML>
> >
> > I get the form but it doesn't print the name from
> the
> > input. It prints the "Please enter name."
> > though......any clues on this?
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! News - Today's headlines
> > http://news.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > The official User-To-User support forum of the
> Apache HTTP Server 
> > Project. See
> <URL:http://httpd.apache.org/userslist.html> for
> more 
> > info. To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
> >    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server
> Project. See
> <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message