echo not working?
Posted: Thu Jun 12, 2003 1:59 pm
obviously this ins't the place to seek javascript help so i'm looking elsewhere to get the javascript of the last thing i was asking about working... but in the mena time i've moved on to other basic pages.. trying to get the main profile page up, i tried rtesting it without the iframe pages, but.. the $un variable isn't being passed for some reason. i can tell because i had pics for a dummy profile and instead i'm getting what i made intot he default image.
all the pics are coming up waht i thought they would with one small little thing.. $un isn't being made intot he passed username like i thought it would.
does anyone know why? could you explain it to me so i can figure out how to fix it?
edit: as i wait for a response, i'm going to start on the pages for the iframes... in the meantime, here's a link to the dummy one: http://people.brandeis.edu/~m3rajk/JMT/ ... hp?un=user
Code: Select all
<?php
/* ***************************************************
** set any and all variables that need to be set **
*************************************************** */
$un=$_GET['un'];
/* *****************************
** call to (the ) database **
***************************** */
/* *******************************************************
** find where we are and call the creation functions **
******************************************************* */
if(isset($un)){
// if($check){ // user exists
bgnpg(); pb();
//}else{ // user doesn't exist
//bgnpg(); nu();
//}
}else{ // no user specified
home();
}
/* *********************************
** create the appropriate page **
********************************* */
function bgnpg(){ # create the BeGiNing of each PaGe
?><html>
<head>
<title>MySite -- <?php echo "$un"; ?>'s User Profile</title>
<meta name="Author" content="coded by: Josh Perlmutter; images by Morgan O'Brien-Bledsow & Tamara Collette all rights reserved">
<style type="text/css">
<!-- this comment is for non-css compliant browsers
{text-decoration=none}
end of css -->
</style>
</head>
<body bgcolor="#000000" text="#c8c8c8" alink="#fc00ff" vlink="#00e0c4" link="#ffffff">
<center><p> </p>
<?php
}
function pb(){
?><!-- profile body -->
<table frame="void" bgcolor="#000000" text="#c8c8c8" border="0"; cellspacing="0" cellpadding="0">
<tr><!-- row 1: user stats and pics -->
<td width="750" height="450" colspan="2"><!-- table to align top row -->
<table frame="void" bgcolor="#000000" text="#c8c8c8" border="0"; cellspacing="0" cellpadding="0">
<tr><td width="300" height="450">
<iframe frameborder="0" name="stats" height="450" width="300" src="stats.php?un=<?php echo "$un"; ?>">if you see this, upgrade to <a href="http://www.mozilla.org/">Mozilla</a> 1.3.1 or later</iframe>
</td><td width="450" height="450"><!-- inner table for pictures -->
<table frame="void" bgcolor="#000000" border="0"; cellspacing="0" cellpadding="0">
<tr><!-- row 1: main pic, thumbs 1 and 2 -->
<td height="300" width="300" colspan="2">
<?php
echo "\t\t\t<a href="userpics/m.$un.jpg" target="pic"><img src="thumb.php?pic=userpics/m.$un.jpg&fn=main" border="0"></a>\n";
?>
</td><td height="300" width="150">
<!-- table for thumbs 1 and 2 -->
<table frame="void" bgcolor="#000000" border="0"; cellspacing="0" cellpadding="0">
<tr><td height="150" width="150">
<a href="<?php echo 'userpics/t1.'.$un.'.jpg'; ?>" target="pic"><img src="thumb.php?pic=<?php echo 'userpics/t1.'.$un.'.jpg'; ?>&fn=thumb" border="0"></a>
</td></tr><tr><td height="150" width="150">
<a href="<?php echo 'userpics/t2.'.$un.'.jpg'; ?>" target="pic"><img src="thumb.php?pic=<?php echo 'userpics/t2.'.$un.'.jpg'; ?>&fn=thumb" border="0"></a>
</td></tr>
</table><!-- end table for thumbs 1 and 2 -->
</td>
</tr><tr><!-- row 2: thums 3 and 4 and salute -->
<td height="150" width="150">
<a href="<?php echo 'userpics/t3.'.$un.'.jpg'; ?>" target="pic"><img src="thumb.php?pic=<?php echo 'userpics/t3.'.$un.'.jpg'; ?>&fn=thumb" border="0"></a>
</td><td height="150" width="150">
<a href="<?php echo 'userpics/t4.'.$un.'.jpg'; ?>" target="pic"><img src="thumb.php?pic=<?php echo 'userpics/t4.'.$un.'.jpg'; ?>&fn=thumb" border="0"></a>
</td><td height="150" width="150">
<a href="<?php echo 'userpics/salute.'.$un.'.jpg'; ?>" target="pic"><img src="thumb.php?pic=<?php echo 'userpics/salute.'.$un.'.jpg'; ?>&fn=thumb" border="0"></a>
</td>
</tr>
</table><!-- end table for pictures -->
</td></tr>
</table><!-- end table for row 1 -->
</td>
</tr><tr><!-- row2: comments and lust links -->
<td height="10" width="550" align="center">View <a name="#comments" href="#comments" onClick="window.open('comments.php?un=<?php echo "$un"; ?>', 'comments', 'height=250,width=500,scrolling=yes');">Comments</a> for <?php echo "$un"; ?></td>
<td height="10" width="200" align="center">View <a name="#lust" href="#lust" onClick="window.open('lust.php?un=<?php echo "$un"; ?>', 'lust', 'height=200,width=482,scrolling=yes');">Lust List</a> for <?php echo "$un"; ?></td>
</tr><tr><!-- row3: bio and desired list -->
<td height="200" width="550">
<iframe frameborder="0" name="bio" height="200" width="550" src="bio.php?un=<?php echo "$un"; ?>">if you see this, upgrade to <a href="http://www.mozilla.org/">Mozilla</a> 1.3.1 or later</iframe>
</td><td height="200" width="200">
<iframe frameborder="0" name="desire" height="200" width="200" src="desire.php?un=<?php echo "$un"; ?>">if you see this, upgrade to <a href="http://www.mozilla.org/">Mozilla</a> 1.3.1 or later</iframe>
</td>
</tr>
</table><!-- end main profile body -->
<?php
}
function nu(){
echo "<h1>There was no user found with the name $un</h1></center></body></html>";
}
function home(){
?><html><head>
<title>MySite -- going home...</title>
<meta name="Author" content="coded by: Josh Perlmutter; images by Morgan O'Brien-Bledsow & Tamara Collette all rights reserved">
<meta http-equiv="refresh" content="0;url=index.php">
<style type="text/css">
<!-- this comment is for non-css compliant browsers
{text-decoration=none}
end of css -->
</style>
</head>
<body bgcolor="#000000" text="#c8c8c8" alink="#fc00ff" vlink="#00e0c4" link="#ffffff">
<center>
<p> </p>
<h1>If your browser doesn't forward you, then click<a href="index.html">HERE</a> to continue</h1>
</center></body></html>
<?php
}
?>does anyone know why? could you explain it to me so i can figure out how to fix it?
edit: as i wait for a response, i'm going to start on the pages for the iframes... in the meantime, here's a link to the dummy one: http://people.brandeis.edu/~m3rajk/JMT/ ... hp?un=user