p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: php and html


Message #1 by "Savich" <savich_chop@h...> on Tue, 29 Oct 2002 13:50:15
 Hi,  
I can not collect information in a html-FORM and with php get this  
information afeterwards (page 77 in "Beginning PHP4" book...). Html fil  
is OK when I click on Submit Query, but php-fil did not display the  
contents of the variable $Author ? I use apache 1.3.26 and php 4.2.2 and  
I do not have a problem with run my php scripts...Is it something with  
apache that I must configure to be able to use html + php ?  
Grateful for any help...  
Savich  
  
  
*************** html fil *********************  
<html>  
<head></head>  
<body>  
  
<FORM METHOD=GET ACTION="text.php">  
  
Who is your favourite author?  
  
<INPUT NAME="Author" TYPE="TEXT">  
<br>  
<br>  
<INPUT TYPE=SUBMIT>  
  
</FORM>  
</body>  
</html>  
  
************ php fil ***********************'  
<html>  
<head></head>  
<body>  
  
My favourite author is:  
  
<?php  
echo $Author;  
?>  
</body>  
</html>   
 
Message #2 by esanchez@g... on Tue, 29 Oct 2002 14:40:34
Try to use method="post" instead of "get"
hope this helps...
  -eduardo s.m.

  Return to Index