Jump to content

help why is it doing this?


sooty2006

Recommended Posts

i have managed to make my first .asp script but it showing error 500 (internal server error) why?my host supports asp and many more scripting languages basic .asp scripts work but this script showing an error?

<%	'Green colorset	'BackgroundColor="#C9DDB3"	'BorderColor="#006600"		'Blue colorset	BackgroundColor="#AFD1F8"	BorderColor="#000080"		'Purple colorset	'BackgroundColor="#FDC8F2"	'BorderColor="#800080"		Content = ""							'Clear the Content string	QStr = Request.QueryString("login")		'Save the login querystring to QStr	if ucase(left(QStr,6))="CREATE" then 		Title = "Register"	else		Title = "Login"	end if		'The code below saves the contents the table must have in the variable Content	'The content depends on what's in the QueryString			if QStr="passfailed" then						Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Wrong password</P><A href=java script:history.go(-1)>Back</A></td></tr>"	elseif QStr="createpassfailed" then				Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Wrong password</P><A href=java script:history.go(-1)>Back</A><BR><BR><A HREF=login.asp>Cancel registration</A></td></tr>"	elseif QStr="namefailed" then		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Invalid username</P><A HREF=login.asp?login=createnew>Click here to create an acount</A><BR><BR><A HREF=java script:history.go(-1)>Back</A></td></tr>"	elseif QStr="createnamefailed" then		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Invalid username</P><A HREF=java script:history.go(-1)>Back</A><BR><BR><A HREF=login.asp>Cancel registration</A></td></tr>"	elseif QStr="creatednew" then		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Your account has been created</P><A HREF=login.asp>Login</A></td></tr>"	elseif QStr="createnew" then		Content = Content & "<form name=frmCreate method=POST action=create.asp>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Username: <input type=text name=txtUsername></td></tr>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center>Password: <input type=password name=txtPassword></td></tr>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Full name: <input type=text name=txtFullname></td></tr>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><input type=submit name=cmdSubmit value=Register></td></tr>"		Content = Content & "</form>"	else		Content = Content & "<form name=frmMain method=POST action=verify.asp>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Username: <input type=text name=txtUsername></td></tr>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center>Password: <input type=password name=txtPassword></td></tr>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><input type=submit name=cmdSubmit value=Login></td></tr>"		Content = Content & "</form>"		Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><A HREF=login.asp?login=createnew>Click here to create an acount</A></td></tr>"	end if%><!-- Build the page with the table --> <head>  <title>ASP Login</title></head><body link="<% Response.Write(BorderColor) %>" vlink="<% Response.Write(BorderColor) %>" alink="<% Response.Write(BorderColor) %>" text="<% Response.Write(BorderColor) %>"><br><div align="center">	<table border="2" cellspacing="5" bgcolor="<% Response.Write(BackgroundColor) %>" bordercolor="<% Response.Write(BorderColor) %>"width="250px">					<%	Response.Write("<tr><td valign=top align=center><b>" & Title & "</b></td></tr>")	Response.Write(Content)	 ' Paste the contents in the table	%>				</table>	</div>		</body>

thanks again,

Link to comment
Share on other sites

A 500 status code just means an error happened. IE usually displays a "friendly" error page (there's nothing friendly about an error, btw) which hides the actual error message from the server. If you're using IE to test, either find an option to disable the friendly error messages or use another browser so that you can see the actual error message and the line that it happens on. IE's default error page doesn't give any information that is useful for fixing the problem.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...