Jump to content

bluedaniel

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Everything posted by bluedaniel

  1. Ive got this: RewriteRule ^recipes/compare/([0-9]+)-([0-9]+)/?$ compare.php?recipeID=$1&compare2=$2 [NC,L] # Handle recipe requests So http://www.whatcouldicook.com/recipes/compare/1169-1110 does work, but I want http://www.whatcouldicook.com/compare.php?recipeID=1169&compare2=1110 to be redirected instantly without the user knowing
  2. From a GET form this URL appears: http://www.whatcouldicook.com/compare.php?recipeID=1169&compare2=1110 I need that to look like: http://www.whatcouldicook.com/recipes/compare/1169-1110 I just cant get the .htaccess code right
  3. excellent! Thank you so much. Working (and now universal!) code: $filetype = $_FILES["uploaded_pic"]["type"]; $acceptablefiletypes = array("image/pjpeg", "image/jpeg", "image/jpg"); if (in_array($filetype, $acceptablefiletypes) && ($_FILES["uploaded_pic"]["size"] < 1000000)) {
  4. oh man how much easier would our lives be with one browser!!! your right IE is image/pjpeg while Firefox image/jpeg, and one does not satisfy both browsers, how should my code look then?
  5. This is an picture upload script that works in Firefox but not IE. Im only uploading a part of the script that I think is the culprit, if you need to see more I will oblige The error in IE is "Im sorry you can only upload a JPG which is under 1MB in size" which is outputted at the end of the script. <?php if (isset($_POST['upload'])) { if (isset($_FILES['uploaded_pic'])) { $id = $_POST['recipeID']; $filename = basename($_FILES['uploaded_pic']['tmp_name']); $ext = substr($filename, strrpos($filename, '.') + 1); if (($_FILES["uploaded_pic"]["type"] == "image/jpeg") && ($_FILES["uploaded_pic"]["size"] < 1000000)) { //Code not uploaded } else { $message = "Im sorry you can only upload a JPG which is under 1MB in size."; } } } ?> any ideas?
  6. yeah thats what I thought, to make it even more complicated I wanted a mix of Sort by Relevance and Ingredient count combined. Got the relevance sorted with "SELECT *,MATCH(Ingredients) AGAINST ('+$sqlinclude -$sqlexclude' IN BOOLEAN MODE) AS relevance FROM `recipes` WHERE MATCH(Ingredients) AGAINST ('+$sqlinclude -$sqlexclude' IN BOOLEAN MODE) ORDER BY relevance DESC" If anyone has any clues as how to go about this feel free to post! Thanks for your help p2grace anyway! my website is http://www.whatcouldicook.com/ and the code is used on the recipe finder on the first page, give it a try if you like cooking!!
  7. lol your right that is a lot closer! its missing the + symbol at the beginning of each word but I think I can fix that. Are you good with FULLTEXT? im really learning quick and getting better results each time, I wanted to return my results with a COUNT of line breaks in the Ingedients field with the lowest count coming first, any ideas what direction I should take?
  8. Working example based on your second method: $include = "0"; if (isset($_GET['include'])) { $include = $_GET['include']; $filter_array = array(", ", "\r", "\n"); $hello .= $include."*"; $sqlinclude = mysql_real_escape_string(str_replace($filter_array,"* +",$hello)); } The output of the first logic: SELECT Title, SmallDesc, id, picturesmall FROM recipes WHERE MATCH (Ingredients) AGAINST ('+ -' IN BOOLEAN MODE) AND type='0' It breaks completley
  9. I was hoping for a foreach loop as I feel it might be more robust (is it?) but the first method doesnt work, Ive already tried the second method although it doesnt add a star to the last word in the string as it doesnt have a comma after it. I could just add a star to the end of the string but is there a simpler way for the foreach loop?
  10. The php GET code: $include = "0"; if (isset($_GET['include'])) { $include = $_GET['include']; $filter_array = array(", ", "\r", "\n"); $sqlinclude = mysql_real_escape_string(str_replace($filter_array," +",$include)); } The SQL code: $query_finder = "SELECT Title, SmallDesc, id, picturesmall FROM recipes WHERE MATCH (Ingredients) AGAINST ('+$sqlinclude -$sqlexclude' IN BOOLEAN MODE) AND type='$type'"; I need to split $include into words, add a + before and a * after so "Chicken, tomato" becomes "+Chicken* +tomatoes*" now i get +Chicken +tomato
  11. So im doing a FULL TEXT Boolean search with multiple values from one string which should be split using a comma although perhaps spaces should also be included for simplicity. Also each word should have a + symbol before each word. $filter_array = array(", "); $sqlinclude = mysql_real_escape_string(str_replace($filter_array," +",$include)); Right now its basic, so "Chicken, tomato" becomes "+Chicken +tomato" as there is a + symbol at the start of the statement in SQL. The star at the end would mean that "tomato" also becomes "tomatoes" which is very important. Thanks guys
  12. ok so php file: <?php echo sprintf( '<input type="hidden" name="hdnTest" id="hdnTest" value="%s" />', htmlentities( $userid, ENT_QUOTES ) ); ?> javascript file: var userid = ( document.getElementById( 'hdnTest' ).value ); //get the value var pars = 'id='+obj.id+'&content='+new_content+'&userid='+userid; //send it to the third php page thanks people!
  13. got it sorted now, my site is mainly php but this script is a very nice addition. how do i mark it solved?
  14. Im good enough at breaking down code to know thats the part that needed editing but I just dont know what parameters, sticking a variable which is already defined in php isnt difficult is it?
  15. I have a function that requires the variable $userid in my handle page, that page just contains some post data but I need the script to also send the $userid variable as well. I have no clue how to pass variables from js
  16. Im using an Edit-In-Place script found here: http://24ways.org/2005/edit-in-place-with-ajax (js file here: http://24ways.org/examples/edit-in-place-with-ajax/editinplace.js) It works fine except I need another variable sent to the editing php handle file for database updating purposes. The variable I need is $userid which is defined in the php form page. Summary: [*]Form page - user.php [*]Ajax script - posts to useredit.php [*]Editing handle - updates the database with post variables. Thanks people, Im absolutley new to Ajax really
  17. Sorry people Ive ballsed this up a bit, Ive got my pagination working now to a point so close it hurts! http://www.whatcouldicook.com/allRecipes.php is the link that shows my trouble. The trouble is that Dreamweaver starts the recordset at page=0 which is a big problem, I cant for the life of me work out how to tell dreamweaver to start the page=1 instead. Ive changed the variables i dont know how many times but cant do it. Heres the code again <?php require_once('wordpress/wp-config.php'); require_once('wordpress/wp-includes/wp-db.php'); require_once('wordpress/wp-includes/pluggable.php'); require('includes/connection.php'); require('includes/pagination.php'); require('_drawratingmenu.php');?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_dsRecipes = 10; $pageNum_dsRecipes = 0; if (isset($_GET['pageNum_dsRecipes'])) { $pageNum_dsRecipes = $_GET['pageNum_dsRecipes']; } $startRow_dsRecipes = $pageNum_dsRecipes * $maxRows_dsRecipes; mysql_select_db($database_dsRecipes, $dsRecipes); $query_dsRecipes = "SELECT Title, SmallDesc, id, picturesmall FROM recipes ORDER BY Created_at DESC"; $query_limit_dsRecipes = sprintf("%s LIMIT %d, %d", $query_dsRecipes, $startRow_dsRecipes, $maxRows_dsRecipes); $dsRecipes = mysql_query($query_limit_dsRecipes, $dsRecipes) or die(mysql_error()); $row_dsRecipes = mysql_fetch_assoc($dsRecipes); if (isset($_GET['totalRows_dsRecipes'])) { $totalRows_dsRecipes = $_GET['totalRows_dsRecipes']; } else { $all_dsRecipes = mysql_query($query_dsRecipes); $totalRows_dsRecipes = mysql_num_rows($all_dsRecipes); } $totalPages_dsRecipes = ceil($totalRows_dsRecipes/$maxRows_dsRecipes); $queryString_dsRecipes = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_dsRecipes") == false && stristr($param, "totalRows_dsRecipes") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_dsRecipes = "&" . htmlentities(implode("&", $newParams)); } } $queryString_dsRecipes = sprintf("&totalRows_dsRecipes=%d%s", $totalRows_dsRecipes, $queryString_dsRecipes); ?> <!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=utf-8" /> <title>What Can I Cook - Viewing all Recipes</title> <link href="/_css/base.css" rel="stylesheet" type="text/css" /> <link href="/_css/recipelistings.css" rel="stylesheet" type="text/css" /> <link href="/includes/pagination.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" language="javascript" src="js/behavior.js"></script> <script type="text/javascript" language="javascript" src="js/rating.js"></script> <link rel="SHORTCUT ICON" href="_images/favicon.ico" /> </head> <body> <div id="wrapper"> <div id="header"> <div id="logoImage"></div> <div id="member"> <?php if (!is_user_logged_in()) echo "<p><a href='http://www.whatcouldicook.com/wordpress/wp-login.php?redirect_to=http://www.whatcouldicook.com/share.php'>Log in</a> / <a href='/wordpress/wp-login.php?action=register'>Sign up</a></p>"; else echo "<p>Welcome <a href='/share.php'>" . wp_get_current_user()->user_nicename . "</a> | <a href='" . wp_logout_url() . "'>Logout</a></p>" ?> </div> <form method="get" id="searchform" action="/searchresults.php"> <fieldset> <label for="s" class="hide">Quick Search:</label> <input type="text" name="s" id="s" onfocus="if (this.value == 'E.g. Lemon Cheesecake') {this.value = '';}" onblur="if (this.value == '') {this.value = 'E.g. Lemon Cheesecake';}" value="E.g. Lemon Cheesecake"/> <button type="submit" id="searchsubmit" value="Search">Go</button> </fieldset> </form> <div id="advert"><img src="http://m1.2mdn.net/viewad/2019228/Voda_prepay_728x90.gif" alt="advert" width="468" height="60" /></div> <ul id="mainNav"> <li><a href="index.php">Home </a></li> <li class="selected"><a href="allRecipes.php" class="selected">Recipes </a></li> <li><a href="features.php">Features </a></li> <li><a href="/wordpress/index.php">Blogs </a></li> <li><a href="/forum">Forum </a></li> <li><a href="share.php">Share </a></li> <li><a href="shop.html">Shop </a></li> </ul> </div> <ul id="secondaryNav"> <li><a href="/allRecipes.php">All Recipes </a></li> <li><a href="#">Celeb Chefs </a></li> <li><a href="/cuisines.php">Cuisines </a></li> <li><a href="#">Occasions </a></li> <li><a href="#">Special Diets </a></li> <li><a href="/vegetarian.php">Vegetarian </a></li> <li><a href="#">Cheap Eats </a></li> </ul> <div id="content"> <div id="title"> <h2>There are <span class="num"><?php echo $totalRows_dsRecipes ?> </span> recipes in total, you are browsing recipes <span class="num"><?php echo ($startRow_dsRecipes + 1) ?> to <?php echo min($startRow_dsRecipes + $maxRows_dsRecipes, $totalRows_dsRecipes) ?></span></h2> </div> <div class="love"> <?php echo getPaginationString($pageNum_dsRecipes, $totalRows_dsRecipes, $maxRows_dsRecipes, $adjacents, '/allRecipes.php', '?pageNum_dsRecipes='); ?> </div> <div id="searchfilter"> <h1>Recipe Index</h1> <form name="filter" method="post" action="/allRecipes.php"> <h2>Course</h2> <p><label><input name="checkbox" type="checkbox" id="checkbox1" value="1"/></label> Breakfast</p> <p><label><input name="checkbox" type="checkbox" id="checkbox2" value="2" /></label> Lunch</p> <p><label><input name="checkbox" type="checkbox" id="checkbox3" value="3" /></label> Dinner</p> <p><label><input name="dessert" type="checkbox" id="checkbox4" value="4" /></label> Dessert</p> <p><label><input name="checkbox2" type="checkbox" id="checkbox5" value="5" /></label> Snack</p> <h2>Time to Cook</h2> <p><label><input type="checkbox" name="checkbox3" id="checkbox6" /></label> Under 10 mins</p> <p><label><input type="checkbox" name="checkbox3" id="checkbox7" /></label> 10 - 30 mins</p> <p><label><input type="checkbox" name="checkbox3" id="checkbox8" /></label> 30 mins - 1 Hour</p> <p><label><input type="checkbox" name="dessert2" id="checkbox9" /></label> Between 1 - 2 Hours</p> <p><label><input type="checkbox" name="checkbox3" id="checkbox10" /></label> Over 2 hours</p> <h2>Special Considerations</h2> <p><label><input type="checkbox" id="checkbox11" value="1"/> </label> Vegetarian</p> <p><label><input type="checkbox" name="checkbox5" id="checkbox12" /></label> Vegan</p> <p><label><input type="checkbox" name="checkbox5" id="checkbox13" /></label> Cheap</p> <p><label><input type="checkbox" name="dessert3" id="checkbox14" /></label> Low-fat</p> <p><label><input type="checkbox" name="checkbox5" id="checkbox15" /></label> Low in salt</p> <h2>Author</h2> <p><label><input type="checkbox" name="checkbox4" id="checkbox16" /></label> User uploads</p> <p><label><input type="checkbox" name="checkbox6" id="checkbox17" /></label> Celebrity chef uploads</p><br/> </form> </div> <?php do { ?> <div class="method"> <h2><?php echo htmlentities($row_dsRecipes['Title']); ?></h2> <?php $recipeID = $row_dsRecipes['id']; echo rating_bar("$recipeID",'5', 'static'); ?> <p><a href="/recipe/<?php echo $row_dsRecipes['id']; ?>"><img src="<?php echo $row_dsRecipes['picturesmall']; ?>" name="recipeimg" class="recipeimg" alt="<?php echo htmlentities($row_dsRecipes['Title']); ?>" /></a></p> <p><?php echo htmlentities($row_dsRecipes['SmallDesc']); ?></p><br /> <p><a href="/recipe/<?php echo $row_dsRecipes['id']; ?>" class="link">Click here to view</a></p> </div> <?php } while ($row_dsRecipes = mysql_fetch_assoc($dsRecipes)); ?> <br /> </div> <div class="love"> </div> <div id="clear"></div> <div id="footer"> <div id="container"> <p>© 2009 WhatCanICook</p> <ul> <li><a href="/about">About Us</a> </li> <li><a href="/contact">Contact</a> </li> <li><a href="/sitemap">Sitemap</a> </li> <li><a href="/search">Search</a> </li> <li><a href="/help">Help</a> </li> <li><a href="/jobs">Jobs</a> </li> <li><a href="/terms">Terms</a> </li> <li><a href="/privacy">Privacy</a></li> </ul> </div> </div> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-7843274-2"); pageTracker._trackPageview(); } catch(err) {}</script> </body> </html> <?php mysql_free_result($dsRecipes); ?> Thanks again
  18. I dont want someone to completely re-write my code, although perhaps thats whats needed. I was thinking that the dreamweaver generated code could be slight modified to work with that script.
  19. no one? ive always had a lot of help from these forums, come on!!
  20. Hello everyone, The webpage im trying to edit is http://www.whatcouldicook.com/vegetarian.php and the code for that is displayed below. the pagination script is: http://www.strangerstudios.com/sandbox/pagination/diggstyle_function.txt Basically I think I need to destroy the dreamweaver created query set and start a fresh, creating the variables needed for the pagination function ~ getPaginationString($page, $totalitems, $limit, $adjacents, $targetpage, $pagestring). Im going crazy looking at this code so if anyone could re-work it for me I would be eternally grateful. <?php require_once('wordpress/wp-config.php'); require_once('wordpress/wp-includes/wp-db.php'); require_once('wordpress/wp-includes/pluggable.php'); require('includes/connection.php'); require('includes/pagination.php'); require('_drawratingmenu.php');?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_dsRecipes = 15; $page = 0; if (isset($_GET['page'])) { $page = $_GET['page']; } $startRow_dsRecipes = $page * $maxRows_dsRecipes; mysql_select_db($database_dsRecipes, $dsRecipes); $query_dsRecipes = "SELECT Title, SmallDesc, id, picturesmall FROM recipes WHERE Vegetarian=1 ORDER BY Created_at DESC"; $query_limit_dsRecipes = sprintf("%s LIMIT %d, %d", $query_dsRecipes, $startRow_dsRecipes, $maxRows_dsRecipes); $dsRecipes = mysql_query($query_limit_dsRecipes, $dsRecipes) or die(mysql_error()); $row_dsRecipes = mysql_fetch_assoc($dsRecipes); if (isset($_GET['totalRows_dsRecipes'])) { $totalRows_dsRecipes = $_GET['totalRows_dsRecipes']; } else { $all_dsRecipes = mysql_query($query_dsRecipes); $totalRows_dsRecipes = mysql_num_rows($all_dsRecipes); } $totalPages_dsRecipes = ceil($totalRows_dsRecipes/$maxRows_dsRecipes)-1; $queryString_dsRecipes = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "page") == false && stristr($param, "totalRows_dsRecipes") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_dsRecipes = "&" . htmlentities(implode("&", $newParams)); } } $queryString_dsRecipes = sprintf("&totalRows_dsRecipes=%d%s", $totalRows_dsRecipes, $queryString_dsRecipes); ?> <!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=utf-8" /> <title>Vegetarian Recipes - What Could I Cook?</title> <link href="/_css/base.css" rel="stylesheet" type="text/css" /> <link href="/_css/recipelistings.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" language="javascript" src="js/behavior.js"></script> <script type="text/javascript" language="javascript" src="js/rating.js"></script> <link rel="SHORTCUT ICON" href="_images/favicon.ico" /> </head> <body> <div id="wrapper"> <div id="header"> <div id="logoImage"></div> <div id="member"><?php if (!is_user_logged_in()) echo "<p><a href='http://www.whatcouldicook.com/wordpress/wp-login.php?redirect_to=http://www.whatcouldicook.com/share.php'>Log in</a> / <a href='/wordpress/wp-login.php?action=register'>Sign up</a></p>"; else echo "<p>Welcome <a href='/share.php'>" . wp_get_current_user()->user_nicename . "</a> | <a href='" . wp_logout_url() . "'>Logout</a></p>" ?> </div> <form method="get" id="searchform" action="/searchresults.php"> <fieldset> <label for="s" class="hide">Quick Search:</label> <input type="text" name="s" id="s" onfocus="if (this.value == 'E.g. Lemon Cheesecake') {this.value = '';}" onblur="if (this.value == '') {this.value = 'E.g. Lemon Cheesecake';}" value="E.g. Lemon Cheesecake"/> <button type="submit" id="searchsubmit" value="Search">Go</button> </fieldset> </form> <div id="advert"><img src="http://m1.2mdn.net/viewad/2019228/Voda_prepay_728x90.gif" alt="advert" width="468" height="60" /></div> <ul id="mainNav"> <li><a href="index.php">Home </a></li> <li class="selected"><a href="allRecipes.php" class="selected">Recipes </a></li> <li><a href="features.php">Features </a></li> <li><a href="/wordpress/index.php">Blogs </a></li> <li><a href="/forum">Forum </a></li> <li><a href="share.php">Share </a></li> <li><a href="shop.html">Shop </a></li> </ul> </div> <ul id="secondaryNav"> <li><a href="/allRecipes.php">All Recipes </a></li> <li><a href="#">Celeb Chefs </a></li> <li><a href="/cuisines.php">Cuisines </a></li> <li><a href="#">Occasions </a></li> <li><a href="#">Special Diets </a></li> <li><a href="/vegetarian.php">Vegetarian </a></li> <li><a href="#">Cheap Eats </a></li> </ul> <div id="content"> <div id="title"> <h2>There are <span class="num"><?php echo $totalRows_dsRecipes ?> </span> Vegetarian recipes, showing recipes <span class="num"><?php echo ($startRow_dsRecipes + 1) ?> to <?php echo min($startRow_dsRecipes + $maxRows_dsRecipes, $totalRows_dsRecipes) ?></span></h2> </div> <div class="love"> <div class="left"> <?php if ($page > 0) { // Show if not first page ?> <a href="<?php printf("%s?page=%d%s", $currentPage, 0, $queryString_dsRecipes); ?>" class="first">First</a> <a href="<?php printf("%s?page=%d%s", $currentPage, max(0, $page - 1), $queryString_dsRecipes); ?>" class="previous">Previous</a> <?php } // Show if not first page ?></div> <div class="right"><?php if ($page < $totalPages_dsRecipes) { // Show if not last page ?> <a href="<?php printf("%s?page=%d%s", $currentPage, min($totalPages_dsRecipes, $page + 1), $queryString_dsRecipes); ?>" class="next">Next</a> <a href="<?php printf("%s?page=%d%s", $currentPage, $totalPages_dsRecipes, $queryString_dsRecipes); ?>" class="last">Last</a> <?php } // Show if not last page ?></div> </div> <div id="searchfilter"> <h1>Recipe Index</h1> <form name="filter" method="post" action="/allRecipes.php"> <h2>Course</h2> <p><label><input name="checkbox" type="checkbox" id="checkbox1" value="1"/></label> Breakfast</p> <p><label><input name="checkbox" type="checkbox" id="checkbox2" value="2" /></label> Lunch</p> <p><label><input name="checkbox" type="checkbox" id="checkbox3" value="3" /></label> Dinner</p> <p><label><input name="dessert" type="checkbox" id="checkbox4" value="4" /></label> Dessert</p> <p><label><input name="checkbox2" type="checkbox" id="checkbox5" value="5" /></label> Snack</p> <h2>Time to Cook</h2> <p><label><input type="checkbox" name="checkbox3" id="checkbox6" /></label> Under 10 mins</p> <p><label><input type="checkbox" name="checkbox3" id="checkbox7" /></label> 10 - 30 mins</p> <p><label><input type="checkbox" name="checkbox3" id="checkbox8" /></label> 30 mins - 1 Hour</p> <p><label><input type="checkbox" name="dessert2" id="checkbox9" /></label> Between 1 - 2 Hours</p> <p><label><input type="checkbox" name="checkbox3" id="checkbox10" /></label> Over 2 hours</p> <h2>Special Considerations</h2> <p><label><input type="checkbox" id="checkbox11" value="1"/> </label> Vegetarian</p> <p><label><input type="checkbox" name="checkbox5" id="checkbox12" /></label> Vegan</p> <p><label><input type="checkbox" name="checkbox5" id="checkbox13" /></label> Cheap</p> <p><label><input type="checkbox" name="dessert3" id="checkbox14" /></label> Low-fat</p> <p><label><input type="checkbox" name="checkbox5" id="checkbox15" /></label> Low in salt</p> <h2>Author</h2> <p><label><input type="checkbox" name="checkbox4" id="checkbox16" /></label> User uploads</p> <p><label><input type="checkbox" name="checkbox6" id="checkbox17" /></label> Celebrity chef uploads</p><br/> </form> </div> <?php do { ?> <div class="method"> <h2><?php echo htmlentities($row_dsRecipes['Title']); ?></h2> <?php $recipeID = $row_dsRecipes['id']; echo rating_bar("$recipeID",'5', 'static'); ?> <p><a href="/recipe/<?php echo $row_dsRecipes['id']; ?>"><img src="<?php echo $row_dsRecipes['picturesmall']; ?>" name="recipeimg" class="recipeimg" alt="<?php echo htmlentities($row_dsRecipes['Title']); ?>" /></a></p> <p><?php echo htmlentities($row_dsRecipes['SmallDesc']); ?></p> <p><a href="/recipe/<?php echo $row_dsRecipes['id']; ?>" class="link">Click here to view</a></p> </div> <?php } while ($row_dsRecipes = mysql_fetch_assoc($dsRecipes)); ?> <br /> </div> <div class="love"> <div class="left"><?php if ($page > 0) { // Show if not first page ?> <a href="<?php printf("%s?page=%d%s", $currentPage, 0, $queryString_dsRecipes); ?>" class="first">First</a> <a href="<?php printf("%s?page=%d%s", $currentPage, max(0, $page - 1), $queryString_dsRecipes); ?>" class="previous">Previous</a> <?php } // Show if not first page ?></div> <div class="right"><?php if ($page < $totalPages_dsRecipes) { // Show if not last page ?> <a href="<?php printf("%s?page=%d%s", $currentPage, min($totalPages_dsRecipes, $page + 1), $queryString_dsRecipes); ?>" class="next">Next</a> <a href="<?php printf("%s?page=%d%s", $currentPage, $totalPages_dsRecipes, $queryString_dsRecipes); ?>" class="last">Last</a> <?php } // Show if not last page ?></div> </div> <div id="clear"></div> <div id="footer"> <div id="container"> <p>&#169; <?php echo date('Y'); ?> Whatcouldicook</p> <ul> <li><a href="/about">About Us</a> </li> <li><a href="/contact">Contact</a> </li> <li><a href="/sitemap">Sitemap</a> </li> <li><a href="/search">Search</a> </li> <li><a href="/help">Help</a> </li> <li><a href="/jobs">Jobs</a> </li> <li><a href="/terms">Terms</a> </li> <li><a href="/privacy">Privacy</a></li> </ul> </div> </div> </div> </body> </html> <?php mysql_free_result($dsRecipes); ?>
  21. still no luck in firefox, cant for the live of me work this out
  22. <!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=utf-8" /> <title>What Can I Cook | Upload Your Recipe</title> <link REL="SHORTCUT ICON" HREF="_images/favicon.ico"> <link href="/_css/base.css" rel="stylesheet" type="text/css" /> <link href="/_css/uploadrecipe.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="header"> <h1>What Can I Cook?</h1> <div id="logoImage"></div> <ul id="mainNav"> <li><a href="index.html">Home </a></li> <li><a href="allRecipes.php">Recipes </a></li> <li><a href="features.php">Features </a></li> <li><a href="blogs.php">Blogs </a></li> <li><a href="forum.php">Forum </a></li> <li><a href="share.php">Share </a></li> <li><a href="shop.html">Shop </a></li> </ul> </div> <div id="content"> <h1>Add your Recipe</h1> <p>We have tried to make this as painless as possible for you, below are the fields you can enter your information into and we have written tips and examples to the right of them to help smooth the process.</p> <form enctype="multipart/form-data" form id="form1" name="form1" method="post" action="newrecipe.php"> <table width="801" border="0" id="recipeupload2"> <tr> <td width="169" valign="top"><h1> Recipe Title: <label></label> </h1></td> <td width="622" valign="top"><input name="title" type="text" id="title" size="60" maxlength="60" /> </td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>Please choose your title carefully, it should be descriptive to other users.</p></td> </tr> <tr> <td valign="top"><h1>Small Description: <label></label> </h1></td> <td valign="top"><textarea name="smalldesc" cols="60" rows="3" id="smalldesc"></textarea> </td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>This will appear when a user searches for a recipe, this small description could be why you like this recipe or why others will want to try it. e.g. a Quick and Simple hearty meal etc.</p></td> </tr> <tr> <td valign="top"><h1>Ingredients: <label></label> </h1></td> <td valign="top"><textarea name="ingredients" cols="60" rows="5" id="ingredients">100g pasta, 4 chicken breasts, grated cheese</textarea> </td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>NOTE: To seperate each ingredient use a comma (,). If you use a comma then anything after that will be shown as a new item, above is the way you should type your ingredients.</p></td> </tr> <tr> <td valign="top"><h1>Method: <label></label> </h1></td> <td valign="top"><textarea name="method" cols="60" rows="5" id="method"></textarea> </td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>Separate steps using paragraphs, hit "enter" key. Do not number steps (we'll do that for you). </p></td> </tr> <tr> <td valign="top"><h1>Time: <label></label> </h1></td> <td valign="middle"><input type="text" name="time" id="time" /></td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>How long will it take to make this recipe? This is a total figure with preperation taken into account.</p></td> </tr> <tr> <td valign="top"><h1>Servings: <label></label> </h1></td> <td valign="middle"><input type="text" name="amount" id="amount" /></td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>How many servings will this recipe make? e.g You could type 'X Portions', 'X Helpings' or 'X Cookies'</p></td> </tr> <tr> <td valign="top"><h1>Upload Picture:</h1></td> <td valign="top"><label> <input type="hidden" name="MAX_FILE_SIZE" value="1000000" /> <input name="uploaded_pic" type="file" /> </label></td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>This is greatly encouraged as it will make your recipe really stand out from the crowd, the dimensions will be 235px by 215px. It must be a jpeg image and not exceed 350kb in size.</p></td> </tr> <tr> <td valign="top"><h1>Keywords: <label></label> </h1></td> <td valign="top"><textarea name="keywords" cols="60" rows="2" id="keywords"></textarea></td> </tr> <tr> <td valign="top"> </td> <td valign="top"><p>This is for our search engine, it could be anything you like and will mean that the words above will make your recipe appear when someone searches for that word. You could leave this blank if want.</p></td> </tr> <tr> <td colspan="2" valign="top"><label> <input type="button" name="cancel" id="cancel" value="Cancel" onclick="history.back()" /> <input type="submit" name="continue" id="continue" value="Continue" /> </label></td> </tr> </table> </form> </div> <div id="clear"></div> <div id="footer">© 2007 Cheek Chastain Gallery. No portion of this website or artwork portrayed herein may be redistributed of republished without the expressed consent of Cheek Chastain Gallery. View our full legal disclaimer here.</div> </div> </body> </html>
×
×
  • 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.