Cyberoonie
08-08-2007, 05:21 PM
Hi,
I've been playing around trying to get a php variable to work as a value in a HTML form.
What I have is the form on a page called usercomment.php?cmd=viewrecord&id=xx where xx is a number for example 10.
I want the HTML form to be able to send the id via a $_GET['id'] as a value in a hidden field. The code I have tired is:
<form action="postcomment.php" method="post" enctype="multipart/form-data" name="internalcomment">
<input name="recordid" type="hidden" value="<?php $_GET[id];?>">
It doesnt work as it doesnt send the id number. If I physically write the value 10 in the entire script works fine, I just cant get it to send a variable id value.
Thanks
I've been playing around trying to get a php variable to work as a value in a HTML form.
What I have is the form on a page called usercomment.php?cmd=viewrecord&id=xx where xx is a number for example 10.
I want the HTML form to be able to send the id via a $_GET['id'] as a value in a hidden field. The code I have tired is:
<form action="postcomment.php" method="post" enctype="multipart/form-data" name="internalcomment">
<input name="recordid" type="hidden" value="<?php $_GET[id];?>">
It doesnt work as it doesnt send the id number. If I physically write the value 10 in the entire script works fine, I just cant get it to send a variable id value.
Thanks
