[SOLVED]ACP notepad
Posted: Sat May 19, 2007 11:53 am
i am creating a mysql-connected notepad on my admin control panel
and i need help getting the info from mysql to the webpage
the tutorials on the web are on a notepad using a text file, not mysql
this is my code so far
and in the textarea i am echoing $result and i get a resource id
please help me.
and i need help getting the info from mysql to the webpage
the tutorials on the web are on a notepad using a text file, not mysql
this is my code so far
Code: Select all
<?php
$_POST['notes'] = $notes;
$result = mysql_query("SELECT `notes` FROM `acp` WHERE `notes`= '$notes'");
if (isset($notes)) {
$rows = mysql_num_rows($result);
if ($rows == 0) {
$query = mysql_query("INSERT INTO `acp` (`notes`) VALUES ('$notes')");
}
else {
$query = mysql_query("UPDATE `acp` SET `notes` = '$notes'");
}
}
?>please help me.