Jump to content

php/java problem


squiblo

Recommended Posts

<?php
$about_me_query = mysql_query("SELECT * FROM page_set_data WHERE username='$username'");

while ($row = mysql_fetch_assoc($about_me_query))
{
$about_me = $row['about_me'];
}

if (!$about_me)
{
$about_me = "";
$nothing = "Write about yourself";
}
?>
<script type="text/javascript">
function toggle_visibility(id)
{	
var div = document.getElementById(id);	
var text = document.getElementById("about_me_text");		

if(div.style.display == 'block' ) 
	{		
	div.style.display = 'none';		
	text.innerHTML = "<?php echo $nothing.$about_me; ?>";

	}	
	else 
	{		
	div.style.display = 'block';
	text.innerHTML = "<?php echo $about_error; ?><form action='' method='POST'><textarea cols='23' rows='6' name='textarea_about' id='textarea_about' style='font-family:arial;font-size:13px;overflow:hidden'><?php echo "$about_me";?></textarea><br><input type='submit' name='submit_about' value='Save'>   <input type='button' name='cancel_about' value='Cancel' onClick=\"window.location.href='content.php?content=myhub&myhub=mypage&mypage=mypage&cont=<?php echo $cont; ?>'\"></form>";	
	}
}
</script>

 

Whenever the variable name "$about_me" has any tags in it, the following like does not work...

 

<a href='#' onclick="toggle_visibility('about_me_popup');"><font color='CornflowerBlue'>Edit</font></a>

 

What am i doing wrong? Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/189356-phpjava-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.