Jump to content

Its not working!!!


ZeroShade

Recommended Posts

My php code isn't working. I'm still new to it but nomatter what I do it won't even display.. would it have something to do with my css?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">			<head>						<title>DIANMAC Siding & Aluminum Works - Contact Us</title>						<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />						<link rel="StyleSheet" href="stylesheet.css" type="text/css" />			</head>			<body>						<div id="border">								 <img src="border.gif" alt="" />						</div>						<div id="topborder">								 <img src="topborder.gif" alt="" />						</div>						<div id="logo">								 <img src="logo.gif" alt="" />						</div>						<div id="siding">						</div>						<ul>								 <li><a href="index.html"><strong>Home</strong></a></li>								 <li><a href="homes.html"><strong>Showcase Homes</strong></a></li>								 <li><a href="products.html"><strong>Products</strong></a></li>								 <li><a href="newinnovations.html"><strong>New Innovations</strong></a></li>								 <li><a href="commercialworks.html"><strong>Commercial Works</strong></a></li>								 <li><a href="links.html"><strong>Affiliates</strong></a></li>										 <li><a href="aboutus.html"><strong>About Us</strong></a></li>								 <li><a href="contact.html"><strong>Contact Us</strong></a></li>						</ul>						<div id="content">								 <p />Address:								 <div id="contactaddress">								 			 <br />DIANMAC Siding & Aluminum Works											 <br />155 Crompton Dr.											 <br />Barrie, ON											 <br />L4M 6N9											 <br />Canada								 </div>								 <p />Phone Numbers:								 <div id="contactaddress">								 			 <br />Tel. (705) 734-9505											 <br />Fax. (705) 734-9854											 <br />Cell 1. (705) 333-0448											 <br />Cell 2. (705) 333-0445								 </div>								 <p />Contact Form:								 <div id="contactaddress">								 			<?php								 			 			echo "<form action='processform.php' method='post'>													 			 				<input type='text' name='Phone'>															   				<input type='submit' value='Submit Phone Number'>											 					 </form>";								 			?>								 </div>								 						</div>						<div id="info">								 <address>										   DIANMAC Siding & Aluminum Works ·								 	 		 155 Crompton Dr. ·									 		 Barrie, ON ·											 L4M 6N9 ·									 		 Canada									 		 <br />Tel. (705) 734-9505 ·									 		 Fax. (705) 734-9854								 </address>						</div>			</body></html>

Link to comment
Share on other sites

I guess, if you have this in your CSS:body {display: none;}Then I guess it would have something to do with your CSS. When you view the source with your browser, what do you see?
I don't have display none at all in my css... this is what i see on the page though:I see the text form and the submit button, they aren't clickable at all unless i select the browsers no style option. Also, I see this from the php, "; ?>just like that. Which i can't even highlight. its like an image thats just places there and can't be touched.
Link to comment
Share on other sites

Everything looks fine, what does the source look like when you view it?
This is my css code:
html, body{ 			background-color:#999999;			color:#0000cc;			font-family:sans-serif, verdana;			font-size:10pt;			scrollbar-face-color:#666666;			scrollbar-highlight-color:#ef9d20;			scrollbar-3dlight-color:#666666;			scrollbar-darkshadow-color:#666666;			scrollbar-shadow-color:#000000;			scrollbar-arrow-color:#ef9d20;			scrollbar-track-color:#999999;}#border{ 			position:fixed;			margin-left:-50px;			margin-top:-50px;			z-index:2;}#topborder{ 			position:absolute;			margin-left:-50px;			margin-top:-50px;			z-index:1;}#logo{ 		  position:absolute;			left:255px;			top:40px;}#siding{ 			display:block;			position:absolute;			width:100%;			height:100%;			left:70px;			top:40px;			x-pos:70px;			background:url('siding.gif') repeat-y;			z-index:0;}ul{ 			position:absolute;			left:50px;			top:300px;			z-index:2;}li{ 			list-style-type:none;			padding:5px;			border-style:outset;			display:block;			background-color:#666666;}a{ 			color:#ef9d20;}a:hover{ 			border-color:#000099;			color:#ff0000;}a:link{ 			text-decoration:none;}a:active{ 			color:#0000cc;}a:visited{ 			text-decoration:none;}#info{ 		 	position:absolute;			top:1000px;			left:220px;			text-align:center;			font-size:8pt;			border-top-style:solid;			border-width:1px;			border-color:#000000;}#content{ 		  position:absolute;			top:300px;			left:250px;}#contactaddress, #contactaddress2, #contactaddress3{ 		  margin-left:20px;			border-bottom-style:solid;			border-width:1px;			border-color:#000000;}input{ 		  display:block;		  margin-left:175px;			width:300px;}

and my xhtml and php is up above... you asked what my source looks like? What do u mean when i view it, like the source code itself?

Link to comment
Share on other sites

If it looks exactly the same, where you see the PHP code, then PHP is not getting executed. You need to run the page from the server, you cannot open a local PHP file in your local web browser and have the code execute it, you need to access it through http.

Link to comment
Share on other sites

If it looks exactly the same, where you see the PHP code, then PHP is not getting executed. You need to run the page from the server, you cannot open a local PHP file in your local web browser and have the code execute it, you need to access it through http.
So before i actually make a page with php, its best to get the domain name and server space and then start testing the php?
Link to comment
Share on other sites

Either that, or install a webserver and PHP on your local machine to develop with.
I've installed php and Apache... but apache is giving me one error when i try to restart it... could that be the error?I think i know the problem. The error is stating that it won't take a dll file to the server but when in fact i don't have a server set up yet. So once I set a server up on my own machine... then it will take it to the server and therefore allowing me to test php on my machine. I think I got it. thanks!!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...