Avatar of Adam
Adam
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

What's wrong with this php line? Works on my local development server

I have the following lines of code which 'works' on my development server, but when I try it on my hosted live server - doesn't work.  They are placed within a form which links to corresponding tables on both the development and live server.

<div class="form-check">
  <input class="form-check-input" type="radio" name="active" id="active1" value="1" <?php if($teacher['active'] == "1"){echo 'checked';}?>>
  <label class="form-check-label" for="active1">
    Active
  </label>
</div>
<div class="form-check">
  <input class="form-check-input" type="radio" name="active" id="active2" value="0" <?php if($teacher['active'] == "0"){echo 'checked';}?>>
  <label class="form-check-label" for="active2">
    Inactive
  </label>
</div>

Open in new window


Sorry - this has been currently being edited as I have discovered I was describing what wasn't actually happening. I'll post more information once I've rechecked what's going on.

Many thanks,

Adam
Web DevelopmentHTMLDatabasesPHP

Avatar of undefined
Last Comment
Adam

8/22/2022 - Mon