<?
echo '<html>
<script language=javascript>
function validate()
{
alert("validate");
document.form1.action="validate.php";
document.form1.submit();
return false;
}
function del()
{
alert("delete");
document.form1.action="delete.php";
document.form1.submit();
return false;
}
</script>
<style>
.id
{
background-image:url("http://localhost/troubleshoot/imges/bg1.jpg");
background-position:center;
background-repeat:no-repeat;
background-size:2000px 2000px;
border-radius:5px;
}
table
{
border-radius:5px;
}
.id1
{
border-radius:5px;
background-color:DDDDDD;
}
id3
{
padding-top:5em;
padding-bottom:5em;
height:40px;
}
.id2
{
text-shadow:0px 0px 5px black;
color:#FFFFDD;
font-size:20;
font-style:bold;
}
</style>
<body>
<table width=70% align=center>
<td><img src="http://localhost/troubleshoot/imges/banner.jpg" height=150 width=100% style="border-radius:5px">
</table>
<table width=70% bgcolor=#3E638C align="center" border=0 style="border-radius:5px;" cellspacing=20>
<tr><td align="center"><a href="home.html"><font color=white>Home</a></td>
<td align="center"><a href="about.html"><font color=white>About Us</a></td>
<td align="center"><a href="articles.html"><font color=white>Articles</a></td>
<td align="center"><a href="work.html"><font color=white>Work</a></td>
<td align="center"><a href="contact.html"><font color=white>Contact Us</a></td>
</tr></table>';
$c=mysql_connect("localhost","root","");
mysql_select_db("troubleshoot",$c);
$q=mysql_query("select * from clientbugandsol");
$count=mysql_num_rows($q);
echo "<table width=70% align=center border=1 style='border-radius:5px;'>
<tr><td width=100% align=center> <font face=algerian color='#A52A2A'>There are $count bugs received</tr>
<tr><td>";
$i=1;$j=0;
while($s=mysql_fetch_row($q))
{
echo "<form name=form1 method=post>
<table width=90% bgcolor='#6CDAF5' align=center>
<tr><th align=left> Bug $i: </tr>
<tr><td>Username: <td> <input type=text value='$s[0]' name=username> </td></tr>
<tr><td>User email-id: <td><input type=text value='$s[1]' name=email> </td></tr>
<tr><td>User Contact-no :<td><input type=text value='$s[2]' name=contactno> </td></tr>
<tr><td>Bug: <td><textarea rows=5 cols=40 name=bug>$s[3]</textarea></td></tr>
<tr><td>Bug-Reason: <td><textarea rows=5 cols=40 name=text1>$s[4]</textarea></td></tr>
<tr><td>Bug-Solution:<td><textarea rows=5 cols=40 name=text2>$s[5]</textarea></td></tr>
<tr><td>Updated-date:<td><input type=text value='$s[6]' name=date></td></tr>
<tr><td width=100% align=right colspan=2><input type=submit value='add this bug with main bugs' OnClick='validate()'>
<input type=submit name=delete value='delete this bug' OnClick='del()'></tr>
</table><br></form>";
}
echo '
</body>
</html>';
?>
<html>
</html>
我无法加载资源错误..在执行此代码时,在javascript document.form1.action 中不起作用....所以它不会重定向到另一个页面..我必须清除这个...请帮助我