Hi,
I got the syntax error in my following php code:
unexpected T_STRING in /net/home/z6zhou/public_html/signup.php on line 1. Who can help it out?
my php code is as follows:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>Publication DB</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Language" content="en-us" />
<link rel="stylesheet" href="style.css" type="text/css" />
<link href="/stylesheets/snippets.css?1239220407" media="screen" rel="Stylesheet" type="text/css" />
<link href="/stylesheets/minitabs.css?1229957682" media="screen" rel="Stylesheet" type="text/css" />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2557640-1";
urchinTracker();
</script>
</head>
//<body bgcolor =" 000000" TEXT="cccccc" LINK =" ff99ff" VLINK =" ff8888" ALINK =" 884488">
<body background ="ice-light.jpg" TEXT="black">
// create an acount code starting
<div id="container">
<script type="text/javascript">
//<![CDATA[
function validate_login(frm) {
var value = '';
var errFlag = new Array();
var _qfGroups = {};
_qfMsg = '';
value = frm.elements['username'].value;
if (value == '' && !errFlag['username']) {
errFlag['username'] = true;
_qfMsg = _qfMsg + '\n - login cannot be empty';
}
value = frm.elements['password'].value;
if (value == '' && !errFlag['password']) {
errFlag['password'] = true;
_qfMsg = _qfMsg + '\n - password cannot be empty';
}
value = frm.elements['email'].value;
var regex = /^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((2
5[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9
]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Z
a-z\-]+))$/;
if (value != '' && !regex.test(value) && !errFlag['email']) {
errFlag['email'] = true;
_qfMsg = _qfMsg + '\n - invalid email address';
}
if (_qfMsg != '') {
_qfMsg = 'Invalid information entered.' + _qfMsg;
_qfMsg = _qfMsg + '\nPlease correct these fields.';
alert(_qfMsg);
return false;
}
return true;
}
// ]]>
</script>
<form id="su_form" method="POST" action="/~z6zhou/signup.php" name="login" onsubmit="try { var myValidator = validate_login; } catch(e) { return true; } return myValidator(this);
">
<p><label for="login" class="signup">Desired Username</label><br/>
<input id="user_username" name="user[username]" size="30" type="text" /></p>
<p><label for="email" class="signup">Email</label><br/>
<input id="user_email" name="user[email]" size="30" type="text" onkeypress="su_check_email();" /></p>
<p><label for="email" class="signup">Real name</label><br/>
<input id="user_realname" name="user[realname]" size="30" type="text" /></p>
<p><label for="email" class="signup">Your URL <em>(optional)</em></label><br/>
<input id="user_url" name="user[url]" size="30" type="text" /></p>
<p><label for="password" class="signup">Password</label><br/>
<input id="user_plainpassword" name="user[plainpassword]" size="30" type="password" onkeypress="su_check_passwd();" onblur="su_check_passwd();" /></p>
<p><label for="password" class="signup">Confirm Password</label><br/>
<input id="user_plainpassword_confirmation" name="user[plainpassword_confirmation]" size="30" type="password" onkeypress="su_check_passwd();" onblur="su_check_passwd();" /></p>
<p><input name="commit" type="submit" value="Sign up" /></p>
<p><input name="redirect" type="hidden" value="/~z6zhou/signup.php" /></p>
</form>
<br style="clear: both" />
<div id="footer">
<p>Copyright © 2009 <a href=" "> </a></p>
// Site Meter
<p><a href=" "><img src="sea.jpg" width="120" height="30" border="0" alt=""/></a></p>
</div>
</div>
<script src="/javascripts/prototype.js?1229957682" type="text/javascript"></script>
<script src="/javascripts/effects.js?1229957682" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1229957682" type="text/javascript"></script>
<script src="/javascripts/controls.js?1229957682" type="text/javascript"></script>
<script src="/javascripts/general.js?1229957682" type="text/javascript"></script>
// end of creating an acount code
</body>
</html>