Page 1 of 1

Retreiving HTML items with PHP

Posted: Thu Dec 03, 2009 7:00 am
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.

Re: Retreiving HTML items with PHP

Posted: Thu Dec 03, 2009 7:06 am
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']

Re: Retreiving HTML items with PHP

Posted: Thu Dec 03, 2009 7:50 am
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?

Re: Retreiving HTML items with PHP

Posted: Thu Dec 03, 2009 8:39 am
by Marinusjvv
echo $rowid;

Or am i missing something?