Hi I am trying to build a site. I am very familiar with how to work around a database but I am not all that great with php I know the basics but as far as making my own login system....I can't do it. Well right now anyways that is where you guys come in!
I need help especially with creating a script to manage a bunch of articles cause the site I am building is an informative site. We do have message boards but I don't need a login thing for the members except for on the forums! I don't want anyone posting articles on this site. Just the people like me who are getting paid to put up articles!
right now this is my script for my administration section for the article management......again i am just a novice so take it easy with your corrections.
<html>
<?php
require_once('db_login.php');
?>
<title>
<?php
$doc_title = 'Administration';
echo "$doc_title\n";
?>
</title>
</head>
<body>
<h1>
<?php
echo "$doc_title\n";
?>
</H1>
<?php
$Cat_ID = $REQUEST['Cat_ID'];
$Cat_Title = $REQUEST['Cat_Title'];
$add_record = $_REQUEST['add_record'];
$len_cat_id = strlen($_REQUEST['Cat_ID']);
$len_cat_tl = strlen($REQUEST['Cat_Title']);
if ($add_record == 1) {
if (($len_cat_id > 0) and ($len_cat_tl > 0) and ($len_cat_de > 0)){
$sql = "insert into article_cat (category_id, title)";
$sql .= " values ('$Cat_ID', 'Cat_Title')";
$result = $db->query($sql);
$db->commit();
} else {
echo "<p>Please make sure all fields are filled ";
echo "and try again.</p>\n";
}
}
$sql = "select * from categories";
?>
<form method="POST" action="cat_admin.php">
<table>
<tr><th bgcolor="#EEEEEE">Cat ID</th>
<th bgcolor="#EEEEEE">Title</th>
</tr>
<tr><td><input type="text" name="Cat_ID" size="15" maxlength="10"></td>
<td><input type="text" name="Cat_Title" size="40" maxlength="128"></td>
</tr>
</table>
<input type="hidden" name="add_record" value="1">
<input type="submit" name="submit" value="Add Category">
</body>
</html>
it is just suppose to show categories from my database but it won't let me add any categories!! I tried it and it didn't work! So please if someone could help me I would greatly appreciate it!!
If you have an other questions just ask me.......I will be more than glad to answer your questions. Thank you!
~Adam~!