Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array (
- [events] => Array
- [fromdate] => February 12, 2014 3:10 PM
- [todate] => February 19, 2014 3:10 PM
- [description] => hfhhhhhhhhhhhhhhhhhh
- [subject] => fhhhhhhhhhhhhhhhhhh
- [fromname] => gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
- [replyto] => gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
- [senddatetime] => February 12, 2014 3:10 PM
- [timezone] => America/Los_Angeles
- [message] =>
- dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- [submit_skip] => Continue
- )
- $select = sprintf ("SELECT event_id,event_name
- FROM `events`
- WHERE (`user_id` = '%s') order by event_name",
- $GLOBALS ['mysqli']->real_escape_string ($_SESSION['user_id']));
- $res = $GLOBALS ['mysqli']->query ($select) or die ($GLOBALS ['mysqli']->error . __LINE__);
- if ($res->num_rows > 0)
- {
- while($row = $res->fetch_assoc ())
- {
- foreach( $_POST['events'] as $val ){ ?>
- <option value="<?= $row['event_id'];
- if($row['event_id'] == $val) echo "selected";
- ?>">
- <?=$row['event_name']?>
- </option>
- <?
- }
- }
- }
- ?>
- </select>
- Warning: Invalid argument supplied for foreach() in C:wampwwwticket_inspector_newforms_hd87wblfo084wgdtryform_email_compose
- <?php
- $x = array (
- 'events' => array(),
- 'fromdate' => 'February 12, 2014 3:10 PM',
- 'todate' => 'February 19, 2014 3:10 PM',
- // So on .....
- );
- $check = $x['events'];
- var_dump($check);
- ?>
- <option value="<?php echo $row['event_id']; ?>"<?php if(in_array($row['event_id'],$check)) { ?> selected="selected" <?php } ?> ><?php echo $row['event_name']?></option>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement