Retreiving HTML items with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PhpDog
Forum Commoner
Posts: 58
Joined: Mon Jan 14, 2008 10:23 am

Retreiving HTML items with PHP

Post by PhpDog »

I have a HTML with a form with a table (generated from a mysql database) which contains a checkbox called 'rowid' in each table row and a value of the appropriate rowid from the database.

I am passing the html form data to a php page and want to know how to retrieve the various rowids passed please.
User avatar
Weiry
Forum Contributor
Posts: 323
Joined: Wed Sep 09, 2009 5:55 am
Location: Australia

Re: Retreiving HTML items with PHP

Post by Weiry »

Code: Select all

<form method='POST' action='yourPHPpage.php'> <!--- Alternatively method='GET' -->
and

Code: Select all

$rowid = $_POST['rowid'];
// or alternately $_GET['rowid']
PhpDog
Forum Commoner
Posts: 58
Joined: Mon Jan 14, 2008 10:23 am

Re: Retreiving HTML items with PHP

Post by PhpDog »

Weiry wrote:

Code: Select all

<form method='POST' action='yourPHPpage.php'> <!--- Alternatively method='GET' -->
and

Code: Select all

$rowid = $_POST['rowid'];
// or alternately $_GET['rowid']
Many thanks for your reply. How can i then print out all the rowids passed please?
Marinusjvv
Forum Commoner
Posts: 29
Joined: Wed Dec 02, 2009 5:59 am

Re: Retreiving HTML items with PHP

Post by Marinusjvv »

echo $rowid;

Or am i missing something?
Post Reply