Newbie. Posting to backend MySQL database

From: Date: Sat, 28 Aug 2004 17:12:02 +0000
Subject: Newbie. Posting to backend MySQL database
Groups: php.general 
Request: Send a blank email to php-general+get-195031@lists.php.net to get a copy of this message
Please help, I'm tearing what remains of my hair out here. I've got a MySQL database where I've defined one of the table fields as an integer. Using PSP I've passed a session variable and can echo it to the screen using <?php echo intval($clin_id) ?>. So the session variable exists and can be echoed I now want to pass this session variable to the database into the field I've defined as an integer I've set up a form to submit other variables to the backend database and they all work apart from this field. I'm using a hidden field to pass the variable and I am using <input name="p_clin_id" type="hidden" id="p_clin_id" value="intval('$clin_id')"> What I don't understand is that if I can echo the variable what am I missing in formatting a sessio variable to make it passable to the database. It mus be something basic and I've looked through several books (from where I got the intval function) but obviously in the wrong place. I would be grateful for any advice.

« previous php.general (#195031) next »