Hallo All,
Ich habe ein großere probleme mit mein PHP&mysql scripts. Ich kann gar nicht weiter kommen.Bitte hilfen Sie mir.
die fehler sind,::
The query is: INSERT into sizangx2003 values ('','','','')
The query was successfully excuted!
hier sind meine Scripts:
//index.html
//insert.php
//show.php
Ich danke Ihnen im Voraus;
Zomi.
Ich habe ein großere probleme mit mein PHP&mysql scripts. Ich kann gar nicht weiter kommen.Bitte hilfen Sie mir.
die fehler sind,::
The query is: INSERT into sizangx2003 values ('','','','')
The query was successfully excuted!
hier sind meine Scripts:
//index.html
PHP-Code:
<html>
<head>
<title>2002-2003 tan X Standard ong teng</title></head>
<body>
<div style="font-family:arial; text-align:center"><h2>
</h2>
Bitte füllen Sie die Felder aus. Vielen Dank!</div>
<div style="font-family:arial">
<form method="post" action="insert.php">
<table border="0">
<tr>
<td>Min(Lia/Tg Type tu)</td>
<td><input type=Text Name="Min"></td></tr>
<br>
<td>Pamin</td><br>
<td><input type="text" name="Pamin"></td>
<br>
<td>Khuamin</td>
<td><input type="text" name="Khuamin"></td>
<br>
<td>Distinction</td>
<td><input type="text" name="Distinction"></td>
<br>
<td><input type="submit" value="Abschicken">
<input type="reset" value="Löschen"></td></tr>
</table>
</form></div>
</body></html>
PHP-Code:
<?
$host="localhost";
$user="mysqltest";
$pass="spider";
$dbname="mysqltest";
$tablename="sizangx2003";
$link =mysql_connect ($host,$user,$pass);
$query ="INSERT into $tablename values ('$Min','$Pamin','$Khuamin','$Distinction')";
echo ("The query is:<br>$query<p>\n");
if(mysql_db_query ($dbname,$query,$link))
{
echo("The query was successfully excuted!<br>\n");
}
else
{
echo("The query could not be excuted!<br>\n");
}
mysql_close($link);
?>
PHP-Code:
<?PHP
$db = mysql_connect("localhost","mysqltest","spider") or die("Problem connecting");
mysql_select_db("mysqltest") or die("Problem selecting database");
$query = "SELECT * FROM sizangx2003 ORDER BY Min";
$result = mysql_query($query) or die ("Query failed");
//let's get the number of rows in our result so we can use it in a for loop
$numofrows = mysql_num_rows($result);
?>
<?PHP
echo "<TABLE BORDER=\"1\">\n";
echo "<TR bgcolor=\"silver\"><TD>Name</TD><TD>Pamin</TD><TD>Khuamin</TD><TD>Distinction</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++)
{
$row = mysql_fetch_array($result); //get a row from our result set
if($i % 2) //this means if there is a remainder
{
echo "<TR bgcolor=\"white\">\n";
}
else
{ //if there isn't a remainder we will do the else
echo "<TR bgcolor=\"white\">\n";
}
echo "<TD>".$row['Min']."</TD> <TD>".$row['Pamin']."</TD> <TD>".$row['Khuamin']."</TD> <TD>".$row['Distinction']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
Ich danke Ihnen im Voraus;
Zomi.
EDIT:
php.tags powered by Abraxax
Kommentar