Link to home
Start Free TrialLog in
Avatar of Adam
AdamFlag 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
Avatar of Adam
Adam
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Actually, I need to update my post. On the live server, the table isn't  updating even if I remove  - <?php if($teacher['active'] == "1"){echo 'checked';}?>
ASKER CERTIFIED SOLUTION
Avatar of Adam
Adam
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial