Thanks Brad, I'm nearly cross-eyed from this one. I've verified that the code is uploading. It really does run on my PC. And it really does break on the web. Here are the first few lines of code, and as you can see, there isn't even an ELSE in them.
<?php
session_start();
if ( !isset( $SESSION['page_instance_ids'] ) ) {
$SESSION['page_instance_ids'] = array();
}
$SESSION['page_instance_ids'][] = uniqid('', true);
include "constants.inc";
However, I noticed that if I view the uploaded code where the CR's are stripped out and do a "GOTO" line 5, it does take me to an ELSE statement. Would it make sense for the line number to be calculated that way? Here is the ELSE with its preceding if statement:
if (!empty($proofno)) {
$show = substr($proofno,0,2);
$dirlookup = PROOF_PATH . "$show" . "/" . "$show" . "_lookup.csv" ;
$found = false;
$fp = fopen ( "$dirlookup", "r");
while ($data = fgetcsv ($fp, 200, ",")) {
if (trim($data[0]) == $proofno.'.jpg'){
$exhib_no = str_replace(';','',$data[1]); // strip off semicolons from exhibitor number
$found = true;
}
}
}
else { // get show and exhib no by the usual means
// retrieve post or get variables. They will be gets if coming from proofs.php; posts if coming from lookitup.php.
$show = $POST['show'];
if (empty($show)) { $show = $GET['show']; }
$exhib_no = $POST['exhib_no'];
if (empty($exhib_no)) {
$exhib_no = $GET['exhib_no'];
}
$lookup = $_POST['lookup'];
if (!$show || !$exhib_no) {
// if no parameters passed, return to main
header("Location: proofs.php");
}
if ($lookup == "I forgot my number"){
header("Location: lookitup.php?show=$show");
}
}
I'm using NotePad++ and all the brackets and parentheses balance. Any other ideas? Thanks for taking the time.