i understand the basic if statement as a beginner
if (TRUE){
//Do something
}
i think i have applied it and seems not to be working, i want to simply echo SUCCESSFUL when insert value to table:
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO enumdata (status) VALUES (%s)",
GetSQLValueString($_POST['text'], "text"));
mysql_select_db($database_RS, $RS);
$Result1 = mysql_query($insertSQL, $RS);
if($Result1(TRUE)){
echo'Successful';
}
$insertGoTo = "insert.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
This returns fatal error.
MYSQL Echo alternatively Echo Insert Successful
if( rowCount() == 1 ) Rows Affected//
echo successful