View Single Post
Old 03-17-2006, 10:15 AM  
paterson3713
Confirmed User
 
Join Date: Nov 2005
Location: Edmonton, AB
Posts: 190
Yeah you could do like:
Code:
$actions['val1'] = 'step1';
$actions['val2'] = 'step2';

// Then, 
$action = $actions[$var];
Or, like it was also mentioned before, using a database:
Code:
// First, put the values into a mysql database like: value | action
// Then,
$action = @mysql_result(mysql_query('SELECT action FROM mySteps WHERE value=\''.mysql_escape_string($var).'\''),0);
__________________
paterson3713 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote