Jump to content
php.lv forumi

form submit


mach1ne^

Recommended Posts

<form method="post" action="http://lapa.lv">
// input lauki ieskaitot submit
</form>

Nospiežot submit būs automātisks action uz noteikto lapu, bet vai ir iespēja aizsūtīt formas laukus un paliekot tajā pašā lapā?

 

Vienkarshi:

 

Lapas augshpusee ieliec kodu

if (!isset($_POST["tava_input_lauka_name"]))
{
//Ja neeksistee post, tad izvadam vienkarshi formu
echo  "<form method='post' action='http://lapa.lv'>
</form>";
}
else 
{
//ja tomeer eksistee, tad apstraadaajam datus taalaak
$tava_input_lauka_name=$_POST["tava_input_lauka_name"];
}

Link to comment
Share on other sites

bubu, varētu palūgt kādu piemēru?

Morphius, man nevajag uz manu lapu aizsūtīt, bet gan uz citu lapu, kurā pie php failiem klāt netieku. :)

 

EDIT: Paldies, nevajag, tomēr atradu pats piemērus.

Edited by mach1ne^
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...