| | |||||
| ||||||||
| Web Design Discussion Discussion of web design techniques, advice, browser issues, software, design firms. |
![]() |
|
238 unique views
| LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| 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> |
| | THREAD STARTER #4 (permalink) |
| 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";
} |
| | THREAD STARTER #5 (permalink) |
| 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. |
![]() |
| 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 |