I have a web form that accepts up to 3 suggested categories.  In the
form they are part of I have named these variables 


I have come up with this simple code to store the suggestion in a table:

if ( $suggested_category_1 <> "" ) {
#the user could leave the suggestion blank because what is already
provided is sufficient

@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO table_name VALUES ( '$variable' ,
'$reference_number', '$suggested_category_1')";


Is there any way to create a loop to check all three instead of me
repeating this code twice more changing $suggested_category_1 to _2 and
_3 ?


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to