craigpettit's Profile
Reputation: 0
Neutral
- Group:
- Members
- Active Posts:
- 170 (0.13 per day)
- Joined:
- 11-September 08
- Profile Views:
- 3,306
- Last Active:
Dec 10 2011 09:37 AM- Currently:
- Offline
My Information
- Member Title:
- Dedicated Member
- Age:
- 23 years old
- Birthday:
- February 2, 1989
- Gender:
-
Not Telling
- Location:
- Surrey UK
Contact Information
- E-mail:
- Click here to e-mail me
- MSN:
-
craig@craigpettit.com
- Website URL:
-
http://www.craigpettit.com
Users Experience
- Experience:
- Intermediate
- Area of Expertise:
- Web Developer
Latest Visitors
-
Sathish 
06 Oct 2011 - 16:33 -
bb_matt 
06 Aug 2011 - 10:24 -
Wickham 
21 Mar 2011 - 07:00 -
admin-jag 
19 Jan 2011 - 07:26 -
Circles 
30 Dec 2010 - 15:41 -
jasbery 
13 Dec 2010 - 23:29 -
webdesigner93 
13 Dec 2010 - 22:55 -
JordanGardom 
13 Dec 2010 - 16:04 -
SniderDK 
06 Dec 2010 - 19:57 -
tonychang 
21 Sep 2010 - 13:52
Topics I've Started
-
php noob here
13 October 2011 - 04:37 PM
Hi all, i dont knwo where to start.
I want to developer a very basic plugin or even find one online that selects 5 products from my category
displays them as a linked list
using jquery preload the first item and hide the other four until they are clicked on,
I dont know if this makes sense but just some sort of idea where to start would be great
Craig -
css % em
08 October 2011 - 12:48 PM
hi all
i am designing a website in % and em its my first site so im just looking for some tips on everything really.
any help would be greatly appreciated.
Regards and thanks in advance
Craig -
simple insert script,
27 September 2011 - 03:41 PM
Hi all, this insert script is returning this error and i have no idea what is wrong with it.
any help would be greatly appreciated. Thanks in advance
Could not insert record: Column count doesn't match value count at row 1
<?php
include 'includes/header.php';
?>
<div id="content_body">
<?php
$mysqli = mysqli_connect(Connection details removed);
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
} else {
$sql = "INSERT INTO feedback (feedback_name, feedback_message) VALUES ('".$_POST[feedback_name].", ".$_POST[feedback_message]."')";
$res = mysqli_query($mysqli, $sql);
if ($res === TRUE) {
echo "Thank you for leaving your feedback";
} else {
printf("Could not insert record: %s\n", mysqli_error($mysqli));
}
mysqli_close($mysqli);
}
?>
</div>
<?php
include 'includes/footer.php';
?> -
basic contact form
24 September 2011 - 12:11 AM
Good morning all.
ive got a very basic contact form, that doesnt seem to be sending mail;
can anyone advise, somethign tells me that its the fparim,
<fieldset id="request_complete"><legend>Quote Request Complete</legend>
<?php
echo "<p class=\"returned_msg\">Thank you, ".$_POST["quote_name"]." . One of our advisors will contact you shortly on the telephone number you have provided.";
?>
</fieldset>
<?php
//lets complete the mailing string,
//personal details
$quote_requested .= "Name ".$_POST[quote_name]. "\n";
$quote_requested .= "DOB: ".$_POST[quote_day]." ".$_POST[quote_month]." ".$_POST[quote_year]." \n ";
$quote_requested .= "Smoking Status: ".$_POST[quote_smoker]."\n";
$quote_requested .= "Policy: ".$_POST[quote_policy]."\n";
//$quote_requested .= "Critical Illness: ".$_POST[quote_critical]."\n";
$quote_requested .= "Amount: ".$_POST[quote_amount]. "\n";
$quote_requested .= "Term: ".$_POST[quote_term]."\n";
$quote_requested .= "Mobile Number: ".$_POST[quote_mobile]."\n";
$quote_requested .= "House Number: ".$_POST[quote_home]."\n";
$quote_requested .= "Preferred contact: ".$_POST[quote_contact]."\n";
//setup the mail
$recipient = "email address removed";
$subject = "QUOTE REQUIRED";
$mailheaders = "FROM: <Title> \n";
//send the mail
mail($recipient, $subject, $quote_requested, $mailheaders);
?>
Thanks in advance
Craig -
5 results again
04 August 2011 - 09:28 AM
Good morning
I have deleveoped a system where php pulls the top 5 results and of my catalog and displays them as a vertical nav
example
product 1
product 2
product 3
product 4
product 5
what i am trying to acheive is...
on page load, product ones image loads to the right of the nav and the 4 other products are hidden but the nav still visible
then if i click either of the other product titles. product 1s image disappears and then the relative product image appears.
Here is my code.
any help would be greatly appreciated.
<div class="top_5_cats"> <?php if (mysql_connect()) { printf("Connect failed: %s\n", mysql_error()); exit(); } else { $sql_comp = "SELECT title, price, picture FROM products WHERE category = 'computing' LIMIT 0, 5"; $res_comp = mysql_query($sql_comp); //May need connection variable if ($res_comp) { $compArray = array(); while($i = mysql_fetch_array($res_comp, MYSQL_ASSOC)){ $compArray[] = $i; } if($compArray){ ?> <div class="top_5_links"> <?php foreach($compArray as $key => $data){ ?> <ul><li class="tp_links" id="tp_link_<?php echo $key; ?>"><?php echo $data['title'];?></li></ul> <?php } ?> </div> <?php foreach($compArray as $key => $data){ ?> <div class="top_5_image" id="tp_image_<?php echo $key; ?>"> <img src="../images/thumbs_/<?php echo $data['picture']; ?>" alt="<?php echo $data['title'];?>"/> <big style="color:green"> £<?php echo $data['price'];?></big> </div> <?php } ?> <script type="text/javascript"> $(document).ready(function() { <?php foreach($compArray as $key => $data){ ?> $('#tp_link_<?php echo $key; ?>').click(function() { $('#tp_image_<?php echo $key; ?>').fadeIn(2); $('.top_5_image').hide(); }); <?php } ?> }); </script> <?php }//end is_array } else { printf ("Could not retrieve data: %s\n", mysqli_error()); } mysql_free_result($res_comp); mysql_close(); } ?> </div>
CSS....
.top_5_cats { width: 29%; border: 0.1em solid #333; height: auto; float: left; margin: 1.6em; } .top_5_image { display:none; float:left; width: 55%; } .top_5_links, #tp_link { color:#FFF; width: 45%; height: auto; cursor:pointer; font-size: 0.3em; font-family:sans-serif; float: left; background-color: #050505; border-bottom: 0.1em solid #CCC; } .top_5_links:hover { color:#FFF; width: 45%; height: auto; cursor:pointer; font-size: 0.3em; font-family:sans-serif; float: left; text-decoration:underline; background-color: #050505; border-bottom: 0.1em solid #CCC; } .top_5_links ul { list-style:none; margin:0; display:block; float: left; padding-top:1em; padding-bottom: 1em; padding-left: 0.4em; } .top_5_links li { position: relative; list-style:none; display: inline; } #tp_image { display: none; }
Any advise would be aprecaited.
Thanks in advance.
Craig
Help




Find My Content
Display name history
Comments
craigpettit has no profile comments yet. Why not say hello?