PHP - Sending variables in created frameset

SpaceshipSpaceship
Watch
U

u2

Guest
Guest
It is supposed to send these variables to the files in the frameset but the files can't see the last four.

Code:
<html> 
<head> 
<?php 
$id = $_REQUEST['id']; 
$user = $_REQUEST['user']; 
$width = $_REQUEST['width']; 
$height = $_REQUEST['height']; 
$censor = $_REQUEST['censor']; 
$bgcolor = $_REQUEST['bgcolor']; 
$ftcolor = $_REQUEST['ftcolor']; 
$sccolor = $_REGUEST['sccolor']; 
$lkcolor = $_REQUEST['lkcolor']; 
if ($bgcolor == "") { 
 $bgcolor = "#000000"; 
} 
if ($sccolor == "") { 
 $sccolor = "#111111"; 
} 
if ($ftcolor == "") { 
 $ftcolor = "#DDDDDD"; 
} 
if ($lkcolor == "") { 
 $lkcolor = "#DDDD00"; 
} 
if ($id == "") { 
 $id = "1"; 
} 
if ($width < 128) { 
 $width = 256; 
} 
if ($height < 256) { 
 $height = 480; 
} 
$height = $height - 144; 
$height = $height - 32; 
if ($swear = "") { 
 $swear = "no"; 
} 
if ($user = "") { 
 $user = "Guest"; 
} 
?> 
<frameset cols="<?php echo $width ?>" rows="32,1,<?php echo $height ?>,144" border="0"> 
 <frame src="top.php?id=<?php echo $id ?>&user=<?php echo $user ?>" noresize scrolling="no"> 
 <frame src="top2.php?id=<?php echo $id ?>&height=<?php echo $height ?>&censor=<?php echo $censor ?>&bgcolor=<?php echo $bgcolor ?>&ftcolor=<?php echo $ftcolor ?>&sccolor=<?php echo $sccolor ?>&lkcolor=<?php echo $lkcolor ?>" noresize scrolling="no"> 
 <frame src="chat1.php?id=<?php echo $id ?>&ref=2&censor=<?php echo $censor ?>&height=<?php echo $height ?>&bgcolor=<?php echo $bgcolor ?>&ftcolor=<?php echo $ftcolor ?>&sccolor=<?php echo $sccolor ?>&lkcolor=<?php echo $lkcolor ?>" noresize scrolling="yes" name="main"> 
 <frame src="chat2.php?user=<?php echo $user ?>&id=<?php echo $id ?>&width=<?php echo $width ?>&bgcolor=<?php echo $bgcolor ?>&ftcolor=<?php echo $ftcolor ?>&lkcolor=<?php echo $lkcolor ?>" noresize scrolling="no"> 
</frameset> 
</html>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Try using !$bgcolor in the conditional rather than '== "" '.

Other than that... is it possible they might already have a value?
 
0
•••
Can you provide a link so I can see it in action?
 
0
•••
Use either the empty for the isset functions.

The isset function checks to see if a variable is set. The empty function checks if the variable is set and if it is empty. Most likely, you'd want something of the sort:


PHP
Code:
if (empty($bgcolor)) 
{ 
   $bgcolor = "#000000"; 
}
 
0
•••
The problem I just figured out is in sending variables to the other files in the frameset. Perhaps it does not like the # symbol in the transfer.

I tried replacing # with nnuumm and doing the opposite on the recieving end to see if it works. It didnt.

Perhaps theres some other way.
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back