Log in

View Full Version : is it possible to use links for POST info??



auriaks
11-25-2009, 06:11 PM
hi,
I need to create a link, which would work as button for POST method... Is it possible?
Because then i will use images for their nice appearance.
Thanks.

jscheuer1
11-25-2009, 06:22 PM
You could make a form with method post with an input type=image as a submit button and a input type=hidden for the data. Otherwise you would need javascript to either do something AJAX'y or to submit a hidden form with the method post.

auriaks
11-25-2009, 06:40 PM
I have 2 forms...
<form action='forumas_pr.php?id=$id' method='post' enctype='multipart/form-data'>
<form action='forumas_pr.php?id=$id' method='post' enctype='multipart/form-data'>
if I push oe of them, my php wont kow which I pushed, because each button has different effect... How I can make difference bettween them? 1.) method='post' 2.) method='post2' ??

bluewalrus
11-25-2009, 06:57 PM
Give the forms names. <form name="">

Also don't put variables in single quotes they wont be parsed.

auriaks
11-25-2009, 07:09 PM
php is: if(isset($_POST['submit'])) so how I can change that?