Jump to content

roondog

Members
  • Posts

    212
  • Joined

  • Last visited

Posts posted by roondog

  1. i've got this code for a contact form very simple. The only thing is the $_REQUEST part isn't working

    <?phpif(isset($_POST['submit'])) {$to = "mail@host.co.uk";$subject = "Teversham FC";$name_field = $_POST['name'];$email_field = $_POST['email'];$message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; echo "Thankyou <?php echo $_REQUEST['name']; ?php> for e-mailing Teversham FC\n Back to <a href='http://www.tevershamfc.co.uk'>Home Page</a>";mail($to, $subject, $body);} else {echo "You have come to the wrong page please follow this <a href='/mainpages/contact.html'>link</a> ";}?>

    I want to show the name of the person who fills it in. So say if John filled out the form it would say Thankyou John etc.Where am i going wrong?This what it shows:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/roondog/domains/tevershamfc.co.uk/public_html/php/mail.php on line 12

  2. Hi Dug,I would suggest making a portfolio site for yourself showcasing your skills. Then advertise yourself to get some experience. I'm using Gumtree and have just put up some adverts for free web design to build up my portfolio. Also if you know anyone with a business offer your services. Once you have a decent portfolio of work you should be ok to start applying for proper work.Good Luck

  3. Prateek:spans are used for applying styles to sections of text only. A div contains other divs, imgs, ps etc. but is you are changing just a small portion of text within some other text use a span. THis is my understanding anyway. i.e if you have a paragraph and you want to style a sentence in the middle you would use a span.

  4. I've got four divs within a container but they are not showing in the correct order.

    <!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" lang="en" xml:lang="en"> <head><style type="text/css">.fixtures{	width:800px;	}table{margin-top: 10px;width: 800px;background-color:white;text-align: left;}</style><link rel="stylesheet" type="text/css"href="/thfc/stylesheet.css" /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>THFC Fixtures</title>         </head>    <body><div id="container"><div id="banner"><img src="/thfc/pictures/fixtures.jpg" alt="banner" /></div><div id="links"><a href="/index.html">HOME</a> |<a href="/mainpages/news.html">NEWS</a> | <a href="/mainpages/table.html">TABLE</a> | <a href="/mainpages/profiles.html">PLAYERS</a> | <a href="/mainpages/stats.html">STATISTICS</a> | <a href="/mainpages/info.html">CLUB INFO</a> | <a href="/mainpages/archive.html">ARCHIVE</a> | <a href="/mainpages/wallpaper.html">DOWNLOADS</a> | <a href="http://www.a-free-guestbook.com/guestbook.php?username=Tevershamhotspurs">GUESTBOOK</a> | <a href="/mainpages/links.html">LINKS</a> </div><div class="fixtures"><table><tr><td>guhuhuh</td></tr></div></div><div id="footer"><span>© Teversham Hotspurs F.C | Design by Roondog Interweb Design MMVII | Contact<span></div></body></html> 

    body{margin: 0;font-family: tahoma;font-size:.9em;background:url(/thfc/pictures/bg.jpg);}#container{margin:0 auto;width: 800px;height: 650px;text-align:left;}#containerb{margin:0 auto;width: 800px;height: 100%;text-align:left;}#banner{	width:800px;	height:100px;	background: url(/thfc/pictures/title.jpg);	border: 1px solid black;}#links{	width: 750px;	height: 25px;	background-color: yellow;	padding-top: 5px;	padding-left: 50px;	margin-top: 5px;	border: 1px solid black;}#main{	width: 800px;	height: 485px;	margin-top: 10px;	padding-top:15px;	background: url(/thfc/pictures/homeback.gif);}#footer{	width: 800px;	height: 22px;	margin-top:10px;	padding-top:3px;	background: url(/thfc/pictures/border.gif);	font-size:.8em;	text-align:center;}#top{	width:800px;	height: 200px;	margin-top:0px;}#bottom{	width:800px;	height: 200px;	margin-top:50px;}#blocka{	width:144px;	height:217px;	margin-left: 20px;	padding-top:3px;	float:left;	background:url(/thfc/pictures/homelink.gif)}#blockb{	width:144px;	height:217px;	margin-left: 10px;	padding-top:3px;	float:left;	background:url(/thfc/pictures/homelink.gif)}#title{	margin-left:20px;}a{	color:black;	text-decoration:none;}a:link{}a:visited{}a:hover{	text-decoration:underline;}a:active{}

    The fixtures and footer divs are showing the wrong way round. Really not sure why.

  5. Wahey it all works i was just being stupid all I had to do was click on the wamp icon. (how obvious was that!!) Now I have to learn some php to use with it. I was going to go through the w3schools tutorials then try to develop a news page that readers can comment on. Is this a good plan? Are there more simple things to do as a first project?

  6. I was thinking of something like this.

    <html><head><style type="text/css">#nav{background-color:blue}</style></head><body><?phpif (anchorObject.href=="document.domain"){document.getElementById("#nav").bgColor="green"}?><a id="nav" href="page1.html">page1</a><a id="nav" href="page2.html">page2</a><a id="nav" href="page3.html">page3</a></body></html>

    but obviously something that works. I also think this would change all the links rather than just the current one.

  7. I'll try to explain further. say this is the menu:<a href="/page1.html">page1</a><a href="/page2.html">page2</a><a href="/page3.html">page3</a>i want the background to the links to be blue but if i'm on page1 i want it the page1 link to have a green background. if i'm on page3 i want the page3 link to be green. I can then put the menu on every page and the link to the page you are on has a different background. Is this possible with php or would it be Javascript?

  8. I'm very new to PHP and I want to set up a menu as a PHP include. This seems very straight forward in itself but I would like the link to the current page to be styled differently to the others. I think I need to use an if statement but not sure what to use as the variables etc. Is this actually possible?

×
×
  • Create New...