tarheelmm Posted October 19, 2019 Share Posted October 19, 2019 I have some PHP/HTML code being used in a WordPress site. The PHP outside of WordPress works in any browser. When I open it in Chrome in WP, it runs no problem. Within WP in Safari(unsupported plug in error pops up but I have deactivated all plugins) and Firefox, nothing shows up. This is the page: https://searchsoftball.com/search/ I can reproduce the problem in Chrome making one change but I do not know how to fix it. This is the part of the code that breaks it in all browsers: <?php $result = $con->query($sql); while($row = $result->fetch_assoc()){ ?> <tr> <td><?php echo $row['School'];?></td> <td><?php echo $row['City'];?></td> <td><?php echo $row['State'];?></td> <td><?php echo $row['Conference'];?></td> <td><?php echo $row['Division'];?></td> <td><?php echo '<a href="'.$row['Main'].'"target ="_blank">Main</a>';?></td> <td><?php echo '<a href="'.$row['Softball'].'"target ="_blank">Softball</a>';?></td> <td><?php echo '<a href="'.$row['Camp'].'"target ="_blank">Camp</a>';?></td> </tr> <?php <--- remove this } <— and this ?> <---- and this causes it to break in all browsers. I can provide the full code if needed. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/309389-code-not-running-in-safarifirefox/ Share on other sites More sharing options...
benanamen Posted October 19, 2019 Share Posted October 19, 2019 If you just leave a closing php tag hanging around of course it will break. Why would you remove proper code? Quote Link to comment https://forums.phpfreaks.com/topic/309389-code-not-running-in-safarifirefox/#findComment-1570814 Share on other sites More sharing options...
tarheelmm Posted October 19, 2019 Author Share Posted October 19, 2019 So being basic, what do I need to change? Quote Link to comment https://forums.phpfreaks.com/topic/309389-code-not-running-in-safarifirefox/#findComment-1570815 Share on other sites More sharing options...
tarheelmm Posted October 19, 2019 Author Share Posted October 19, 2019 resolved Quote Link to comment https://forums.phpfreaks.com/topic/309389-code-not-running-in-safarifirefox/#findComment-1570824 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.