Re: mixture of GET and POST

From: Date: Tue, 03 Apr 2007 13:00:24 +0000
Subject: Re: mixture of GET and POST
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-251972@lists.php.net to get a copy of this message
Mainly you have to add a javascript to submit on click (plenty of them by searching on google). You don't need the href links (I think they're wrong anyway), you can just have # instead, and you should pass the params to the submit function. Simple search on google for your case: http://www.quirksmode.org/js/forms.html -- itoctopus - http://www.itoctopus.com "clive" <clive@rttc.co.za> wrote in message news:46120E76.5090109@rttc.co.za... > This has nothing to do with php, I suggest you read up on how html forms > work and you may need to learn some javascript. > > clive. > > > > > I have 3 'action' buttons and I am trying to send the $id from the radio > > button and the action to the same page so I can either, Add Edit or Remove > > the property from the database. > > > > Any ideas how I can get this to work? I can either POST the id's or GET the > > action but I can't seem to return both to the browser. > > > > Ta, > > > > > > R. > > > > -------------------------------------- > > > > <form id="form1" name="form1" method="post" > > action=""> > > > > <div id="button_holder"> > > > > <a href="?action=add&id=<?=$id;?>">Add Property</a> > > > > <a href="?action=remove">Remove Property</a> > > > > <a href="?action=edit">Edit Property</a> > > > > </div> > > > > <div id="table_header"> > > > > </div> > > > > > > > > <table id="properties_table"> > > > > <?php > > > > $query = "SELECT * FROM properties"; > > > > $result= mysql_query($query); > > > > while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)){ > > > > > > ?> > > > > <tr><td class="col_one"> <input type="radio" > > name="id" value="<? echo > > $row['property_id'];?>"></td> > > > > <td class="col_two"><?php echo > > $row['property_id'];?></td> > > > > <td class="col_one"><?php echo > > $row['address'];?></td> > > > > <td class="col_two"><?php echo > > $row['postcode'];?></td> > > > > <td class="col_one">£500</td> > > > > <td class="col_two">Live</td> > > > > </tr> > > > > > > <? > > > > > > } ?> > > > > </table> > > > > </form> > > > > > -- > Regards, > > Clive. > > Real Time Travel Connections > > > {No electrons were harmed in the creation, transmission or reading of > this email. However, many were excited and some may well have enjoyed > the experience.}

« previous php.general (#251972) next »