Code: Select all
$out = fopen($page, "w");I know that the error in line 9 and the error in line 10 are related because they're in the same statement. What am I doing wrong?
user_reg.php:
Code: Select all
<?php
$name = $_GET["name"];
$user = $_GET["user"];
$email = $_GET["email"];
$pass = $_GET["pass"];
$pgname = strtolower($user);
$page = $pgname.".php";
print("<meta http-equiv=\"refresh\" content=\"5;url=$page\" />");
$handle = fopen("$page", "w")
if (!$handle) {
die("Could not create file. Try your upload again.");
}
fwrite($out,"
<title>delilac | my account</title>
<div id=\"page\">
<div id=\"content\">
<div class=\"post\">
<h1 class=\"title\">my account</h1>
<div class=\"entry\">
<p>
Name: $name
<br>
Username: $user
<br>
Email Address: $email
<br>
Password: $pass
<br>
<br>
-Having problems? Want to change a password? Click <a href=\"support.php?user=$user\">here</a> to contact support.
NOTE: When contacting support to change your personal details, you will receive an email asking to confirm this. If you get the email by accident, reply saying that you do not wish to change any details.
</p>
</div>
<div class=\"meta\">
</div>
</div>
<div class=\"post\">
<h2 class=\"title\">post a link</h2>
<div class=\"entry\">
<p><form method=\"GET\" action=\"user_post.php\">
<input type=\"hidden\" name=\"user\" value=\"$user\">
Site Name: <br><input name=\"name\" value=\"ex. Google\">
<br>
Site Description: <br><textarea name=\"title\" rows=\"10\" cols=\"30\">A descripton of your site here. Remember: the longer, the better!</textarea>
<br>
Link to Site: <br><input name=\"url\" value=\"http://www.\">
<br>
<input type=\"submit\" value=\"Submit Site\">
</form></p>
<ul>
</ul>
</div>
<div class=\"meta\">
</div>
</div>
</div>
<!-- end #content -->
<div id=\"sidebar\">
<div id=\"sidebar-bgtop\"></div>
<div id=\"sidebar-content\">
<ul>
<li>
<h2>Login</h2>
<ul>
You are logged in.
<br>
- <a href=\"index.php?log_out\"><u>Logout</u></a>
</ul>
</li>
<li>
<h2>Top 5 Links - Coming Soon!</h2>
<ul>
<li><a href=\"\"></a></li>
<li><a href=\"\"></a></li>
<li><a href=\"\"></a></li>
<li><a href=\"\"></a></li>
<li><a href=\"\"></a></li>
</ul>
</li>
</ul>
</div>
<div id=\"sidebar-bgbtm\"></div>
</div>
<!-- end #sidebar -->
</div>
<!-- end #page -->
<div id=\"footer\">
<p></p>
</div>
<!-- end #footer -->
</body>
</html>
");
fclose($out);
?>
</div>