php - Submit button is missing

635

The problem is - SUBMIT button is missing.

This is a fragment from my code:

<p>
    <label class="field"
           for="fk_RUNGTYNESid_RUNGTYNES">Rungtynės<?php echo in_array('fk_RUNGTYNESid_RUNGTYNES', $required) ? '<span> *</span>' : ''; ?></label>
    <select id="fk_RUNGTYNESid_RUNGTYNES" name="fk_RUNGTYNESid_RUNGTYNES">
        <option value="">

If I remove code about{-code-2} the submit button appears.

What's the problem? And how can I fix this?

661

Answer

-----</option> <?php // išrenkame klientus $rungtynes = $rungtynesObj->getrungtynesList(); foreach ($rungtynes as $key => $val) { $selected = ""; if (isset($data['fk_RUNGTYNESid_RUNGTYNES']) && $data['fk_RUNGTYNESid_RUNGTYNES'] == $val['id']) { $selected = " selected "<option{$selected} value='{$val['id']}'>{$val['rungtyniu_laikas']}</option>"; } ?> </select> </p> </fieldset> <p >* pažymėtus laukus užpildyti privaloma</p> <p> <input type="submit" name="submit" value="Išsaugoti"> </p> <input type="hidden" name="id" value="<?php echo isset($data['id']) ? $data['id'] : ''; ?>"/>|||fk_RUNGTYNESid_RUNGTYNES
210

Answer

Solution:

According your code and the comments as I have said in the comments

check your $rungtynes = $rungtynesObj->getrungtynesList();

And in the error log you can find the following:

PHP Fatal error:  Uncaught Error: Call to undefined method rungtynes::getrungtynesbusena() in futboloprotokolas1/autonuoma/templates/rungtynes_form.tpl.php:33
Stack trace:
  #0 futboloprotokolas1/autonuoma/controls/rungtynes_create.php(55): include()
  #1 futboloprotokolas1/autonuoma/templates/main.tpl.php(40): include('f...')
  #2 futboloprotokolas1/autonuoma/index.php(41): include('f...')
  #3 {main}\n  thrown in futboloprotokolas1/autonuoma/templates/rungtynes_form.tpl.php on line 33, referer: /futboloprotokolas1/autonuoma/index.php?module=rungtynes&action=list

Also please look on your error.log: there are lots of warnings and notifications.

People are also looking for solutions to the problem: How to redirect user to home page after successful login in php?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.