Hi I had A field In Than i am enter the multiple e mail id using the automated dropdown . I refer this link "http://wick.sourceforge.net/wick_sample/" U get the Full view about my program in this link. In This all e-mail id's are stored in the variable collection. My problem is if i declare the E-mail id directly in the variable like This
var data = ['meena@gmail.com', 'raam@yahoo.com', 'priya@group.com', 'priya@group.com'];
collection = data; Its Working properly but i am retrieve the e-mail Id from the Database . so i am using below mentioned code but it does not work how i solve this issue .
function show_alert() {
var id1 = document.getElementById('collection').value;
var data = [id1];
collection = data;
alert(collection);
}
<?php
$table = "am_users";
$query = "select distinct(`user_email`) from $table";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
while ($data1 = mysql_fetch_array($result)) {
$data[] = $data1['user_email'];
}
foreach($data as $search_term) {
$js_data[] = "/'".$search_term."/'";
}
$collection = implode($js_data, ",");
?>
<html>
<head>
</head>
<body>
<input type="text" id="collection" name="collection" rows="5" cols="30" value="<?php echo $collection; ?>" onChange="show_alert()" />
</body>
</html>
Lütfen bana yol, her biri için güzel bir gün var