I have a script in a cgi-bin that displays a form and passes a field to a second php script also in the cgi-bin directory. The data is not being passed. Thess scripts work fine outside the cgi-bin and the permissions are correct.
I had to put this line at the beginning of the scripts to get it to work at all in the cgi-bin.
#!/usr/local/bin/php
THis is the first script that displays the form:
#!/usr/local/bin/php
Content-type: text/html
<HTML><HEAD><TITLE> *** Put a title HERE ***</TITLE>
</HEAD>
<BODY BGCOLOR=white>
<form action="http://mysite.com/cgi-bin/ubb6/Members/show_regdate.php" method="post">
Enter reg date mm-dd-yyyy: <input type="text" name="regdate" value="" size=10>
<INPUT TYPE="SUBMIT" VALUE="Submit">
</form>
<?php
//comment
?>
</BODY>
</HTML>
This is the 2nd script that is supposed to display the field 'regdate'
#!/usr/local/bin/php
Content-type: text/html
<HTML><HEAD><TITLE> *** Put a title HERE ***</TITLE>
</HEAD>
<BODY BGCOLOR=white>
<?php
$regdate = $_POST['regdate']; //add this line
echo "<p>-- Registration date is : $regdate --";
?>
</BODY>
</HTML>
?>
Regdate is not showing, it is blank. Any ideas?