Re: Unexpected $end error?
| From: | Tom Rogers | Date: | Sun, 05 Jan 2003 23:04:52 +0000 |
| Subject: | Re: Unexpected $end error? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130342@lists.php.net to get a copy of this message | ||
Hi,
Monday, January 6, 2003, 8:56:58 AM, you wrote:
VB> Can someone tell me why I keep getting that error:
VB> Parse error: parse error, unexpected $end in D:\Program Files\Apache
VB> Group\Apache2\htdocs\proxy\acc_new.php on line 62
VB> line 62 refers to </html>
VB> Thanks for your help
VB> Vincent
VB> Here is the content of acc_new.php
VB> <?php
VB> //MUST declare $page_class to specify the level of authentication required
VB> $page_class = "account";
VB> include('auth.php');
VB> include('mysql.php');
?>>
VB> <html>
VB> <head>
VB> <title>Account Management Tools - Add a new account</title>
VB> <meta http-equiv="Content-Type" content="text/html;
VB> charset=iso-8859-1">
VB> <link href="proxy.css" rel="stylesheet" type="text/css">
VB> </head>
VB> <body>
VB> <h1>Accounts Management Tools</h1>
VB> <h2>Add a new account</h2>
VB> <form name="frmAdd" method="post" action="acc_new.php">
VB> <p><strong>Username:</strong>
VB> <input type="text" name="textfield">
VB> </p>
VB> <p><strong>Password:</strong>
VB> <input name="txtPassword" type="password"
VB> id="txtPassword" value=""
VB> size="25" maxlength="20">
VB> <em>Must contain between 4 and 20 characters.</em></p>
VB> <p><strong>Firstname:</strong>
VB> <input name="txtFirstname" type="text" id="txtFirstname"
VB> value=""
VB> size="25" maxlength="50">
VB> </p>
VB> <p><strong>Lastname:</strong>
VB> <input name="txtLastname" type="text" id="txtLastname"
VB> value=""
VB> size="25" maxlength="50">
VB> </p>
VB> <p><strong>Email address:</strong>
VB> <input name="txtEmail" type="text" id="txtEmail"
VB> value="" size="50"
maxlength="80">>
VB> </p>
VB> <p><strong>Usergroup:</strong>
VB> <select name="selUserGroup">
VB> <?php
VB> //Fetch list of groups
VB> $result = mysql_query("SELECT id, name FROM tblUserGroups", $db);
VB> $row = mysql_fetch_array($result);
VB> if ($row = mysql_fetch_array($result)) {
VB> do {
VB> ?>
VB> <option value="<?php echo $row['id']; ?>"><?php echo
VB> $row['name'];
?>></option>
VB> <?php
VB> } while($row = mysql_fetch_array($result));
VB> ?>
VB> </select>
VB> </p>
VB> <p align="center">
VB> <input name="btnAdd" type="submit" id="btnUpdate"
VB> value="Add new
account">>
VB> </p>
VB> </form>
VB> <p><a href="man_accounts.php">Back to Account Management
VB> Tools</a></p>
VB> </body>
VB> </html>
VB> and here is the content of auth.php
VB> <?php
VB> //some code working with every other pages
?>>
VB> and mysql.php
VB> <?php
VB> //mysql.php Include file initializing connection to db
VB> $db = mysql_connect(dbinfo goes here);
VB> mysql_select_db("proxy_db", $db);
?>>
That happens if you have mismatched braces {} or if(): endif; etc
--
regards,
Tom