tags:

views:

103

answers:

4

I was wondering how can I grab the value from a hidden field using PHP?.

Here is the hidden field.

<input type="hidden" name="delete" value="' . $row['delete_id'] . '" />
+1  A: 

I assume the hidden field is in a form. So give it an id and do it like you normally would get the value from an input field

$_POST["delete"]
Rob
the `id` is relevant to JS only, for the POST only the `name` matters, and it's already there.
Lo'oris
Your totallry right, my bad..
Rob
+8  A: 

exactly like a non-hidden value.

$_POST["delete"]
Lo'oris
A: 

like $_REQUEST['delete']

nik
A: 

if you use post method use $_POST['delete']; if you use get method use $_GET['delete']; Or for both method use $_REQUEST['delete'];

cosy