phpmyadmin is only a php module that manages mysql...(Meaning, its only a set of php files.)
i rarely use an SQL DB.
I prefer flat file DB myself..
Ive found there's less code involved and they only en=mploy php or whatever other server side language you want.
For example, my comment system.
"Submit.php"(includes directory)
PHP Code:
<hr /><?php
if ($_POST['opt'] == "sub") {
$bad = array("#","|");
$gtlt = array("<",">");
$ampcode = array("<",">");
$name = $_POST['name'];
$mail = $_POST['mail'];
$text = $_POST['text'];
if ($name == "") {echo "Name Required.";}
else {
$name = str_replace($bad , " " , $name);
$mail = str_replace($bad , " " , $mail);
$text = str_replace($bad , " " , $text);
$all = $name ."|". $mail ."|". $text ."\r\n";
$fin = stripslashes(str_replace($gtlt , $ampcode , $all));
$prev = file_get_contents("comment.txt");
if ($prev == "") {
$combined = $fin;
} else {
$exploded = explode("#", $prev);
$done = array_merge(array($fin), $exploded);
$combined = implode("#", $done);
};
$handle = fopen("comment.txt","w+");
fwrite($handle , $combined);
fclose($handle);
echo "Comment Posted.";
};
} elseif (($_POST['opt'] == "del") && ($_POST['pass'] == "mod password")) {
if ($_POST['num'] == "wipe") {
$handle = fopen("comment.txt","w");
fclose($handle);
echo "Deleted.";
} else {
$delnum = $_POST['num'];
$contents = file_get_contents("comment.txt");
$contents = explode("#" , $contents);
unset($contents[$delnum]);
$towrite = implode("#" , $contents);
$handle = fopen("comment.txt","w+");
fwrite($handle , $towrite);
fclose($handle);
echo "Comment ". $delnum ." Deleted.";
};
} else {echo "Invalid Option.";};
?><hr />
"Veiw.php"(base directory)
PHP Code:
<div style="width:400px;margin:0 auto;">
<a href="URL To Forms...">Post A Comment</a>
<?php
$full = file_get_contents("includes/comment.txt");
$ready = explode("#", $full);
$count = "0";
while (($count >= "0") && ($count <= count($ready)-1)) {
echo "<hr />";
$set = explode("|", $ready[$count]);
echo $count ." - ". $set['1'] ." <b>". $set['0'] ."</b>\r\n";
echo "<div>". $set['2'] ."</div>\r\n";
$count++; };
?></div>
Forms
base directory)
HTML Code:
<h4>Add A Comment</h4>
<form action="includes/submit.php" method="post">
<div><input type="hidden" name="opt" value="sub" />
Name:<input type="text" name="name" /><br />
Title:<input type="text" name="mail" /><br />
Entry:<textarea name="text" rows="10" cols="40"></textarea>
<br />
<input type="submit" value="submit" /></div></form>
<hr />
<h4>Delete A Comment</h4>(Disregard This, Moderates Comments)
<form action="includes/submit.php" method="post">
<div><input type="hidden" name="opt" value="del" />
Number:<input type="text" name="num" />
Password:<input type="text" name="pass" />
<input type="submit" value="submit" /></div></form>
Bookmarks