Jump to content

Formatting goes crazy following GET submit


marmite

Recommended Posts

Hi,

 

I have two pages, c.php and d.php. Both are now using CSS rather than tables for formatting.

 

Both load fine when called directly from the address bar. However, c.php calls d.php from a Submit button on c.php (still with me?) which applies filters and returns a dataset to d.php.

 

When I call d.php from c.php, appending some user choices in GET form to the URL, some of the formatting - and only some - goes crazy! The entire site aligns left instead of centre, and some font gets bigger and changes colour. The rest is fine, though.

 

So a) d.php can still find the .css sheet, because it is using some of the information, and b) the settings are surely right because they are fine when d.php is called directly.

 

Utterly nuts. Any ideas, anyone?

 

Emma

Sorry I didn't post before - I just don't know what's relevant so I'm posting all of it

 

d.php

<?
require 'db.inc.php';

if ($_GET['submit2']) {
	$theme=$_GET['theme'];
	$purpose=$_GET['purpose'];
	$message=$_GET['message'];

	echo $theme.$purpose.$message;

	if ($message=='all') {
		$message1="SELECT DISTINCT card_msg from cards where card_status=1";
		echo "message all";
	} elseif ($message=='nonblank') {
		$message1="SELECT DISTINCT card_msg from cards where card_status=1 and card_msg<>'blank'";
		echo "message nonblank";
	} else {
		$message1="'" . $message . "'";
		echo "message msg";
	}

	if ($theme=='All') {
		$theme1="SELECT DISTINCT card_categ_name from card_categ where card_categ_type='theme'";
		echo "theme all";
	} else {
		$theme1="'" . $theme . "'";
		echo "theme thm";
		echo $theme1;
	}
}


$id=$_GET['id'];
$id=str_replace("_"," ",$id);

$query="SELECT * from image where image_status=1 and image_id in (select card_image_id from cards where card_status=1 and card_msg in ($message1) and card_id in (select card_categ_cards from card_categ where card_categ_name in ($theme1)))";

$result=mysql_query($query);
$numrows=mysql_num_rows($result);
#echo $result;
#echo $numrows;
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TEST CARDS UNLIMITED</title>
<link href="style/phase2.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
</html>

<!-- #BeginLibraryItem "/Library/Javascript.lbi" -->
<script language="JavaScript" type="text/javascript">
<!-- Emma 7/3/07 These are Dreamweaver javascript functions which allow the rollovers on left navigation buttons EDIT IN HOMEPAGE ONLY

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function validate(formCheck)
{
var mail = formCheck.email.value
if (mail.indexOf("@") == -1)
{
alert("Please type a valid email address");
formCheck.email.focus();
return false;
}
alert("Thanks! Your information is being registered");
return true;
}

-->
</script>
<!-- #EndLibraryItem -->
<!--- Emma 7/3/07 loads rollover images as page loads so javascript can use them without querying server --->
<body onLoad="MM_preloadImages('/buttons/home_a.gif','/buttons/view-cards_a.gif','/buttons/got-a-shot_a.gif','/buttons/vote-on-ranges_a.gif','/buttons/buy-in-bulk_a.gif','/buttons/pa-services_a.gif','buttons/shoppingcart_a.gif','/buttons/myaccount_a.gif','/buttons/about_a.gif','/buttons/contact_a.gif','/buttons/shoppingcart_a.gif')">

<div id="maincontainer">
<table width="747" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="205"><div align="left"><a href="/New_CU/homepage.php"> <img src="images/cards-unlimited-logo_3.gif" alt="Cards Un Limited" width="177" height="69" border="0" /> </a> </div></td>
    <td width="546" scope="col"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="5"><img src="images/spacer.gif" width="1" height="5" alt="" /></td>
      </tr>
      <tr>
        <td width="102"><a href="/New_CU/homepage.php"><img src="buttons/home_a2.gif" alt="Home" name="home" width="63" height="39" border="0" id="home" /></a></td>
        <td width="137"><a href="/New_CU/myaccount.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('my-account1','','buttons/myaccount_a.gif',1)"><img src="buttons/myaccount_na.gif" alt="My Account" name="my-account1" width="101" height="39" border="0" id="my-account1" /></a></td>
        <td width="97"><a href="/New_CU/about.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about1','','buttons/about_a.gif',1)"><img src="buttons/about_na.gif" alt="About" name="about1" width="63" height="39" border="0" id="about1" /></a> </td>
        <td width="103"><a href="/New_CU/contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact1','','buttons/contact_a.gif',1)"><img src="buttons/contact_na.gif" alt="Contact" name="contact1" width="75" height="39" border="0" id="contact1" /></a> </td>
        <td width="107"><a href="/New_CU/cart.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('shoppingcart1','','buttons/shoppingcart_a.gif',1)"><img src="buttons/shoppingcart_na.gif" alt="Shopping Cart" name="shoppingcart1" width="107" height="39" border="0" id="shoppingcart1" /></a></td>
      </tr>
      <tr>
        <td colspan="5"><img src="images/spacer.gif" width="1" height="2" alt="" /></td>
      </tr>
      <tr>
        <td colspan="5"><div align="right"><span class="footercolor">
          <? if (!$_SESSION['memberid'] or $_SESSION['memberid'] == "loggedout") { echo "You are not logged in; <a href=\"/login.php\">Log In</a>"; } else { echo "You are logged in; <a href=\"/logout.php\">Log Out</a>"; } ?>
        </span></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" scope="row"><img src="images/spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
</table>



<table width="747" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/fade.gif" width="747" height="2"></td>
  </tr>
</table>
<table width="747" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/spacer.gif" alt="" width="1" height="1"></td>
  </tr>
  <tr>
    <td><span class="footercolor"> <a href="/New_CU/homepage.php">Home</a> > <a href="/New_CU/homepage.php">Greeting cards</a></span></td>
  </tr>
  <tr>
    <td><img src="images/spacer.gif" alt="" width="1" height="1"></td>
  </tr>
</table>


<!--- LEFT NAV ---><!-- #BeginLibraryItem "/Library/leftnav.lbi" --><div id = "leftnav">
		<div id="email_box">
		<table width="100%">
		<tr>
		  <td width="100%" align="center"><form id="form1" name="form1" method="post" action="<?=$_SERVER['Library/PHP_SELF']?>">
			  <label></label>
			  <input name="email" type="text" id="email" onfocus="this.value = ''; this.onfocus = function () {}" value="E-mail address" size="15" />
			  </label>
			  <input type="submit" name="submit1" value="GO!" onclick="return validate(form1)" />
		  </form></td>
		</tr>
		</table>
		</div>


	<!--- LEFT NAV BOX --->


		<div id="leftnav_box">
			<ul>
				<li> <a href="/about-us/" title="Greeting cards">Greeting cards</a></li>
				<li> <a href="/blog/" title="Upload to Photo competition">Photo competition: upload</a></li>
				<li> <a href="/information/rent-a-parking-space/" title="Vote in Photo competition">Photo competition: vote</a></li>
				<li> <a href="/press/" title="Free email reminders">Prices & Postage</a></li>
			</ul>
		</div>

		<div id="search_box">
				<form action="http://localhost/New_CU/d.php" method="get" name = "filters" id="filters">
					<table width="90%">
					  <tr>
						<td width="51" scope="row"><div id="normal">Theme</div></td>
						<td scope="row"><select name="theme" id="theme1">
							<option value="All"<?php if($_GET['theme'] == "All") { echo ' selected="selected"'; } ?>>All</option>
							<option value="Animal"<?php if($_GET['theme'] == "Animal") { echo ' selected="selected"'; } ?>>Animal</option>
							<option value="Floral"<?php if($_GET['theme'] == "Floral") { echo ' selected="selected"'; } ?>>Floral</option>
							<option value="Leisure"<?php if($_GET['theme'] == "Leisure") { echo ' selected="selected"'; } ?>>Leisure</option>
							<option value="Travel"<?php if($_GET['theme'] == "Travel") { echo ' selected="selected"'; } ?>>Travel</option>
						</select></td>
					  </tr>
					  
					  <tr>
						<td width="51" scope="row">Purpose</td>
						<td width="97" scope="row"><select name="purpose" id="purpose">
							<option value="All"<?php if($_GET['purpose'] == "All") { echo ' selected="selected"'; } ?>>All</option>
							<option value="Personal"<?php if($_GET['purpose'] == "Personal") { echo ' selected="selected"'; } ?>>Personal</option>
							<option value="Invitations"<?php if($_GET['purpose'] == "Invitations") { echo ' selected="selected"'; } ?>>Invitations</option>
							<option value="Office"<?php if($_GET['purpose'] == "Office") { echo ' selected="selected"'; } ?>>Office</option>
							<option value="Retail"<?php if($_GET['purpose'] == "Retail") { echo ' selected="selected"'; } ?>>Retail</option>
							<option value="Wholesale"<?php if($_GET['purpose'] == "Wholesale") { echo ' selected="selected"'; } ?>>Wholesale</option>
						</select></td>
					  </tr>
					  
					  <tr>
						<td width="51" scope="row">Message</td>
						<td scope="row"><select name="message" id="message1">
							<option value="all"<?php if($_GET['message'] == "all") { echo ' selected="selected"'; } ?>>All</option>
							<option value="blank"<?php if($_GET['message'] == "blank") { echo ' selected="selected"'; } ?>>Blank</option>
							<option value="nonblank"<?php if($_GET['message'] == "nonblank") { echo ' selected="selected"'; } ?>>Non Blank</option>
							<option value="birthday"<?php if($_GET['message'] == "birthday") { echo ' selected="selected"'; } ?>>Birthday</option>
							<option value="congrats"<?php if($_GET['message'] == "congrats") { echo ' selected="selected"'; } ?>>Congratulations</option>
							<option value="getwell"<?php if($_GET['message'] == "getwell") { echo ' selected="selected"'; } ?>>Get Well Soon</option>
							<option value="thankyou"<?php if($_GET['message'] == "thankyou") { echo ' selected="selected"'; } ?>>Thank you</option>
							<option value="christmas"<?php if($_GET['message'] == "christmas") { echo ' selected="selected"'; } ?>>Christmas</option>
						  </select>            </td>
					  </tr>
					  
					  <tr >
						<td colspan="2" scope="row" align="right"><input type="submit" name="submit2" value="Find cards" /></td>
					  </tr>
					</table>
				</form>
				</div>
			</div>
<!-- #EndLibraryItem --><!--- MAIN SECTION --->
<div align="center">
<table  border="0" cellpadding="0" cellspacing="0">
		<tr><td class="style8"><div align="center" class="header2">Current filters: (1) theme: ; (2) message: ; (3) purpose:  </div></td></tr>
		<tr><td><img src="images/spacer.gif" width="1" height="5" alt=""></td></tr>
		<tr><td>
				<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
				<?
				if ($numrows > 0) {
				$count = 1;
				echo "<tr>";
				$diff = $count % 5;
					while ($row = mysql_fetch_assoc($result)) {
				?>

							<td><table width="90"  border="0" align="center" cellpadding="0" cellspacing="3" onMouseOver="this.style.backgroundColor='#5EB6D3';" onMouseOut="this.style.backgroundColor='#FFFFFF';">
									<tr>
										<td><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#666666">
												<tr bgcolor="#FFFFFF">
													<td><a href="/bulkview/<? 
													if ($id == "pre-printed") {
													echo "insidemessage/" . strtolower(str_replace(" ", "_", $row['image_name']));
													}
													else {
													echo strtolower(str_replace(" ", "_", $row['image_name']));
													} ?>/"><img src="<? echo $row['image_link']; ?>" width="90" height="90" border="0"></a></td>
												</tr>
											</table></td>
									</tr>
								</table></td>
								<?
								$diff = $count % 5;
								if (($count % 5) == 0) {
								?>
						</tr>
						<tr>
							<td colspan="5"> </td>
						</tr>
						<? } $count++; } ?>
		  </table>
						<?
					} else {
						echo "<tr>   </tr>";
					}
					?>
				</td></tr>
		<tr><td><img src="images/spacer.gif" width="1" height="5" alt=""></td></tr>
		<tr><td class="style8"><div align="center" class="style6"></div></td></tr>
</table>
</div>



<!--- ROW FOUR --->


<div id="bottom_bar">
<a href="/termsandconditions.php">terms and conditions</a> | <a href="/privacypolicy.php">privacy policy</a> | <a href="/termsofuse.php">terms of use</a></div>
</div>
<!--- to set the dropdown values to the GET method --->
<?php

if ($_GET['submit2']) {
	$theme=$_GET['theme'];
	$purpose=$_GET['purpose'];
	$message=$_GET['message'];
}
?>
<!--- to post the email information to the server--->
<?php

if ($_POST['submit1']) {
	$email=trim($_POST['email']);
	$query="INSERT INTO email (email_address) VALUES ('$email')";
	$result=mysql_query($query);
}
?>
</body>
</html>

 

c.php

 


<?
require 'db.inc.php';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TEST CARDS UNLIMITED</title>
<link href="style/phase2.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
</html>

<!-- #BeginLibraryItem "/Library/Javascript.lbi" -->
<script language="JavaScript" type="text/javascript">
<!-- Emma 7/3/07 These are Dreamweaver javascript functions which allow the rollovers on left navigation buttons EDIT IN HOMEPAGE ONLY

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function validate(formCheck)
{
var mail = formCheck.email.value
if (mail.indexOf("@") == -1)
{
alert("Please type a valid email address");
formCheck.email.focus();
return false;
}
alert("Thanks! Your information is being registered");
return true;
}

-->
</script>
<!-- #EndLibraryItem -->
<!--- Emma 7/3/07 loads rollover images as page loads so javascript can use them without querying server --->

<body onLoad="MM_preloadImages('/buttons/home_a.gif','/buttons/view-cards_a.gif','/buttons/got-a-shot_a.gif','/buttons/vote-on-ranges_a.gif','/buttons/buy-in-bulk_a.gif','/buttons/pa-services_a.gif','buttons/shoppingcart_a.gif','/buttons/myaccount_a.gif','/buttons/about_a.gif','/buttons/contact_a.gif','/buttons/shoppingcart_a.gif')">

<div id="maincontainer" align="center">
<table width="747" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="205"><div align="left"><a href="/New_CU/homepage.php"> <img src="images/cards-unlimited-logo_3.gif" alt="Cards Un Limited" width="177" height="69" border="0" /> </a> </div></td>
    <td width="546" scope="col"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="5"><img src="images/spacer.gif" width="1" height="5" alt="" /></td>
      </tr>
      <tr>
        <td width="102"><a href="/New_CU/homepage.php"><img src="buttons/home_a2.gif" alt="Home" name="home" width="63" height="39" border="0" id="home" /></a></td>
        <td width="137"><a href="/New_CU/myaccount.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('my-account1','','buttons/myaccount_a.gif',1)"><img src="buttons/myaccount_na.gif" alt="My Account" name="my-account1" width="101" height="39" border="0" id="my-account1" /></a></td>
        <td width="97"><a href="/New_CU/about.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about1','','buttons/about_a.gif',1)"><img src="buttons/about_na.gif" alt="About" name="about1" width="63" height="39" border="0" id="about1" /></a> </td>
        <td width="103"><a href="/New_CU/contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact1','','buttons/contact_a.gif',1)"><img src="buttons/contact_na.gif" alt="Contact" name="contact1" width="75" height="39" border="0" id="contact1" /></a> </td>
        <td width="107"><a href="/New_CU/cart.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('shoppingcart1','','buttons/shoppingcart_a.gif',1)"><img src="buttons/shoppingcart_na.gif" alt="Shopping Cart" name="shoppingcart1" width="107" height="39" border="0" id="shoppingcart1" /></a></td>
      </tr>
      <tr>
        <td colspan="5"><img src="images/spacer.gif" width="1" height="2" alt="" /></td>
      </tr>
      <tr>
        <td colspan="5"><div align="right"><span class="footercolor">
          <? if (!$_SESSION['memberid'] or $_SESSION['memberid'] == "loggedout") { echo "You are not logged in; <a href=\"/login.php\">Log In</a>"; } else { echo "You are logged in; <a href=\"/logout.php\">Log Out</a>"; } ?>
        </span></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" scope="row"><img src="images/spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
</table>



<table width="747" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/fade.gif" width="747" height="2"></td>
  </tr>
</table>
<table width="747" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/spacer.gif" alt="" width="1" height="1"></td>
  </tr>
  <tr>
    <td><span class="footercolor"> <a href="/New_CU/homepage.php">Home</a></span></td>
  </tr>
  <tr>
    <td><img src="images/spacer.gif" alt="" width="1" height="1"></td>
  </tr>
</table>


<!--- LEFT NAV ---><!-- #BeginLibraryItem "/Library/leftnav.lbi" --><div id = "leftnav">
		<div id="email_box">
		<table width="100%">
		<tr>
		  <td width="100%" align="center"><form id="form1" name="form1" method="post" action="<?=$_SERVER['Library/PHP_SELF']?>">
			  <label></label>
			  <input name="email" type="text" id="email" onfocus="this.value = ''; this.onfocus = function () {}" value="E-mail address" size="15" />
			  </label>
			  <input type="submit" name="submit1" value="GO!" onclick="return validate(form1)" />
		  </form></td>
		</tr>
		</table>
		</div>


	<!--- LEFT NAV BOX --->


		<div id="leftnav_box">
			<ul>
				<li> <a href="/about-us/" title="Greeting cards">Greeting cards</a></li>
				<li> <a href="/blog/" title="Upload to Photo competition">Photo competition: upload</a></li>
				<li> <a href="/information/rent-a-parking-space/" title="Vote in Photo competition">Photo competition: vote</a></li>
				<li> <a href="/press/" title="Free email reminders">Prices & Postage</a></li>
			</ul>
		</div>

		<div id="search_box">
				<form action="http://localhost/New_CU/d.php" method="get" name = "filters" id="filters">
					<table width="90%">
					  <tr>
						<td width="51" scope="row"><div id="normal">Theme</div></td>
						<td scope="row"><select name="theme" id="theme1">
							<option value="All"<?php if($_GET['theme'] == "All") { echo ' selected="selected"'; } ?>>All</option>
							<option value="Animal"<?php if($_GET['theme'] == "Animal") { echo ' selected="selected"'; } ?>>Animal</option>
							<option value="Floral"<?php if($_GET['theme'] == "Floral") { echo ' selected="selected"'; } ?>>Floral</option>
							<option value="Leisure"<?php if($_GET['theme'] == "Leisure") { echo ' selected="selected"'; } ?>>Leisure</option>
							<option value="Travel"<?php if($_GET['theme'] == "Travel") { echo ' selected="selected"'; } ?>>Travel</option>
						</select></td>
					  </tr>
					  
					  <tr>
						<td width="51" scope="row">Purpose</td>
						<td width="97" scope="row"><select name="purpose" id="purpose">
							<option value="All"<?php if($_GET['purpose'] == "All") { echo ' selected="selected"'; } ?>>All</option>
							<option value="Personal"<?php if($_GET['purpose'] == "Personal") { echo ' selected="selected"'; } ?>>Personal</option>
							<option value="Invitations"<?php if($_GET['purpose'] == "Invitations") { echo ' selected="selected"'; } ?>>Invitations</option>
							<option value="Office"<?php if($_GET['purpose'] == "Office") { echo ' selected="selected"'; } ?>>Office</option>
							<option value="Retail"<?php if($_GET['purpose'] == "Retail") { echo ' selected="selected"'; } ?>>Retail</option>
							<option value="Wholesale"<?php if($_GET['purpose'] == "Wholesale") { echo ' selected="selected"'; } ?>>Wholesale</option>
						</select></td>
					  </tr>
					  
					  <tr>
						<td width="51" scope="row">Message</td>
						<td scope="row"><select name="message" id="message1">
							<option value="all"<?php if($_GET['message'] == "all") { echo ' selected="selected"'; } ?>>All</option>
							<option value="blank"<?php if($_GET['message'] == "blank") { echo ' selected="selected"'; } ?>>Blank</option>
							<option value="nonblank"<?php if($_GET['message'] == "nonblank") { echo ' selected="selected"'; } ?>>Non Blank</option>
							<option value="birthday"<?php if($_GET['message'] == "birthday") { echo ' selected="selected"'; } ?>>Birthday</option>
							<option value="congrats"<?php if($_GET['message'] == "congrats") { echo ' selected="selected"'; } ?>>Congratulations</option>
							<option value="getwell"<?php if($_GET['message'] == "getwell") { echo ' selected="selected"'; } ?>>Get Well Soon</option>
							<option value="thankyou"<?php if($_GET['message'] == "thankyou") { echo ' selected="selected"'; } ?>>Thank you</option>
							<option value="christmas"<?php if($_GET['message'] == "christmas") { echo ' selected="selected"'; } ?>>Christmas</option>
						  </select>            </td>
					  </tr>
					  
					  <tr >
						<td colspan="2" scope="row" align="right"><input type="submit" name="submit2" value="Find cards" /></td>
					  </tr>
					</table>
				</form>
				</div>
			</div>
<!-- #EndLibraryItem --><!--- MAIN SECTION --->
<div align="center" id="h1">photographic greeting cards for personal use and to resell </div>
		<div align="center"><img src="images/homepage_photo.jpg" width="515" height="207" alt=""></div>
  

  

  
<div><p>The Greeting Card Association estimates that we buy over 80 cards per year, per person in the UK. Given that men tend to buy fewer cards, women probably buy nearer 130. That's 130 shop visits, costing around £2 each!</br> </br>
 We sell greeting cards to individuals from 50p to £1.30 for personal or business use, or as invitations, delivered within 48 hours. We have over 80 designs, including blank cards and messaged cards. We also sell greeting cards worldwide to retailers in packs of six from 65p per card, individually wrapped in cellophane, delivered within a week.</p></div>


  		<div id="bottom_box">
		<div class="row">
			<span class="left"><a href="/greetingcards.php" title="Greeting cards">Greeting cards</a></span>
			<span class="right"><a href="/retailgreetingcards.php" title="Retail greeting cards">Retail greeting cards</a></span>
		</div>
		<div class="row">
			<span class="left"><a href="/partyinvitations.php" title="Party invitations">Party invitations</a></span>
			<span class="right"><a href="/wholesalegreetingcards.php" title="Wholesale greeting cards">Wholesale greeting cards</a></span>
		</div>
		<div class="row">
			<span class="left"><a href="/weddinginvitations.php" title="Wedding invitations">Wedding invitations</a></span>
			<span class="right"><a href="/retailgreetingcards.php" title="New stockist">Thinking of stocking cards?</a></span>
		</div>
		<div class="row">
			<span class="left"><a href="/greetingcards.php" title="Office cards">Keep a stock in the office</a></span>
			<span class="right"><a href="/contact.php" title="Contact Sample">Request sample & catalogue</a></span>
		</div>
		<div class="row">
			<span class="left"><a href="/greetingcards.php" title="Hotel cards">Cards for use in hotel industry</a></span>
			<span class="right"><a href="/retailgreetingcards.php" title="Cards Abroad">Selling cards outside the UK?</a></span>
		</div>
	</div>

<!--- ROW FOUR --->


<div id="bottom_bar">
<a href="/termsandconditions.php">terms and conditions</a> | <a href="/privacypolicy.php">privacy policy</a> | <a href="/termsofuse.php">terms of use</a></div>
</div>
</div>
<!--- to set the dropdown values to the GET method --->
<?php

if ($_GET['submit2']) {
	$theme=$_GET['theme'];
	$purpose=$_GET['purpose'];
	$message=$_GET['message'];
}
?>
<!--- to post the email information to the server--->
<?php

if ($_POST['submit1']) {
	$email=trim($_POST['email']);
	$query="INSERT INTO email (email_address) VALUES ('$email')";
	$result=mysql_query($query);
}
?>
</body>
</html>



phase2.css

 


/* CSS Document */

p {
color:#000000;
font-family: Arial, Helvetica, sans-serif;
line-height:16px;
margin-top:15px;
margin-left:5px;
}

#h1 {
font-size: large;
color: #1B82A7;
padding-bottom: 13px;
font-weight:normal;
}

body {
margin-left: 5px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 0px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}

.footercolor {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #1B82A7;
}

a:link {
color: #1B82A7;
font-weight: bold;
text-decoration:none;
font-size:12px;
}

a:hover {
text-decoration: underline;
}

a:visited {
color: #1B82A7;
}

#maincontainer { 
width: 750px; 
text-align: left; 
margin-right:auto; 
margin-left:auto; 
color: #1B82A7;
font-size:small;
margin-top:30px;
}

#leftnav {
dislay:block;
width:210px;
float:left;
padding-left: 0px;
height:auto;
}

#email_box {
background-image: url(../menus/email_box.gif);
background-repeat: no-repeat;
height: 48px;
padding-top:35px;
margin-top:10px;
}

#leftnav_box {
background-image: url(../menus/left_nav.gif);
background-repeat: no-repeat;
height: 139px;
padding-top:15px;
margin-top:17px;
}

#leftnav_box li{
list-style-type: none;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
margin-top:1px;
height: 28px;
}

#normal {
color: #1B82A7;
font-size: 12px;
}

#search_box {
background-image: url(../menus/search_box.gif);
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #1B82A7;
font-weight: bold;
background-repeat: no-repeat;
height: 150px;
padding-left: 6px;
margin-top:2px;
padding-top:50px;
}

#bottom_box {
width: 400px; 
background-color: #666666;
border: 1px solid #333; 
padding: 0px; 
margin: 0px auto;
color:#fff;
padding:2px;
}



#bottom_box a {
font-size: 12px;
color: #fff;
font-weight: bold;
text-decoration: none;
}

#bottom_box a:hover{
text-decoration: underline;
}

#bottom_bar {
background-image: url(../menus/bottom_bar.gif);
background-repeat:no-repeat;
height:70px;
padding-right:30px;
padding-top:25px;
margin-top:17px;
text-decoration:none;
color:#1B82A7;
vertical-align:bottom;
bottom:1%;
width:750px;
}

#bottom_bar a {
font-size: 12px;
color: #1B82A7;
font-weight: bold;
text-decoration: none;
}

#bottom_bar a:hover{
text-decoration: underline;
}

div.row span.left {
  float: left;
  text-align: left;
  color:#ffffff;
  font-weight: bold;
  width: 49%;
}

div.row span.right {
  float: right;
  text-align: right;
  font-weight: bold;
  color: #fff;
  width: 49%;
}



So two things to add: the relevant code is d.php (theme select, message select within "filters" form) - and when I say the formatting changes, I mean it returns to default (although larger apparently).

 

Thanks for any help. I am officially stumped.

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.