I’ve recently installed PHP 4.3.1 as a CGI executable on a RedHat 8.0 box. All appears OK to me when I check out the phpinfo.php page. But when I try to run some simple scripts things go bad.
It appears that the setup is having trouble passing the variable values to the php page being called for. I’m using a bunch of code that has been downloaded from a “Beginning PHP4” Wrox book so the code is clean, but perhaps something needs to be added. Here is a simple example:
Listbox.html File:
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=GET ACTION="listbox.php">
What price of car are you looking to buy?
<BR>
<BR>
<SELECT NAME="Price">
<OPTION>Under $5,000</OPTION>
<OPTION>$5,000-$10,000</OPTION>
<OPTION>$10,000-$25,000</OPTION>
<OPTION>Over $25,000</OPTION>
</SELECT>
<BR>
<BR>
What size of engine would you consider?
<BR>
<BR>
<SELECT NAME="EngineSize[]" MULTIPLE>
<OPTION>1.0L</OPTION>
<OPTION>1.4L</OPTION>
<OPTION>1.6L</OPTION>
<OPTION>2.0L</OPTION>
</SELECT>
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
listbox.php File:
<HTML>
<HEAD></HEAD>
<BODY>
<?php
echo "Price Range: $Price";
echo "<BR>Engine Size(s): $EngineSize[0]";
echo "$EngineSize[1]";
echo "$EngineSize[2]";
echo "$EngineSize[3]";
?>
</BODY>
</HTML>
So when I run this after making my selections I get this in the resulting page:
Price Range:
Engine Size(s):
Would someone please point me towards my problems here! I do have a reason to have PHP installed as a CGI executable so I don’t wish to change that. Cheers!
Newbie install/getting started (CGI executable) Question
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK