blufish Posted May 31, 2008 Share Posted May 31, 2008 Can anybody tell me what this is and how to fix it? ??? Parse error: syntax error, unexpected $end in /home/blufish/public_html/mail/send.php on line 81 <?php session_start(); ?> <html> <head> <?php $mypage = $_GET['where']."fzp"; if ($mypage==".fzp") { echo "<script type='text/javascript'>parent.location='http://www.frozenoven.com/index.php?where=home';</script>"; } ini_set('error_reporting',E_ALL); //error reporting if (isset($_SESSION['name'])) { echo '<link rel="stylesheet" type="text/css" href="'.$_SESSION['name'].'">'; } else { echo '<link rel="stylesheet" type="text/css" href="white.css">'; } ?> <script type="text/javascript"> function go(location) { parent.location = location } </script> </head> <body> <?php if (isset($_SESSION['name'])) { echo 'Hey '.$_SESSION['name'].'!'; } else { echo "Hey Guest! <a href='http://www.frozenoven.com/index.php?where=make'>Login</a>"; } ?> <center> <div class="main"> <?php if (isset($_SESSION['name'])) { $mname = strtolower($_SESSION['name']); $person = strtolower($_POST['to']); if (!file_exists($person)) { echo "<h1 align=center>Error</h1><p align=center>Either account does not exist, or no Mailing system is setup.</p>"; } if (file_exists($_POST['to'])) { $orig = file_get_contents($person); file_put_contents($person,"<table><tr><td><b>".$_SESSION['name'].":</b></td><td>".$_POST['message']."</td></tr></table>"); echo "<p>Your message to ".$person." has been sent.</p><p><a href='http://www.frozenoven.com/mail/index.php'>Back to Inbox</a></p>"; } if (!isset($_SESSION['name'])) { echo '<h1 align=center>Error</h1><p align="center">You must be logged in to send messages</p>'; } ?> </div> <div class="ad"> <script type="text/javascript"><!-- google_ad_client = "pub-2142734016668784"; /* 728x90, created 5/30/08 */ google_ad_slot = "1701812294"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> </td> </tr> </table> </center> </body> </html> Link to comment https://forums.phpfreaks.com/topic/108103-solved-unexpected-end-error/ Share on other sites More sharing options...
Prismatic Posted May 31, 2008 Share Posted May 31, 2008 <?php session_start(); ?> <html> <head> <?php $mypage = $_GET['where']."fzp"; if ($mypage==".fzp") { echo "<script type='text/javascript'>parent.location='http://www.frozenoven.com/index.php?where=home';</script>"; } ini_set('error_reporting',E_ALL); //error reporting if (isset($_SESSION['name'])) { echo '<link rel="stylesheet" type="text/css" href="'.$_SESSION['name'].'">'; } else { echo '<link rel="stylesheet" type="text/css" href="white.css">'; } ?> <script type="text/javascript"> function go(location) { parent.location = location } </script> </head> <body> <?php if (isset($_SESSION['name'])) { echo 'Hey '.$_SESSION['name'].'!'; } else { echo "Hey Guest! <a href='http://www.frozenoven.com/index.php?where=make'>Login</a>"; } ?> <center> <div class="main"> <?php if (isset($_SESSION['name'])) { $mname = strtolower($_SESSION['name']); $person = strtolower($_POST['to']); if (!file_exists($person)) { echo "<h1 align=center>Error</h1><p align=center>Either account does not exist, or no Mailing system is setup.</p>"; } if (file_exists($_POST['to'])) { $orig = file_get_contents($person); file_put_contents($person,"<table><tr><td><b>".$_SESSION['name'].":</b></td><td>".$_POST['message']."</td></tr></table>"); echo "<p>Your message to ".$person." has been sent.</p><p><a href='http://www.frozenoven.com/mail/index.php'>Back to Inbox</a></p>"; } if (!isset($_SESSION['name'])) { echo '<h1 align=center>Error</h1><p align="center">You must be logged in to send messages</p>'; } } ?> </div> <div class="ad"> <script type="text/javascript"><!-- google_ad_client = "pub-2142734016668784"; /* 728x90, created 5/30/08 */ google_ad_slot = "1701812294"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> </div> </td> </tr> </table> </center> </body> </html> Link to comment https://forums.phpfreaks.com/topic/108103-solved-unexpected-end-error/#findComment-554088 Share on other sites More sharing options...
rarebit Posted May 31, 2008 Share Posted May 31, 2008 Yeah... <?php if (isset($_SESSION['name'])) { $mname = strtolower($_SESSION['name']); $person = strtolower($_POST['to']); if (!file_exists($person)) { echo "<h1 align=center>Error</h1><p align=center>Either account does not exist, or no Mailing system is setup.</p>"; } if (file_exists($_POST['to'])) { $orig = file_get_contents($person); file_put_contents($person,"<table><tr><td><b>".$_SESSION['name'].":</b></td><td>".$_POST['message']."</td></tr></table>"); echo "<p>Your message to ".$person." has been sent.</p><p><a href='http://www.frozenoven.com/mail/index.php'>Back to Inbox</a></p>"; } if (!isset($_SESSION['name'])) { echo '<h1 align=center>Error</h1><p align="center">You must be logged in to send messages</p>'; } ?> That bit needs closing... Also helps to indent your code, errors like that become apparent! Link to comment https://forums.phpfreaks.com/topic/108103-solved-unexpected-end-error/#findComment-554089 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.