View Full Version : Dig in
rafiki
02-29-2008, 06:48 PM
Hey People of CodingForums.com
please go as harsh as you like for
www.jamiewest.org.uk
please note I know there is no page for food at the moment.
ill check back later for feedback
thanks in advance.
Rafiki
srule_
03-01-2008, 12:57 AM
try setting a max width. When it is full screen on my 21inch monitor is looks much less attractive then when I minimize the screen a bit.
_Aerospace_Eng_
03-01-2008, 01:06 AM
The font-size is a little small. I was expecting the tabs to have rounded corners as well but they didn't. Don't use XHTML1.1 if you don't know how to pass the correct headers. Its an XHTML template yet you have some elements that are in uppercase. All elements need to be in lower case. Hmm it also looks like register globals is on. Type this in your address bar and watch what happens to the subject field.
http://www.yoursite.com/contact.php?subject=this is a test
harbingerOTV
03-01-2008, 04:29 AM
Loks wise it's fine. Along with the coding... you have all your headers as H1's. Might want to look into changing that. A min-width would be a nice touch as well.
rafiki
03-01-2008, 12:04 PM
The font-size is a little small. I was expecting the tabs to have rounded corners as well but they didn't. Don't use XHTML1.1 if you don't know how to pass the correct headers. Its an XHTML template yet you have some elements that are in uppercase. All elements need to be in lower case. Hmm it also looks like register globals is on. Type this in your address bar and watch what happens to the subject field.
http://www.yoursite.com/contact.php?subject=this is a test
@ aero
i use
value="<?php if(isset($_GET['subject'])) { echo $_GET['subject']; } ?>" because i link to that page with the subject already being sent.
also i dont no how to round the corners :( lol i should increase the font size to? @ others, min width? max width?
abduraooft
03-01-2008, 12:14 PM
value="<?php if(isset($_GET['subject'])) { echo $_GET['subject']; } ?>" should use $_POST instead, I think, as your form uses method="post"
Also apply float:left; and some suitable width for your labels(Name, Subject etc.) in contact form, which will align them well.
rafiki
03-01-2008, 12:16 PM
no because when the page loads from a link in my site the value shown in the box is from $_GET then it will check $_POST when form is submitted
also rounded corners?
-moz-border-radius: 15px 15px 15px 15px;
abduraooft
03-01-2008, 12:25 PM
Aah.. that's fine (I see your links to contact page.)
But, if you'd like to validate the form data, before sending to you/posting to DB, then you may have to change that part. Say else echo $_POST['subject']; along with the errors.
rafiki
03-01-2008, 12:28 PM
ill show you whole code you'll see how it works.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<meta name="author" content=""/>
<link rel="stylesheet" type="text/css" href="default.css" media="screen"/>
<title>Contact Me</title>
</head>
<body>
<div class="container">
<div class="header">
<div class="title">
<h1>JamieWestDotOrgDotUK</h1>
</div>
<div class="navigation">
<a href="index.php">Home</a>
<a href="blog.php">Blog</a>
<a href="contact.php">Contact Me</a>
<a href="cooking.php">Food</a>
<a href="http://php.jamiewest.org.uk/index.php">PHP Projects</a>
<div class="clearer"><span></span></div>
</div>
</div>
<div class="main">
<div class="content">
<br /><br />
<?php
$to = 'guessit@jamiewest.org.uk';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$error = 0;
if (isset($_POST['name'])){
$name = mysql_real_escape_string($_POST['name']);
}else{
echo 'Enter your name. <br />';
$error++;
}
if (isset($_POST['email'])){
$from = mysql_real_escape_string($_POST['email']);
}else{
echo 'Enter your <b>VALID</b> Email address. <br />';
$error++;
}
if (isset($_POST['subject'])){
$subjct = mysql_real_escape_string($_POST['subject']);
}else{
echo 'Enter a subject.<br />';
$error++;
}
if (isset($_POST['message']) && (strlen($_POST['message'] <= 20))){
$message = mysql_real_escape_string($_POST['message']);
}else{
echo 'Please use atleast 20 characters in your message.';
$error++;
}
if ($error == 0){
$msg = "Message: <BR/ > $message <br /> From: <br /> $from <br /> Name: $name ";
$mail = mail($to, $subject, $msg, $headers);
if($mail) {
echo 'Thanks for contacting me.';
}else{
echo 'Sorry mail could not be sent, try later.';
}
}else{
}
?>
<form action="contact.php" method="post" >
<LABEL for="name">Name:</LABEL><input id="name" type="text" name="name" class="styled" /><br />
<LABEL for="email" >Email:</LABEL><input id="email" type="text" name="email" class="styled" /><br />
<LABEL for="subject">Subject:</LABEL><input id="subject" type="text" name="subject" value="<?php echo htmlspecialchars($_GET['subject']); ?>" class="styled" /><br />
<textarea name="message" class="styled" cols="45" rows="5">Enter message here....</textarea> <br />
<br />
<input type="submit" value="Send" class="button" /><br/><br/>
</form><BR/>
ill check after work, got called in :@:@
abduraooft
03-01-2008, 12:36 PM
isset($_POST['subject']) is not enough to check whether someone filled this or not. You have to check the length or at least
if(isset($_POST['subject']) && trim($_POST['subject'])!="" )
Then you have to check the email format and so on...
BTW, remove the email id from the above post, spammers can read it.
_Aerospace_Eng_
03-01-2008, 04:29 PM
You spelt subject wrong. Also why are you using mysql_real_escape_string? What are you putting into a database?
rafiki
03-01-2008, 05:05 PM
nothing it still removes the danger element though right? ill change subject now, and the guessit@jamiewest.org.uk email address doesnt exist, its a cover for what its meant to be :D
_Aerospace_Eng_
03-01-2008, 05:14 PM
I'm guessing you are connecting to a database already then or that function call would fail without one. As to the rounded corners that only works in Mozilla based browsers. There isn't much to review on your site as you didn't actually code the front-end. I'm guessing everything else is just a blog, wordpress perhaps. I had a contact form that was getting spammed 5 times a minute. I then found this article: http://www.phpbuilder.com/columns/ian_gilfillan20060412.php3
Now I haven't received any spam since I've implemented the suggestions in the article. You can also use something like this to prevent emails that contain nothing but links.
if(preg_match('/http/i',$Name) || preg_match('/http/i',$Email) || preg_match('/http/i',$Comment))
{
// do something
}
rafiki
03-01-2008, 05:20 PM
i added
http://www.ilovejackdaniels.com/php/email-address-validation/
and will take a look into that article.
a good thing is im not indexed in google yet so spammers wont find my contact form at the moment.
@aero i also included the contents of that article, if you would be so kind as to test i would be most gratefull
rafiki
03-01-2008, 05:44 PM
IAs to the rounded corners that only works in Mozilla based browsers.
how can i round corners in all browsers?
_Aerospace_Eng_
03-01-2008, 06:46 PM
Search for nifty corners or even just rounded css corners or rounded corners with images.
rafiki
03-02-2008, 01:11 AM
i dont like using images :( and i tried ur searches they bring up images :(
_Aerospace_Eng_
03-02-2008, 03:55 AM
The round CSS corners is purely HTML and CSS no images.
http://www.cssjuice.com/25-rounded-corners-techniques-with-css/
rafiki
03-03-2008, 01:16 AM
most of them use images, didn't find none images there
_Aerospace_Eng_
03-03-2008, 01:21 AM
Learn to search please. You have the internet at your finger tips.
http://www.spiffycorners.com/
Found that in google, like 3rd or 4th result.
Rounded corners in CSS was my search term.
rafiki
03-03-2008, 05:26 PM
i just figured, i don't really care for IE users :P the best portion of viewers should be using firefox :D other than that I've added Googleads and a Firefox image, only on index.php (www.jamiewest.org.uk/index.php ) do you think this ruins it at all?
also how can i get google to rank my page better, there isnt an awfull lot of jamie wests, surely?
abduraooft
03-03-2008, 05:32 PM
i
also how can i get google to rank my page better, there isnt an awfull lot of jamie wests, surely? Hmm.. there might be the problem.. who will search for jamie wests ? ;)
rafiki
03-03-2008, 05:39 PM
people i went to school with lol, but seriously, like the other keywords etc.. too, like there will be some cooking recipes too erm coding, php, etc..
abduraooft
03-06-2008, 10:18 AM
A simple and effective way - add an SEOptimised link in your signature in CF, which would result 1000s of back-links!
_Aerospace_Eng_
03-11-2008, 06:15 PM
You say your site is optimized for Firefox yet this is what I see in Firefox 2.0.0.12
rafiki
03-11-2008, 06:18 PM
yes?
sat on the footer?
just noticed i see different...
www.jamiewest.org.uk/whatisee.png
TheShaner
03-11-2008, 09:55 PM
When you expand your window to 1280px in width, you will see what AE sees. As you shrink it, you'll get what you see now. If you continue to shrink the window, you'll get all kinds of different placements of the text and Fx graphic.
This can be corrected by putting a min-width on that column, you can make the text and graphic all one graphic instead, or you can put in a <br /> before the image to ensure the text and graphic stay on separate lines, although this still may result in differences in placement in the footer as you resize the window.
-Shane
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.