Hello there,
i have a page that php (or maybe apache?) refuses to do anything with. :mad: other pages in my site, with very similar format, work, but not this one. no source is output to the browser, and nothing is displayed. i get no errors with ini_set('display_errors', true); and error_reporting(E_STRICT);. Any ideas what the heck is going on here?!?!?
my code:
<?php
ini_set('display_errors', true);
error_reporting(E_STRICT);
require 'includes/session.php';
//make sure the user got here correctly
if(!isset($_SESSION['group_type'])){
header("Location: /prev.php");
}
$ses_pre = 'reg_val_array'; //array prefix for accessing submitted form values in $_SESSION,
//these values have been validated!
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<script src="/userspace/include/js/js_toolbox.js" type="text/javascript"></script>
<img src="includes/progressbar_test.php?stop=1" border="0" usemap="progressBar" />
<?php
echo $_SESSION['imgMap'];
unset ($_SESSION['imgMap']);
if($form->num_errors > 0){
echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<form name="unit_info" method="post" action="process.php">
<?php
if(isset($_SESSION['group_type'])){
if($_SESSION['group_type'] == 'unit'){
echo "<table cellspacing='10'><td></td>";
if($form->num_errors > 0){
echo "<tr><td></td><td colspan='4'>";
if($form->error("unit_type")){ echo $form->error("unit_type")."<br />";}
if($form->error("unit_num")){ echo $form->error("unit_num")."<br />";}
if($form->error("locale")){ echo $form->error("locale")."<br />";}
if($form->error("council")){ echo $form->error("council")."<br />";}
echo "</td></tr>";
}
echo "<tr><td>"
if($form->error('uniq_unit')){
echo "<input type='radio' name='uniq_unit_sel' value='0' /> "
}
echo "</td><td colspan='3'>Unit Information</td></tr><tr><td width='30'></td>"
."<td colspan='2'>Unit: "
."<select name='unit_type'>"
." <option value='pack'>Pack</option>"
." <option value='troop'>Troop</option>"
." <option value='crew'>Crew</option>"
." <option value='post'>Post</option>"
."</select> number "
."<input type='text' name='unit_num' size='4' value='"
.form_value('unit_num', $ses_pre)."' /> "
."</td></tr><tr><td></td><td>Unit City:</td><td>"
."<input type='text' name='locale' value='".form_value('locale', $ses_pre)."' /></td>"
."</tr><tr><td></td><td>Council:</td><td>"
."<input type='text' name='council' value='"
.form_value('council', $ses_pre, 'Central New Jersey Council')."' />"
."</td></tr></table><input type='hidden' value='1' name='subUnitInfo' />";
if($form->error("uniq_unit")){
echo "We found a similar entry in our database for the unit information you entered. "
."<br />Please select the entry that matches your info, or correct your info "
."above.<br />";
echo "<input type='radio' value='{$_SESSION['$ses_pre']['id']}' "
."name='uniq_unit_sel' /> "
."{$_SESSION['possUnit'][0]['unit_type']} {$_SESSION['possUnit'][0]['unit_num']}"
."<br />{$_SESSION['possUnit'][0]['locale']}<br />"
."{$_SESSION['possUnit'][0]['council']}";
}
}elseif($_SESSION['group_type'] == 'org'){
echo "<table cellspacing='10'><tr><td colspan='2'>Organization Information</td></tr>";
if($form->num_errors > 0){//if there are errors, lets display them
echo "<tr><td></td><td>";
if($form->error("org_name")){echo $form->error("org_name")."<br />";}
if($form->error("locale")){echo $form->error("locale")."<br />";}
if($form->error("org_desc")){echo $form->error("org_desc")."<br />";}
echo "</td></tr>";
}
//display the org info fields
echo "<tr><td width='30'></td><td>Organization Name:<br />"
."<input type='text' name='org_name' value='' /></td></tr><tr><td></td><td>"
."Organization Locale:<br /><input type='text' name='locale' value='' /></td></tr>"
."<tr><td></td><td>Organization Description:<br /><textarea name='org_desc'>"
."</textarea></td></tr></table><input type='hidden' value='1' name='subOrgInfo' />";
}else{
header("Location: /prev.php");
}
}else{
echo "group_type not set!!!";
}
?><br />
<table cellspacing="10">
<tr>
<td colspan="5" nowrap="nowrap">Contact Information:</td>
</tr>
<?php
if($form->num_errors > 0){
echo "<tr><td></td><td colspan='4'>";
if($form->error("name")){echo $form->error("name")."<br />";}
if($form->error("phone")){echo $form->error("phone")."<br />";}
if($form->error("phone2")){echo $form->error("phone2")."<br />";}
if($form->error("email")){echo $form->error("email")."<br />";}
echo "</td></tr>";
}
?>
<tr>
<td width="30"> </td>
<td>Name:*</td>
<td>
<input type="text" name="name" value="
<?php echo form_value('name', $ses_pre); ?>" />
</td>
<td>Position: </td>
<td>
<input type="text" name="position" value="
<?php echo form_value('position', $ses_pre); ?>" />
</td>
</tr>
<tr>
<td> </td>
<td>Phone:*</td>
<td>
<input type="text" name="phone" value="
<?php echo form_value('phone', $ses_pre); ?>" />
</td>
<td> Phone 2: </td>
<td>
<input type="text" name="phone2" value="
<?php echo form_value('phone2', $ses_pre); ?>" />
</td>
</tr>
<tr>
<td> </td>
<td>Email:*</td>
<td colspan="3">
<input type="text" name="email" size="30" value="<?php
echo form_value('email', $ses_pre); ?>" />
</td>
</tr>
<tr>
<td colspan="2"> </td>
<td colspan="3"><input name="submit" type="submit" value="Next Step..." /></td>
</tr>
</table>
</form>
<pre>
<?php
//for debuging
var_dump($_SESSION);
?>
</pre>
</body>
</html>
im using:
apache 2.2.3
php 5.2.0
mysql 5.0.27
any help is much appreciated!! thanks!:mad: :mad: