/    Sign up×
Community /Pin to ProfileBookmark

Error in my code….

I have the following error wiht this…..

Parse error: parse error in /home/lukezweb/public_html/php/temp/adminsettings.php on line 45

[code=php]
<html>
<head>
<title></title>
</head>
<style type=”text/css”>
<!–
.TDNavigation {border: 1px solid #000000;}
A:link { text-decoration: none; color: FFB903; }
A:visited { text-decoration: none; color: FFB903; }
A:hover { text-decoration: underline overline; color: FFB903; }
BODY { font-size:12px; }
TD { font-family: Verdana,Arial; color: FFFFFF; font-size:11px}
input { font-family: Verdana,Arial; font-size: 9pt; color: 000000; }
textarea { font-family: Verdana,Arial; font-size: 9pt; color: 000000; }
select { font-family: Verdana,Arial; font-size: 7pt; color: 000000; }
.windowbg { background-color: 272A2F; font-size: 11px; font-family: Verdana,Arial; color: FFFFFF; }
.windowbg2 { background-color: 444444; font-size: 11px; font-family: Verdana,Arial; color: FFFFFF; }
.hr { color: dimgray;}
.titlebg { background-color: FFB903; color: FFFFFF; }
.text1 { font-style: normal; font-weight: bold; font-size: 12px; color: 000000; }
.textz { font-style: normal; font-weight: bold; font-size: 25px; }
.catbg { background-color: 40454C; color: FFFFFF; font-weight: bold; font-size: 13px; }
.bordercolor { background-color: 000000; }
–>
</style>
<body bgcolor=#272A2F>

<?php
$action = (isset($_GET[‘action’])) ? $_GET[‘action’] : “”;
if ($action == “banmember”) {
print “<table width=92% bgcolor=#000000 cellspacing=2>”;
print “<tr>”;
print “<td bgcolor=#ffff00>Banning A Member….</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#272a2f>Enter IP address…</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#444444>”;
print “<form>”;
print “<table width=100%>”;
print “<tr><td>IP Addresses:<br><font size=-1>Warning: Using this feature can completely block your pages from all if you insert *.*.*.*<br>So please don’t if you do by mistake mess up in some way visit the support forum: <a href=>Support Board</A></font></td></tr>”;
print “<tr><td><textarea name=ipaddresses value=ipaddresses></text></td></tr>”;
print “<tr><td><input type=”submit” value=”Edit Member”></td>”;
print “</tr></table>”;
print “</form>”;
print “</td>”;
print “</tr>”;
print “</table>”;
}
else if ($action == “newmember”) {
print “<table width=92% bgcolor=#000000 cellspacing=2>”;
print “<tr>”;
print “<td bgcolor=#ffff00>Adding A Member….</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#272a2f>Fill in this form…</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#444444>”;
print “<form>”;
print “<table width=100%>”;
print “<tr><td>*Full Name:</td><td><input type=text name=name value=></td></tr>”;
print “<tr><td>*Email:</td><td><input type=text name=email [email protected]></td></tr>”;
print “<tr><td>*Age:</td><td><input type=text name=age value=></td></tr>”;
print “<tr><td>*Location:</td><td><input type=text name=location value=></td></tr>”;
print “<tr><td>*Company:</td><td><input type=text name=company value=></td></tr>”;
print “<tr><td>*Username:</td><td><input type=text name=password value=></td></tr>”;
print “<tr><td>*Password:</td><td><input type=password name=password1 value=password></td></tr>”;
print “<tr><td>*Re-Enter Password:</td>”;
print “<td><input type=password name=password2 value=password></td></tr>”;
print “<tr><td><input type=”submit” value=”Add Member”></td>”:
print “<td><input type=”reset” value=”Reset Form”></td></tr></table>”;
print “<br>* Denotes required field</form>”;
print “</td>”;
print “</tr>”;
print “</table>”;
}
else if ($action == “deletemember”) {
print “<table width=92% bgcolor=#000000 cellspacing=2>”;
print “<tr>”;
print “<td bgcolor=#ffff00>Deleting A Member….</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#272a2f>Insert username…</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#444444>”;
print “<form>”;
print “<table width=100%>”;
print “<tr><td>Username:</td><td><input type=text name=username value=></td></tr>”;
print “<tr><td><input type=”submit” value=”Delete Member”></td><td></td></tr></table>”;
print “</form>”;
print “</td>”;
print “</tr>”;
print “</table>”;
}
else if ($action == “editmember”) {
print “<table width=92% bgcolor=#000000 cellspacing=2>”;
print “<tr>”;
print “<td bgcolor=#ffff00>Editing A Members Details….</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#272a2f>Edit fields in this form…</td>”;
print “</tr>”;
print “<tr>”;
print “<td bgcolor=#444444>”;
print “<form>”;
print “<table width=100%>”;
print “<tr><td>Full Name:</td><td><input type=text name=name value=></td></tr>”;
print “<tr><td>Email:</td><td><input type=text name=email [email protected]></td></tr>”;
print “<tr><td>Age:</td><td><input type=text name=age value=></td></tr>”;
print “<tr><td>Location:</td><td><input type=text name=location value=></td></tr>”;
print “<tr><td>Company:</td><td><input type=text name=company value=></td></tr>”;
print “<tr><td>Password:</td><td><input type=password name=password1 value=password></td></tr>”;
print “<tr><td>Re-Enter Password:</td><td><input type=password name=password2 value=password></td></tr>”;
print “<tr><td><input type=”submit” value=”Edit Member”></td><td></td></tr></table>”;
print “</form>”;
print “</td>”;
print “</tr>”;
print “</table>”;

}
else if ($action == “”) {

}else{
print “<div valign=middle align=center>”;
print “<table width=92% class=borderclass cellspacing=2 bgcolor=black>”;
print “<tr><td class=catbg>Error…</td></tr>”;
print “<tr><td align=center class=windowbg>This feature does not exist!</td></tr></table>”;
print “</div>”;
}
?>

</body>
</html>

[/code]

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@PittimannNov 30.2003 — Hi!

You can find the answer in the colors of your code already. In every if and else if block you have something like:
[code=php]
print "<tr><td><input type="submit" value="Edit Member"></td>";
[/code]

You have double quotes inside the print"". Use single quotes instead or escape the double quotes at type="" and value=""...

Example:
[code=php]
print "<tr><td><input type='submit' value='Edit Member'></td>";
[/code]

See the difference?

Cheers - Pit
Copy linkTweet thisAlerts:
@pyroNov 30.2003 — You might prefer to escape them with backslashes, so you can keep your double quotes in the output, though:

[code=php]print "<tr><td><input type="submit" value="Edit Member"></td>";[/code]
Copy linkTweet thisAlerts:
@lukezwebauthorNov 30.2003 — [i]Originally posted by pyro [/i]

[B]You might prefer to escape them with backslashes, so you can keep your double quotes in the output, though:



[code=php]print "<tr><td><input type="submit" value="Edit Member"></td>";[/code] [/B][/QUOTE]



ah yes that would make sense thanks ?
×

Success!

Help @lukezweb 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 6.18,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...