<?php
ini_set("log_errors", 1);
ini_set("error_log", "errorlog.log");
$recid= $_POST['recid'];
$username = $_POST['name'];
$email = $_POST['email'];
$ownername = $_POST['ownername'];
include ("connection.php");
$result = $db->query("UPDATE users SET verified='y' WHERE recid='$recid'");
$filename = str_replace(" ","_", trim($username) );
mkdir("Business_Pages/". $filename."/");
$jquery = "<script src='http://code.jquery.com/jquery-1.9.1.min.js'> </script>";
$jqueryui = "<script src='http://code.jquery.com/ui/1.10.2/jquery-ui.js'> </script>";
$jquerycss = "<link rel='stylesheet' href='http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'>";
$postdata = "<script src='../../Scripts/postdata.js'> </script>";
$pagecss = "<link rel='stylesheet' href='../../CSS/businesspages.css'>";
$wclogo = "<img src='../../wc.png' id='wc'>";
$postinput = "<input type='text' id='post' placeholder='Post' name='post'>";
$postdate = "<input type='text' id='date' placeholder='Enter Date' name='date'>";
$accountinfo = "<table id='accountinfo'> <tr> <td> <img src='../../testresteraunt.png' id='testresteraunt'> </td> </tr> <tr> <td> $username </td> </tr> <tr> <td> $ownername </td> </tr> </table>";
$links = "<table id='links'> <tr> <td> </td> <td> </td> </tr> </table> <div id='header'>";
$fp = fopen("Business_Pages/". $filename . "/" . $filename . ".html", "w");
fwrite($fp,"<?php session_start()");
fwrite($fp,"if(isset($_SESSION['id'])) { ?>");
fwrite($fp,"<!DOCTYPE html> <html> <head>");
fwrite($fp,"</head>");
fwrite($fp,"<body>");
fwrite($fp,"</body> </html>");
fwrite($fp,"<?php } ?>");
fclose($fp);
$to = "$email";
$subject = "Account Creation";
$message = "Congratulations you have been accepted to Wolfeboro Connection";
$from = "info@wolfeboroconnection.com";
$headers = "From:" . $from;
mail($to, $subject, $message, $headers)
?>
我试图仅在会话有效时显示 html,但 php 说它是意外的 if 语句和
解析错误:语法错误,意外的 T_ENCAPSED_AND_WHITESPACE,期望/home/content/96/10688096/html/中的 T_STRING 或 T_VARIABLE 或 T_NUM_STRING verify.php在第37
行提前致谢