Hi all.
I am trying to work out how to capture the data into a SESSION var after an option is slected from a list.
This is what I have so far:
<select name="message" class="bodytext">
<option value="" <?php if (!(strcmp("", "Please select a standard message"))) {echo "selected=\"selected\"";} ?>>Please select a message</option>
<?php
do {
?><option value="<?php echo $row_message['member_id']?>"<?php if (!(strcmp($row_message['member_id'], "Please select a standard message"))) {echo "selected=\"selected\"";} ?>><?php echo $row_message['message']?></option><?php
} while ($row_message = mysql_fetch_assoc($message));
$rows = mysql_num_rows($message);
if($rows > 0) {
mysql_data_seek($message, 0);
$row_message = mysql_fetch_assoc($message);
}
$_SESSION['message'] = message; ?>
</select>
I have given the SELECT the name of "message" which I thought would be picked up as a variable and I could reference it to the $_SESSION var, but it does not work so I must have this wrong.
Can anyone give some advice please.