Welcome to www.HAS.lv - programmējam HTML.

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
inadatequate

aiz linka ?submit=

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

0

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.

1

Share this post


Link to post
Share on other sites

Posted (edited)

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
0

Share this post


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