Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Altering fields when adding record

Quote Reply
Altering fields when adding record
Alex,

if I wanted to pre-process some of the data sent from an add form (admin or user) before putting the fields in the database, where would I do that?

Let's say I have a field "Timage" and I want to process it to get (or verify) the ht/width of it before inserting it. Those fields in the table are THeight and TWidth

Where in the routine would I go to verify them, and how would I pull them out --

for example, my "URL" is really a link to an image, and $TImage is it's thumbnail. The following code needs to go into the ADD and MODIFY code somewhere, I'm just not sure where.

$TImage = &process_image($URL); ## Check for and if necessary create Thumbnail
$TWidth = &Image_Width($TImage); ## get width and assign to database
$THeight = &Image_Height($TImage); ## get height and assign to database

Thanks...

Robert


[This message has been edited by pugdog (edited July 20, 1999).]
Subject Author Views Date
Thread Altering fields when adding record pugdog 3185 Jul 20, 1999, 1:37 PM
Post Re: Altering fields when adding record
Alex 3081 Jul 20, 1999, 2:25 PM
Post Re: Altering fields when adding record
pugdog 3078 Jul 20, 1999, 4:17 PM