I've run into a problem that I can't figure out.
My code is below. It works fine unless my event_category has an apostrophe in it. Then, while the code still fires, there won't be any data associated with that category. I can look in the database and see it, but it won't show up on my page.
What do I have to do in order to accommodate the apostrophe? For example, "Women's Ministry." There's something about "Women/'s Ministry" that's messing things up and I don't know what.
$querystate = "select distinct event_category from calendar order by event_category";
$resultstate = mysqli_query($cxn, $querystate)
or die ("Couldn't execute query.");
$the_event_category = $event_category;
<td colspan="3" bgcolor="blue">
<font color="white"><?php echo stripslashes($the_event_category); ?></font>
$bruce="select * from calendar where event_category = '$the_event_category' order by event_date";
$bruce_query = mysqli_query($cxn, $bruce)
or die("Couldn't execute query.");
while($bruce_row = mysqli_fetch_assoc($bruce_query))
<?php echo date("m/d/y", strtotime($event_date)); ?>
<?php echo stripslashes($event_name); ?>