Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script troubles

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi I was wondering if someone could tell me what's wrong with the script below, i'm not too familiar with echo statements but i'd be greatful for your help. Thanx

echo '
<table cellspacing='0' cellpadding='0' border='0' width='100%' height='100%'>
<tr><td valign='center'>
<center><form name='countDown'><a href='chatterbox.php'>Refresh Window</a> <input name='ticker' type='text' size='2'> - <a href='' onclick='window.close()'>Close Window</a> \n&quot;;
if($status == &quot;Administrator&quot;) {
- <a href='chatterbox.php?action=delete'>Delete All Posts</a> }
</center>\n
<hr noshade size=\&quot;1\&quot;>
</form><p><p style='margin-top: -15'></p>\n
<p><b>Who's chatting?</b>

$query = $db->query(&quot;SELECT * FROM xmb_nfp_whosonline WHERE username NOT LIKE '%guest%' AND location LIKE '%chatterbox.php%' ORDER BY username&quot;);
while($online = $db->fetch_array($query)) {
echo &quot;$comma<a href='member.php?action=viewpro&member=$online[username]' target='_blank'>$online[username]</a>&quot;;
$comma = &quot;, &quot;; }

?>
<p> </p>
<form action=&quot;chatterbox.php?action=post&quot; method=&quot;post&quot; name=&quot;input&quot;>
<p style=&quot;margin-top: -15&quot;><center><b>Message:</b> <input type=&quot;text&quot; name=&quot;mesg&quot; size=&quot;30&quot; value=&quot;&quot; style=&quot;width: 160px&quot;> <input type='submit' value='Post'> <input type=&quot;reset&quot; value=&quot;Clear&quot;></center></p>
<p style=&quot;margin-top: -15&quot; align=&quot;center&quot;>
<a href=&quot;javascript:icon(':)')&quot;><img src=&quot;<?=$smdir?>/smile.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':(')&quot;><img src=&quot;<?=$smdir?>/sad.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':D')&quot;><img src=&quot;<?=$smdir?>/biggrin.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(';)')&quot;><img src=&quot;<?=$smdir?>/wink.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':cool:')&quot;><img src=&quot;<?=$smdir?>/cool.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':mad:')&quot;><img src=&quot;<?=$smdir?>/mad.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':eek:')&quot;><img src=&quot;<?=$smdir?>/shocked.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':p')&quot;><img src=&quot;<?=$smdir?>/tongue.gif&quot; border=&quot;0&quot;></a>
<a href=&quot;javascript:icon(':?')&quot;><img src=&quot;<?=$smdir?>/puzzled.gif&quot; border=&quot;0&quot;></a>     
<a href=&quot;javascript:bold()&quot;><img src=&quot;<?=$imgdir?>/bb_bold.gif&quot; border=&quot;0&quot; alt=&quot;Insert Bold Text&quot;></a>
<a href=&quot;javascript:italic()&quot;><img src=&quot;<?=$imgdir?>/bb_italicize.gif&quot; border=&quot;0&quot; alt=&quot;Insert Italicized Text&quot;></a>
<a href=&quot;javascript:underline()&quot;><img src=&quot;<?=$imgdir?>/bb_underline.gif&quot; border=&quot;0&quot; alt=&quot;Insert Underlined Text&quot;></a>
<a href=&quot;javascript:hyperlink()&quot;><img src=&quot;<?=$imgdir?>/bb_url.gif&quot; border=&quot;0&quot; alt=&quot;Insert a Hyperlink&quot;></a>
<a href=&quot;javascript:email()&quot;><img src=&quot;<?=$imgdir?>/bb_email.gif&quot; border=&quot;0&quot; alt=&quot;Insert an Email Address&quot;></a>
</p>
<p style=&quot;margin-top: -15&quot;><hr noshade size=&quot;1&quot;>

</tr><tr><iframe name=&quot;frame&quot; src=&quot;chat.php&quot; width=&quot;100%&quot; height=&quot;700&quot; scrolling=&quot;Auto&quot; frameborder=&quot;0&quot; ></iframe></tr></table>

</form>';
 
No, you first. What don't you like about it?

Is it not behaving like it should? Is it generating errors you don't understand?
 
Actually, to begin with you have quotes inside of quotes. That alone is going to mess with the script.
 
youve ' whthin '
you should replace either the html ' by &quot; or php ' by &quot;
they mess up. you can even use ' or &quot; at both html and php script but the html ones should be preceded by
replies to fedebaseggio@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top