ASP tagwall - HTTP Error 404
Først lavede jeg min tagwall i en Access database, men da den ikke kan køre på mit webhotel måtte jeg få lavet den om til MySQL. (Har dog ikke meget erfaring med dette)Men her er den fejl jeg får, er uvis om hvordan den skal løses:
"
HTTP Error 404
404 Not Found
The Web server cannot find the file or script you asked for. Please check the URL to ensure that the path is correct.
Please contact the server's administrator if this problem persists.
"
Mit script er følgende: (sikkert også fyldt med fejl)
</head>
<form method="post" action="tagwall.asp" id=form1 name=form1>
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=jb777;UID=****;PWD=****;"
objConn.Open
SQL = "SELECT * FROM Tagwall"
Set RS = objconn.Execute(SQL)
%>
<body>
<Center>
<img src="Pics/overskrifter/tagwall.jpg" width="400" height="40">
<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
'Smider værdierne ned i variabler
tag_navn = Request("tag_navn")
tag_email = Request("tag_email")
tag_url = Request("tag_url")
tag_header = Request("tag_header")
tag_besked = Request("tag_besked")
tag_comment = Request("tag_comment")
fontcolor = Request("fontcolor")
fonttype = Request("fonttype")
'Tjecker om navn og tag er udfyldt
if tag_navn = "" then
Response.Write("Fill out your name<br>")
end if
if tag_header = "" then
Response.Write("Fill out the header<br>")
end if
if tag_besked = "" then
Response.Write("Fill out a message<br>")
end if
'Tilføjer til databasen hvis navn og tag er udfyldt
if tag_navn <> "" AND tag_header <> "" AND tag_besked <> "" then
rs.AddNew
rs("tag_navn") = tag_navn
rs("tag_email") = tag_email
rs("tag_url") = tag_url
rs("tag_header") = tag_header
rs("tag_besked") = tag_besked
rs("tag_comment") = tag_comment
rs("fonttype") = fonttype
rs("fontcolor") = fontcolor
rs("tag_date") = Now()
rs.update
'Opdaterer vinduet
Response.Redirect("Tagwall.asp")
end if
end if %>
<table width="748" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="8" height="19"></td>
<td width="55"></td>
<td width="151"></td>
<td width="15"></td>
<td width="9"></td>
<td width="33"></td>
<td width="132"></td>
<td width="10"></td>
<td width="8"></td>
<td width="44"></td>
<td width="5"></td>
<td width="31"></td>
<td width="41"></td>
<td width="21"></td>
<td width="127" valign="top"><div align="right">Version 0.0.8</div></td>
<td width="58"> </td>
</tr>
<tr>
<td height="22"></td>
<td valign="top"><strong>Navn:</strong></td>
<td colspan="3" valign="top"><input name="tag_navn" type="text" value="<%=Request("tag_navn")%>" size="25" autocomplete="no"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="2" valign="top"><strong>Optional:</strong></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="24"></td>
<td valign="top"><strong>Email:</strong></td>
<td colspan="2" valign="top"><input name="tag_email" type="text" id="tag_email" value="<%=Request("tag_email")%>" size="25" autocomplete="no"></td>
<td colspan="2" valign="top"><strong>URL:</strong></td>
<td colspan="3" valign="top"><input name="tag_url" type="text" id="tag_url" value="<%=Request("tag_url")%>" size="25" autocomplete="no"></td>
<td> </td>
<td> </td>
<td> </td>
<td colspan="2" valign="top"><strong>Font:</strong></td>
<td valign="top"><select name="fonttype">
<option value="Arial" selected>Arial </option>
<option value="Arial Black">Arial Black </option>
<option value="Arial Narrow">Arial Narrow </option>
<option value="Book Antiqua">Book Antiqua </option>
<option value="Bookman Old Style">Bookman Old Style </option>
<option value="Century Gothic">Century Gothic </option>
<option value="Comic Sans MS">Comic Sans MS </option>
<option value="Courier">Courier </option>
<option value="Courier New">Courier New </option>
<option value="DigitMed">DigitMed </option>
<option value="DigitSmall">DigitSmall </option>
<option value="Fixedsys">Fixedsys </option>
<option value="Garamond">Garamond </option>
</select></td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td valign="top"><strong>Header:</strong></td>
<td colspan="8" valign="top"><input name="tag_overskrift" type="text" value="<%=Request("tag_header")%>" size="69" autocomplete="no"></td>
<td> </td>
<td> </td>
<td colspan="2" valign="top"><strong>Color:</strong></td>
<td valign="top"><select name="fontcolor">
<option value="000000">Sort </option>
<option value="FFFFFF">Hvid </option>
<option value="0000FF">Blå </option>
<option value="FF0000">Rød </option>
<option value="00FF00">Grøn </option>
<option value="FF00FF">Lilla </option>
<option value="008800">Mørk grøn </option>
<option value="000088">Mørk blå </option>
<option value="880000">Mørk rød </option>
<option value="008888">Mørk turkis </option>
<option value="880088">Mørk lilla </option>
<option value="8A2BE2">Blåviolet </option>
<option value="D2691E">Brun </option>
<option value="FFFF00">Gul </option>
<option value="FFD700">Guld </option>
<option value="FF8C00">Mørk orange </option>
<option value="808000">Oliven </option>
<option value="FFA500">Orange </option>
<option value="00BFFF">Skyblå </option>
<option value="00FF7F">Sommergrøn </option>
<option value="EE82EE">Violet </option>
<option value="fuchsia">Fuchsia </option>
</select></td>
<td></td>
</tr>
<tr>
<td height="19"></td>
<td colspan="6" rowspan="4" valign="top"><textarea name="tag_besked" cols="60" rows="5" wrap="VIRTUAL"><%=Request("tag_besked")%></textarea></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td></td>
<td colspan="2" valign="top"><strong>Smily:</strong></td>
<td rowspan="4" valign="top"><!--DWLayoutEmptyCell--> </td>
<td></td>
</tr>
<tr>
<td height="42"></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td></td>
<td colspan="3" valign="top"><input name="submit" type="submit" value="Submit"></td>
<td> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="17"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="19"></td>
<td valign="top"><strong>Tag's:</strong></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td></td>
<td></td>
<td></td>
<td> </td>
<td></td>
</tr>
<tr>
<td height="148"></td>
<td colspan="14" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<%
'Hvis der ingen tags er
if rs.eof then
Response.Write "No tag's in the database"
%>
<% else
'Lopper alle tags igennem med en løkke
Do until rs.eof
tag_navn = rs("tag_navn")
tag_email = rs("tag_email")
tag_url = rs("tag_url")
tag_header = rs("tag_header")
tag_besked = rs("tag_besked")
tag_comment = rs("tag_comment")
fonttype = rs("fonttype")
fontcolor = rs("fontcolor")
%>
<tr>
<td width="80" height="19" valign="top">nr:</td>
<td colspan="2" valign="top">Date:</td>
<td width="301" rowspan="3" valign="top">Comment:</td>
</tr>
<tr>
<td height="19" colspan="2" valign="top">Name:</td>
<td width="190" valign="top">Url:</td>
</tr>
<tr>
<td height="19" colspan="3" valign="top">Header:</td>
</tr>
<tr>
<td height="60" colspan="4" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="19" colspan="4" valign="top" bgcolor="#CCCCCC"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="1"></td>
<td width="111"></td>
<td></td>
<td></td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td height="29"></td>
<td> </td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="19"></td>
<td> </td>
<td> </td>
<td colspan="10" valign="top"><strong>UNDER CONSTRUCTION!</strong></td>
<td> </td>
<td></td>
<td></td>
</tr>
<% rs.movenext
loop
end if %>
</table>
</Center>
</body>
</html>
Forslag til hvad det kan være? - Måske noget i min MySQL database?