Page 1 of 1

two submit buttons [solved]

Posted: Sat Apr 01, 2006 1:06 pm
by s.dot
I am writing a blogging system, with a preview blog button and a save blog button

the first button (preview blog) works and goes to the page
the second button (save blog) goes to a 404 page not found error (the url in the address bar is correct)

Code: Select all

<form action=\"worker_blog.php\" method=\"post\" name=\"frmPost\">
<input type=\"hidden\" name=\"action\" value=\"createBlog\">

//form elements

<input class=\"submit\" type=\"submit\" name=\"Preview\" value=\"Preview\"> 
<input class=\"submit\" type=\"submit\" name=\"Save\" value=\"Save Blog\">
what could be causing this? I don't get any errors at all from the php code

Posted: Sat Apr 01, 2006 1:18 pm
by s.dot
when i get the 404 not found page, I hit refresh and the page shows up, however it doesn't show me the prompt for resending post data.. so im guessing its not being posted :-S

Posted: Sat Apr 01, 2006 1:23 pm
by s.dot
meh

seems if i change it to this

Code: Select all

<input class=\"submit\" type=\"submit\" name=\"submit\" value=\"Preview\"> 
<input class=\"submit\" type=\"submit\" name=\"submit\" value=\"Save Blog\">
it works fine. thanks ;)