How would i output a message that says "values inserted to table" ?
- by ranlo
<?php
error_reporting(0);
$con=mysql_connect("localhost","root","");
if (!$con) {
die('could not connect:'.mysql_error());
}
mysql_select_db("final?orgdocs",$con);
$org_name = $_POST["org_name"];
$org_type = $_POST["org_type"];
$org_code = $_POST["org_code"];
$description = $_POST["description"];
$stmt = "INSERT INTO organization
VALUES('".$org_name."','".$org_type."','".$org_code."','".$description."')";
$result = mysql_query("SELECT * FROM organization WHERE org_name = '$org_name' ");
echo '<TABLE BORDER = "1">';
$result1 = $result;
while ($row = mysql_fetch_array($result1)){
echo '<TR>'.'<TD>'.'Organization Name'.'</TD>'.'<TD>'.'Organization Type'.'</TD>'.'<TD>'.'Organization Code'.'</TD>'.'<TD>'.'Description'.'</TD>'.'<TD>'.'Constitution'.'</TD>';
echo '</TR>';
echo '<TR>'.'<TD>'.$row['org_name'].'</TD>'.'<TD>'.$row['org_type'].'</TD>';
echo '<TD>'.$row['org_code'].'</TD>'.'<TD>'.$row['description'].'</TD>'.'<TD>';
echo '</TR>';
}
echo '</TABLE>';
?>