Deleting (crud)

please i was learning on the delete part, and i deleted about 2 subjects i had created, then i tried to creat another one , and the create file refused to open on ( The requested URL /~mgltd/easy/new_subject.php was not found on this server.)could it be linked to the deleted file

That… was a very long runon sentence that made little sense. Slow down, explain what you’re talking about, and probably need to show us the code you used.

i was learning on how to do crud,
after the create, read, and update
all my file was alright and opening,
but when i finished the delete
i tried to create another subject but the server could not find the file

What line are you executing that caused this error?

really , when i try to open the page(new_user.php), thats when the error come up, but this page was working perfectly alright

<?php require_once("include/connection.php"); ?>
<?php require_once("include/functions.php"); ?>
<?php include("include/header.php"); ?>
<div id="navigation">
<?php echo navigation($select_subject, $select_page); ?>
</div> <!--end of navigation div -->

<div id="bodycontent">
<h2>Add Subject</h2>
<form action="create_subject.php" method="post">
<p>Subject name:
<input type="text" name="menu_name" value="" id="menu_name" />
<select name="position">
$subject_set = get_all_subjects();
$subject_count = mysql_num_rows($subject_set);
//$count+1 bcos we are adding a subject
for($count=1; $count <= $subject_count+1; $count++) {
   echo "<option value=\\"{$count}\\">{$count}</options>";
   <input type="radio" name="visible" value="0" /> No
   <input type="radio" name="visible" value="1" /> yes
   <input type="submit" value="Add Subject" />
   <br />
   <a href="contents.php">Cancel</a>
<?php require("include/footer.php"); ?>

Well it might have something to do with the fact that your form is calling create_subject.php and your error says new_subject.php… I dont see anything there that calls for new_subject.php…

below is my create file, thanks

<?php require_once("include/connection.php"); ?>
<?php require_once("include/functions.php"); ?>
$errors = array();
// form validation
$required_fields = array('menu_name', 'position', 'visible');
foreach($required_fields as $fieldname){
if (!isset($_POST[$fieldname]) || empty($_POST[$fieldname])) {
     $errors[] = $fieldname;
     $fields_with_lenghts = array('menu_name' => 30);
     foreach($fields_with_lenghts as $fieldname => $maxlength ) {
     if(strlen(trim(mysql_prep($_POST[$fieldname]))) > $maxlength) {
     $errors[] = $fieldname;}
     if(!empty($errors)) {
	$menu_name = mysql_prep($_POST['menu_name']);
	$position = mysql_prep($_POST['position']);
	$visible = mysql_prep($_POST['visible']);
$query = "INSERT INTO subjects (
			menu_name, position, visible
			) VALUES (
			'{$menu_name}', {$position}, {$visible}
			$result = mysql_query($query, $connection);
			if ($result){
			header("Location: contents.php");
			} else{
			//display error.
			echo "<p>Subject creation failed.</p>";
			echo "<p>" . mysql_error() . "</p>";


<form action="[COLOR="red"][B]create_subject.php[/B][/COLOR]" method="post">

The requested URL /~mgltd/easy/new_subject.php was not found on this server

The error and the code you posted are not connected. The error is caused by another script. Search in your scripts for ‘new_subject.php’ and change it into create_subject.php’

ok, thanks i will do that