Jump to content
Sign in to follow this  
exodusyka

aiz linka ?submit=

Recommended Posts

Hey, saskāros ar problēmu, paņēmu netā gatavu ACP template, un tagad rakstu klāt backendu. Un problēma ir tāda ka man ir poga dzēst komandu iekš acp

  if(isset($_POST["submita"]))
  {

      $sqa1 = "DELETE FROM `team` WHERE `id`='$id'";
      $sqa2 = "DELETE FROM `team_members` WHERE `team_id`='$id'";

       if (mysqli_query($con,$sqa1)==TRUE && mysqli_query($con,$sqa2)==TRUE){
        header("location: /acp/teamslist");
      }

  
  }
<form method="post" action=""><input type="submit" name="submita" class="btn btn-primary" value="Dzēst!"></form>

 

Un uzspiežot uz tās pogas, sākuma lapā, kas nav ACP viss darbojas un nostrādā, šeit spiežot man nekas nenotiek, bet links pārtop par šo 

http://localhost/acp/team/1?submita=Dzēst!

Es gribu lai man viss nostrādā, bet nekas nenostrādā, kur ir vaina? Kāds varbūt zin

Share this post


Link to post
Share on other sites

Tāpēc, ka forma, kas taisa linku ?submita=Dzēst! nav POST metodes forma, bet gan get :)

Parādi katru formu atsevisķi.

  • Upvote 1

Share this post


Link to post
Share on other sites

Man kodā nav citas formas.

Tur jau tā problēma, ka man citu formu nav.

 

Atradu , bija kaut kāda cita forma mistiska, bet arī post. To noņemot viss aizgāja. :)

Edited by inadatequate

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.