8 replies [Last post]
Coder101
Offline
Regular
Last seen: 17 years 51 weeks ago
Joined: 2005-02-14
Posts: 36
Points: 0

Ok here is my form code:

<body>
<h4>
News Admin Log-in
</h4>
<form name="Form1" method="Post" action="../LeftBars/LeftBarNews.php">
<input type="password" name="pass">
<input type="submit" value="Log-In">
</form>
</body>

I have set it so one password is acceptable and when I type it it should take me to another form where I can add news into a database. Instead it takes me to a 404 error page. The file exists and is in that directory so that is fine.
Here is the next page.
<?
include ('functions.php');
Head();
PageInfo();
MyHeader();
LeftBarNews();
//MainContentIndex();
ClosePageInfo();
?>

In the LeftBarNews function I have included this file.
<?
$date = date("F j, Y, g:i a");
$pass = $_POST['pass'];
if ($pass == "***") {
?>
<body bgcolor="black" color="#640000">
<form name="News" method="post" action="../News Items/Insert_News.php">
<label for="title">
Title:
</label>
<input type="text" name="title" class="text"><br>
<input type="hidden" name="date" value="<?=$date ?>">
<label for="type">
Type:
</label>
<select name="type">
<option value="1">Site News</option>
<option value="2">Band News</option>
</select><br>
<label for="caption">
Caption:
</label>
<textarea name="caption" cols="30" class="caption">
</textarea><br>
<label for="body">
Body:
</label>
<textarea name="body" cols="30" class="body" wrap="hard">
</textarea><br>
<label for="author">
Author:
</label>
<input type="text" name="author" class="text1" value="Mike Garratt"><br>
</form>
</body>
<?
} else {
echo ("Login Right");
}
?>

Anyone see what is up. Please don't comment on the amount of files I have for such a small task.

I may be different... but you are all the same.

Tags:
Anonymous
Anonymous's picture
Guru

Re: Upon being submitted form brings up 404 error page.

Coder101 wrote:
...Instead it takes me to a 404 error page. The file exists and is in that directory so that is fine...
404 means the file doesn't exist in the place the web page is looking for it. So, I don't know what to tell you. Link us to the page and I'll poke around a bit.

Coder101
Offline
Regular
Last seen: 17 years 51 weeks ago
Joined: 2005-02-14
Posts: 36
Points: 0

Upon being submitted form brings up 404 error page.

The link is members.lycos.co.uk/rockmania. It should work even if you don't enter a password. It's the "News Admin Log-in Form". The file does exist where it is supposed to be so I'm wondering if it's on the host's side.

I may be different... but you are all the same.

Anonymous
Anonymous's picture
Guru

Upon being submitted form brings up 404 error page.

Coder101 wrote:
The link is members.lycos.co.uk/rockmania. It should work even if you don't enter a password. It's the "News Admin Log-in Form". The file does exist where it is supposed to be so I'm wondering if it's on the host's side.
The code you have up above isn't even close to what is on the page.
<body>
	<h4> 
		News Admin Log-in
	</h4>
		<form name="Form1" method="post" action="/data/members/free/tripod/uk/r/o/c/rockmania/htdocs//News.php">
			<input type="password" name="pass">
			<input type="submit" value="Log-In">
		</form>
</body>

You also have multiple body tags and no closing html tag and no doctype.

Coder101
Offline
Regular
Last seen: 17 years 51 weeks ago
Joined: 2005-02-14
Posts: 36
Points: 0

Upon being submitted form brings up 404 error page.

<form name="Form1" method="post" action="/data/members/free/tripod/uk/r/o/c/rockmania/htdocs//News.php">

I singled out this line of code. When I went into my page and hit view source this is what popped up. Tripod obviously has some weird method of directories that they don't tell me about and for some reason it adds an extra backslash right before News.php. Or is that supposed to be there? What is going on?

I may be different... but you are all the same.

Coder101
Offline
Regular
Last seen: 17 years 51 weeks ago
Joined: 2005-02-14
Posts: 36
Points: 0

Upon being submitted form brings up 404 error page.

Whoops, sorry didn't see your post there, must've been at about the same time as mine. Tripod seems to think that is my default directory. I have multiple body tags so I can preview the site without uploading it, they will be taken out when the hard copy is finished.

I may be different... but you are all the same.

Anonymous
Anonymous's picture
Guru

Upon being submitted form brings up 404 error page.

Coder101 wrote:
Whoops, sorry didn't see your post there, must've been at about the same time as mine. Tripod seems to think that is my default directory. I have multiple body tags so I can preview the site without uploading it, they will be taken out when the hard copy is finished.
You can preview the site without uploading it anyway...why would extra body tags help with that?

Coder101
Offline
Regular
Last seen: 17 years 51 weeks ago
Joined: 2005-02-14
Posts: 36
Points: 0

Upon being submitted form brings up 404 error page.

Oh... it's for the colors. Because it's an include it won't apply my style and change the colors unless it's being processed through the main page Smile. I put the body tag in so I could change my background color.

I may be different... but you are all the same.

Coder101
Offline
Regular
Last seen: 17 years 51 weeks ago
Joined: 2005-02-14
Posts: 36
Points: 0

Upon being submitted form brings up 404 error page.

Now I see what you mean. I don't even change colors on the news log-in form. MY BAD!

I may be different... but you are all the same.