/    Sign up×
Community /Pin to ProfileBookmark

HELP – "add" button has disapeared in backend php pages.

A client has approached me with a problem that has recently come up…. when they go to add a new user all of the sudden the add button has disapeared. This work was done by a previous client and whilst I have some idea about php editing this code is way out of my depth!

Here is the html page in question…….

[CODE]
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head><title>Fellas Gifts Administration</title>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
<script language=”JavaScript” type=”text/javascript” src=”lang/en.js”></script>
<script language=”JavaScript” type=”text/javascript” src=”richtext.js”></script>
<script language=”JavaScript” type=”text/javascript” src=”html2xhtml_compressed.js”></script>
<script language=”JavaScript” type=”text/javascript” src=”autodev_functions.js”></script>

<script language=”JavaScript” type=”text/javascript” src=”../transmog_functions.js”></script>
<script language=”JavaScript” type=”text/javascript” src=”autodev_tree.js”></script>
</head>
<body>
<h1>Administration</h1>
<div id=”area_choices”>
<ul>
<li> <a href=”home.php”>Home</a></li>

<li class=”on”> <a href=”select_table.php?table=Users”>Users</a></li>
<li> <a href=”select_table.php?table=UsersLog”>Users Log</a></li>
<li> <a href=”select_table.php?table=Categories”>Categories</a></li>
<li> <a href=”select_table.php?table=Documents”>Documents</a></li>
<li> <a href=”select_table.php?table=Newsletters”>Newsletters</a></li>

<li> <a href=”logout.php”>Log out</a></li>
</ul>
</div>
<div id=”main_data”>
<form name=”main_form” method=”post” action=”main_add_action.php”>
<input type=”hidden” name=”_t” value=”Users”>
<table>
<tr>
<td>Email</td><td><input type=”text” name=”Email” maxlength=”150″ value=””></td></tr>
<tr>
<td>Password</td><td><input type=”text” name=”Password” maxlength=”12″ value=””></td></tr>
<!–//<p style=”font-size: 10px;”>Built with <a href=”http://www.transmog.com.au/”>Transmog</a> Autodev, version 2.6.1.3</p>//–>

</body>
</html>
[/CODE]

Now html tidy validation gives me 3 errors….. line 28: missing </table> , line 26: missing </form>, line 25: missing </div>

every other page in the backend is 100% clean so im assuming if I can fix these warnings it should be fine.

Here is the problem php code in question….

[CODE]
if ($_GET[‘t’] == ‘Documents’) {
echo “<tr><td colspan=”2″ align=”right”>Please note: if uploading a large file, please be patient. <input type=”submit” value=”{$button_text[‘add’]}”></td></tr>n</table>n{$hidden_inputs}n</form>n</div>n”;
}
[/CODE]

those three ending tags appear in the php code but commented out? any help on this issue is greatly appriciated!!

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@FangJul 08.2008 — There should be an else statement:if ($_GET['t'] == 'Documents') {
echo "&lt;tr&gt;&lt;td colspan="2" align="right"&gt;Please note: if uploading a large file, please be patient. &lt;input type="submit" value="{$button_text['add']}"&gt;&lt;/td&gt;&lt;/tr&gt;n&lt;/table&gt;n{$hidden_inputs}n&lt;/form&gt;n&lt;/div&gt;n";
}
else {
echo "&lt;tr&gt;&lt;td colspan="2" align="right"&gt;&lt;input type="submit" value="{$button_text['add']}"&gt;&lt;/td&gt;&lt;/tr&gt;n&lt;/table&gt;n{$hidden_inputs}n&lt;/form&gt;n&lt;/div&gt;n";
}
×

Success!

Help @decepticon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...