Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am really noob for web and just got jumped in the middle of it... so there are my code which is working perfectly without wordpress..but if i use it with a custom template the buttons actions didnt work, just 404 error always or get to to main page.

 if ($action == "turnOn"){
        $setting = "1";
    mysql_query("UPDATE pinStatus SET pinStatus='$setting' WHERE pinNumber='$pin';");
    mysql_close();
    **header('Location: etc.php');**

php page called etc.php and i dont know what i have to write to the location to work and come back to the same page. Also the same problem with action....

<form name="pin' . $pinNumber . '" action="control.php" method="get">

i read a lot and there are several posts about it, i have tried almost everythin but cant get work..hope somebody can help me :(

share|improve this question
it's not entirely clear what the flow should be, you want to post to a different page, but get redirected back to the originating page? if you just want to post to the same page, remove the action attribute entirely. – Milo Mar 14 at 16:16

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.