trilbyfish Posted April 19, 2008 Share Posted April 19, 2008 For some reason when i open this page, the submit button isnt shown. When i use a html WYSIWYG editor, it shows the submit button. <?php // Table header. echo '<table align="left" cellspacing="0" cellpadding="5" border ="1"> <tr> <td align="left"><b>Bay Number</b></td> <td align="left"><b>08:00 - 09:00 </b></td> <td align="left"><b>09:00 - 10:00 </b></td> <td align="left"><b>10:00 - 11:00 </b></td> <td align="left"><b>11:00 - 12:00 </b></td> <td align="left"><b>12:00 - 13:00 </b></td> <td align="left"><b>13:00 - 14:00 </b></td> <td align="left"><b>14:00 - 15:00 </b></td> <td align="left"><b>15:00 - 16:00 </b></td> <td align="left"><b>16:00 - 17:00 </b></td> </tr> '; // Fetch and print the record whice corresponds to the bay id from the 'edit' link that was clicked on the bookingtable page if ($result) { while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo ' <tr> <form action="editbay.php?id=' . $row['id'] . '" method="post"> <td align="left">' . $row['baynumber'] . '</td> '; if (($row['08:00 - 09:00']) == "-") { echo '<td align="left"><select name="eight"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['08:00 - 09:00'] . '" selected="selected">' . $row['08:00 - 09:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="08:00 - 09:00" size="12" maxlength="30" readonly="true" value="' . $row['08:00 - 09:00'] . '" /></td>'; }' '; if (($row['09:00 - 10:00']) == "-") { echo '<td align="left"><select name="nine"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['09:00 - 10:00'] . '" selected="selected">' . $row['09:00 - 10:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="08:00 - 09:00" size="12" maxlength="30" readonly="true" value="' . $row['09:00 - 10:00'] . '" /></td>'; }' '; if (($row['10:00 - 11:00']) == "-") { echo '<td align="left"><select name="ten"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['10:00 - 11:00'] . '" selected="selected">' . $row['10:00 - 11:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="10:00 - 11:00" size="12" maxlength="30" readonly="true" value="' . $row['10:00 - 11:00'] . '" /></td>'; }' '; if (($row['11:00 - 12:00']) == "-") { echo '<td align="left"><select name="eleven"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['11:00 - 12:00'] . '" selected="selected">' . $row['11:00 - 12:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="11:00 - 12:00" size="12" maxlength="30" readonly="true" value="' . $row['11:00 - 12:00'] . '" /></td>'; }' '; if (($row['12:00 - 13:00']) == "-") { echo '<td align="left"><select name="twelve"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['12:00 - 13:00'] . '" selected="selected">' . $row['12:00 - 13:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="12:00 - 13:00" size="12" maxlength="30" readonly="true" value="' . $row['12:00 - 13:00'] . '" /></td>'; }' '; if (($row['13:00 - 14:00']) == "-") { echo '<td align="left"><select name="thirteen"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['13:00 - 14:00'] . '" selected="selected">' . $row['13:00 - 14:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="13:00 - 14:00" size="12" maxlength="30" readonly="true" value="' . $row['13:00 - 14:00'] . '" /></td>'; }' '; if (($row['14:00 - 15:00']) == "-") { echo '<td align="left"><select name="fourteen"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['14:00 - 15:00'] . '" selected="selected">' . $row['14:00 - 15:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="14:00 - 15:00" size="12" maxlength="30" readonly="true" value="' . $row['14:00 - 15:00'] . '" /></td>'; }' '; if (($row['15:00 - 16:00']) == "-") { echo '<td align="left"><select name="fifteen"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['15:00 - 16:00'] . '" selected="selected">' . $row['15:00 - 16:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="15:00 - 16:00" size="12" maxlength="30" readonly="true" value="' . $row['15:00 - 16:00'] . '" /></td>'; }' '; if (($row['16:00 - 17:00']) == "-") { echo '<td align="left"><select name="sixteen"> <option value="-">-</option> <option value="' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '">' .$_SESSION['firstname']. ' ' .$_SESSION['surname']. '</option> <option value="' . $row['16:00 - 17:00'] . '" selected="selected">' . $row['16:00 - 17:00'] . '</option> </select> </td>'; } else { echo '<td align="left"><input type="text" name="16:00 - 17:00" size="12" maxlength="30" readonly="true" value="' . $row['16:00 - 17:00'] . '" /></td>'; }' </tr> <tr > <td colspan="11" td align="middle"> <input type="submit" name="submit" value="Submit"></td> <input type="hidden" name="submitted" value="TRUE" /> <input type="hidden" name="id" value="' . $id . '" /> </tr> </form> </table> '; } echo '</table>'; // Check if the form has been submitted. ?> I have cut out most of the php code which isnt related to the submit button. I would be very glad if you could help. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted April 19, 2008 Share Posted April 19, 2008 I have cut out most of the php code which isnt related to the submit button. Are you sure about that? Looks like a full php page to me... Can you just give the parsed php. Just the html? And cut EVERYTHING out except the submit button. Quote Link to comment Share on other sites More sharing options...
atl_andy Posted April 21, 2008 Share Posted April 21, 2008 This may seem basic, but you have everything else echo'd except the submit button. Quote Link to comment Share on other sites More sharing options...
sel_888 Posted April 23, 2008 Share Posted April 23, 2008 This may seem basic, but you have everything else echo'd except the submit button. My thoughts exactly. Good eyes, atl_andy -Sel Quote Link to comment Share on other sites More sharing options...
blackcell Posted April 24, 2008 Share Posted April 24, 2008 Also, I think if you reverse your quote usage. Double quotes and then single quotes within double quotes for html. I see your using echo to display html. You need to use single quotes within doubles to make things work. Quote Link to comment Share on other sites More sharing options...
haku Posted April 24, 2008 Share Posted April 24, 2008 His quotes are fine now, they will work as is. I think the problem is what someone already said - he didn't write any code for a submit button. Quote Link to comment Share on other sites More sharing options...
blackcell Posted April 25, 2008 Share Posted April 25, 2008 Holy crap the single quotes seem to have a higher precedence. I have been living a lie in php programming... Quote Link to comment 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.