NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Web Design Discussion
Reload this Page PHP - Sending variables in created frameset

Web Design Discussion Discussion of web design techniques, advice, browser issues, software, design firms.

Advanced Search


Closed Thread
238 unique views    
LinkBack Thread Tools
Old 06-13-2005, 03:50 AM THREAD STARTER               #1 (permalink)
u2
Guest
Posts: n/a
 



PHP - Sending variables in created frameset


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>
 
Old 06-13-2005, 03:51 AM THREAD STARTER               #2 (permalink)
BnBoy
Guest
Posts: n/a
 



Try using !$bgcolor in the conditional rather than '== "" '.

Other than that... is it possible they might already have a value?
 
Old 06-13-2005, 03:51 AM THREAD STARTER               #3 (permalink)
Akeez
Guest
Posts: n/a
 



Can you provide a link so I can see it in action?
 
Old 06-13-2005, 03:53 AM THREAD STARTER               #4 (permalink)
brain
Guest
Posts: n/a
 



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"; 
}
 
Old 06-13-2005, 03:53 AM THREAD STARTER               #5 (permalink)
u2
Guest
Posts: n/a
 



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.
 
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Getting started with PHP (The Basics) deadserious Webmaster Tutorials 60 11-17-2007 12:35 PM
Googlism - What does google think of you? deadserious The Break Room 55 12-15-2005 10:09 AM
How I fill javascript array with php variables? wiedzim CODE 0 03-31-2004 03:45 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:05 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger