Does anyone have any idea why adding PHP into an HTML page would cause a
rollover (not even within the PHP script) to not function?

The thing is, I have done the same thing on various other pages, but this is
the only page that does it.  I tried removing the PHP script from the page,
and the rollover works, but when I add the code back in, it doesn't.  And if
anyone has any ideas as how to minimize the code, they would be appreciated
as well.  Here is the code that was inserted within a cell in a table ..the
rollover is in another cell:



<?php
$filename = "contact.frm";
if(empty($HTTP_POST_VARS["name"]) && empty($HTTP_POST_VARS["email"]) &&
empty($HTTP_POST_VARS["comments"])) {
  @ $fp = fopen($filename, "r");
  if(!$fp) {
    echo "<p><b>Error:</b> could not open <b>$filename</b> for
reading</p>\n";
    exit;
  }
  $form = fread($fp, filesize($filename));
  fclose($fp);
  $form = str_replace("{name}", $HTTP_POST_VARS["name"], $form);
  $form = str_replace("{email}", $HTTP_POST_VARS["email"], $form);
  echo $form;
}
elseif(empty($HTTP_POST_VARS["name"]) || empty($HTTP_POST_VARS["email"]) ||
empty($HTTP_POST_VARS["comments"])) {
  echo "<p align='center'><font color='#FF0000'><b>You must fill out all
information</b></font></p>\n";
  @ $fp = fopen($filename, "r");
  if(!$fp) {
    echo "<p><b>Error:</b> could not open <b>$filename</b> for
reading</p>\n";
    exit;
  }
  $form = fread($fp, filesize($filename));
  fclose($fp);
  $form = str_replace("{name}", $HTTP_POST_VARS["name"], $form);
  $form = str_replace("{email}", $HTTP_POST_VARS["email"], $form);
  echo $form;
}
else {
  $submit = 0;
  $name = $HTTP_POST_VARS["name"];
  $body = strip_tags(trim(stripslashes($HTTP_POST_VARS["comments"])));
  $body .= "\n\nSent: ".date("F j, Y  g:i a")."\nSender: $name";
  $to = "[EMAIL PROTECTED]";
  $subject = "Wild Zone web contact";
  $headers = "From: ".$HTTP_POST_VARS["email"]."\n";
  mail($to,$subject,$body,$headers);
  @ $fp = fopen($filename, "r");
  if(!$fp) {
    echo "<p><b>Error:</b> could not open <b>$filename</b> for
reading</p>\n";
    exit;
  }
  $form = fread($fp, filesize($filename));
  fclose($fp);
  $form = str_replace("{name}", "", $form);
  $form = str_replace("{email}", "", $form);
  echo "<p align='center'><font color='#FF0000'>Your information has been
successfully transmitted</font></p>\n";
  echo $form;
}
?>
--
Joshua E Minnie
CIO
[EMAIL PROTECTED]

"Don't work for recognition, but always do work worthy of recognition."



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to