Re: More include issues

From: Date: Wed, 06 Jun 2007 20:24:46 +0000
Subject: Re: More include issues
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-256238@lists.php.net to get a copy of this message
Yes, I have error_reporting = E_ALL and show_warnings = On. Here's something interesting...if I put the include directly above the code for the dropdown it works....like below: <SELECT name="credit_card"> <?php *include '../../Conn/prpr_mssql.php';* // Query the credit_card_type table and load all of the records // into an array. $sql = "SELECT * FROM credit_card_code_types ORDER BY credit_card_type_desc"; $res = mssql_query($sql) or die(mssql_error()); while ($rec = mssql_fetch_assoc($res)) $credit_card_type_desc[] = $rec; // die('<pre>'.print_r($credit_card_type_code)); foreach ($credit_card_type_desc as $c) { if ($c['credit_card_type_code'] == $_POST['credit_card'])
     echo "<OPTION value=\"{$c['credit_card_type_code']}\"
SELECTED>{$c['credit_card_type_desc']}</OPTION>\n"; else
     echo "<OPTION
value=\"{$c['credit_card_type_code']}\">{$c['credit_card_type_desc']}</OPTION>\n"; } ?> </SELECT> and then the code stops again at the next area of my page where it needs to connect to the database. Since I have my database connection set as mssql_pconnect(persistent connection) I should not have to include the connection file before every attempt to retrieve something from the database, but that is the only way it is working right now. On 6/6/07, Stut <stuttle@gmail.com> wrote:
Dan Shirah wrote: I only added those echo's since we have been trying to figure this out, so I could see how far it was getting before it stopped. When I select "VIew Source", the last line of code is: <SELECT name="credit_card"> Do you have display_errors on and error_reporting to show at least errors and warnings? If that's the last line output then there's a fatal error in the code right after it, and developing without showing errors and warnings can lead to lengthy and usually pointless discussions on mailing lists. -Stut


« previous php.general (#256238) next »