Jump to content

mikey_b

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by mikey_b

  1. Bless you fenway - already realised this, re-posted on php section and received a solution striaght away. A big thank you to you and all the phpfreaks... Apologies if I should have added something to this entry. Kind regards mikey_b
  2. MadTechie your a STAR!!!!!! worked beautifully!!!! Could you possibly give me a quickie noob explanation - whatsyntax rules changed and why/where it applies. After making your suggested changes - it then went on to fall-over on later lines - all with the same syntax - when I corrected these it all worked. I can't believe the spped of the response I've had here...wow! I really enjoy doing what little php I can - it brilliant to 'make something happen' through your own coding - and it's why I'm looking for a simple explanation/update on my syntax so I can carry on doing stuff with php - I love it! Kind regards Mike
  3. Hi all, POSTED YESTERDAY IN MYSQL SECTION - PROBABLY THE WRONG SECTION!!! (+ have now used php tags with snippet) I'm sorry I don't come around here much - but please could someone help...you've always been so helpful here. A year or two ago I taught myself some php and mysql in order to create my first ever database. It's worked fine eversince (though I'm sure the snippet of code I've included below is probably extremely basic and a bit long in the tooth too!!!) I've just upgraded my VPS hosting and it has gone from MySQL 4 to version 5.0.5(?) and I'm getting the following error when tryint to run the pages... "Parse error: syntax error, unexpected ';' in /var/www/vhosts/vintage-home.co.uk/httpdocs/textile_pages/textiles_fabpage.php on line 183 " The follwing code is the whole 'piece' from around that line number - the code on line 183 is that in line 4 shown below (begins 'else {echo ?> onclick...') Could someone please tell me where I'm going wrong or what syntax rules have chaged... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <div id="polaroid_outer1" <?php if ($row_rs_textiles['image_1'] == "tx") { echo ">"; } else { echo ?> onclick="MM_goToURL('parent','../index_fab10.php?ItemCode=<?php echo $row_rs_item1['ItemCode'];?>&pagenum=<?php echo $row_rs_textiles['page_number']; ?>');return document.MM_returnValue"> <?php }?> <div id="polaroid1_status"> <?php if ($row_rs_item1['Status'] == "S") {$polaroid_overlay1 = '../images_fab/vh_sold1.png';?> <img src= <?php echo $polaroid_overlay1; ?> border="0"/> <?php } ?> <?php if ($row_rs_item1['Status'] == "R") {$polaroid_overlay1 = '../images_fab/VH_reserved1.png';?> <img src= <?php echo $polaroid_overlay1; ?> border="0"/> <?php } ?> <?php if($row_rs_textiles['image_1'] == "tx") { echo "$largeblank"; } ?> </div> <div id="pos_polaroid1"> <img src= <?php echo ("../textile_files/".$row_rs_item1['ItemCode']."/".$row_rs_item1['ItemCode']."_polaroid1.jpg");?> border="0"/></div> <div id="pos_item_name1" align="center" class="polaroid_title"> <?php if($row_rs_textiles['image_1'] == "tx") { echo "Watch this space..."; } else { echo $row_rs_item1['ItemTitle'];} ?> </div> </div> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Kind regards Mikey B
  4. Hi all, I'm sorry I don't come around here much - but please could someone help...you've always been so helpful here. I taught myself php and some mysql in order to create my first ever database. It worked fine (though I'm sure the snippet of code I've included below is probably extremely basic and a bit long in the tooth too!!!) I've just upgraded my VPS hosting and it has gone from MySQL 4 to version 5.0.5(?) and I'm getting the following error when tryint to run the pages... "Parse error: syntax error, unexpected ';' in /var/www/vhosts/vintage-home.co.uk/httpdocs/textile_pages/textiles_fabpage.php on line 183 " The follwing code is the whole 'piece' from around that line number - the code on line 183 is that in line 4 shown below (begins 'else {echo ?> onclick...') Could someone please tell me where I'm going wrong or what syntax rules have chaged... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <div id="polaroid_outer1" <?php if ($row_rs_textiles['image_1'] == "tx") { echo ">"; } else { echo ?> onclick="MM_goToURL('parent','../index_fab10.php?ItemCode=<?php echo $row_rs_item1['ItemCode'];?>&pagenum=<?php echo $row_rs_textiles['page_number']; ?>');return document.MM_returnValue"> <?php }?> <div id="polaroid1_status"> <?php if ($row_rs_item1['Status'] == "S") {$polaroid_overlay1 = '../images_fab/vh_sold1.png';?> <img src= <?php echo $polaroid_overlay1; ?> border="0"/> <?php } ?> <?php if ($row_rs_item1['Status'] == "R") {$polaroid_overlay1 = '../images_fab/VH_reserved1.png';?> <img src= <?php echo $polaroid_overlay1; ?> border="0"/> <?php } ?> <?php if($row_rs_textiles['image_1'] == "tx") { echo "$largeblank"; } ?> </div> <div id="pos_polaroid1"> <img src= <?php echo ("../textile_files/".$row_rs_item1['ItemCode']."/".$row_rs_item1['ItemCode']."_polaroid1.jpg");?> border="0"/></div> <div id="pos_item_name1" align="center" class="polaroid_title"> <?php if($row_rs_textiles['image_1'] == "tx") { echo "Watch this space..."; } else { echo $row_rs_item1['ItemTitle'];} ?> </div> </div> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Kind regards Mikey B
  5. Thanks for the replies once again folks! It's all going 'in' and hopefully some of it will stick I am scanning new questions from others just in case I can help - you never know... The two questions I asked have been answered - so thank you. Don't worry, there'll be others - there always are! Kind Regards Mike
  6. Cheers Xtopolis, It's so refreshing to just have other points of view - thank you. What you and others have said is good reading and is making me think. At the moment, folks come to the site and choose a 'type' of product (e.g. pottery, paintings etc.) and then browse that section. I've used jump menus to enable them to cross-over to any other section at will and (displaying items initially 6 to a page) a page selection option along the bottom of the page. Learning this as I go (eek!), two things that put me off getting too flash were: 1.) I read everywhere that search bots don't like your whole site to be dynamic - I presumed that currently my 300 static pages (a few dozen of which change every month as stuff is sold) did at least give good SEO as they all full of interesting related text and images blah blah blah... I think that having seen the bookmarks think work fine and also reading that google and other bots can handle url query strings provided they aren't too complex -has given me a little more confidence to use the database not only for a single product display page - but across the site for selection pages, search pages and the like. 2.) I didn't want to over-egg the pudding. I only have 250-300 products and thought that this didn't warrant having numerous fancy table structures all wizzing back and forth trying to be clever...[smile] Currently the database will have some 300 'items' within it - each with 25 fields - of which 20 are boolean (? - just a y/n value). The others are price, product name, a unique item code and then the two largest which are a both text descriptions of the item in question (a paragraph or so each). I'm quite excited by the idea of creating a relational database (I know, sad isn't it!) but didn't want to do it just because I could or if the project didn't warrant it... I suppose using a relational database I could offer folk the choice of selecting via colour, era, value etc. rather than just 'kitchenalia, bedding, paintings' etc. - but I'm not sure that's not just offering the same choice I am now but via a different set of words?... Anyway, as you say, I need to learn lots, to give it some thought - meanwhile I'll keep knibbling away at it... I'll always appreciate any comments and advise...and I don't want to ever sound like I'm questioning the knowledge and experience you all have - I'm just letting you know how the noob mind works! [smile] Mike
  7. Hi Darkwater, Thank you for your reply...much appreciated. The second point (b) is now mute - after I uploaded the database to the remote server and got everything 'talking' - the bookmarking/favourites issue is gone - bookmarks all work fine on all browsers etc. So thanks for listening to my woes on that. Regarding the point of normalizing my database - having read your comments I went and had a quick review of the basics. Strangely, amongst the hundreds of antiques we have for sale - no two are very much alike. I mean they look different, are made by different folk over time, from different places and eras. You can't really categorise them by colour or style - it's a real can o' worms... All the fields(?) in each record(?) in my sample single table database appear uniquely dependant to the primary key (the product code) though I suppose there are some generalities such as the number of photos for each and the general category they fall into (bedroom, kitchen, paintings etc.) so maybe this is where they could be normalised? I'm trying to take this gently, teaching myself everything one step at a time, and creating multiple tables seems a little daunting - but I take your point seriously and will read up on this further. Kind regards Mike
  8. Hi gnawz! Thanks for the reply... At this point, and in a nutshell, I suppose I'm asking: a) What level of security do I need for my single table database - for which there will be no user input a this stage? Is it enought that the database is password protected or do I need to protect against other stuff? b) What do I need to do to allow folk to bookmark (add to favourites) my dymanically generated pages? Google and other sources suggest that if you're only using 1 or two variables passed in a URL query string then there's no need to bother? But I saved one of my dymanically generated pages to 'favourites' and then closed the browser - opened it back up and clicked on the link only to end up having to dump out of IE7 'cus it couldn't load the page...mind you this is all happening with a local test site - it's not on my remote server as of yet... Cheers more soon Mike
  9. Hi to everyone at phpfreaks! My name is Mike and I live in Oxfordshire in the UK, am neare 50 than 40 and love riding my KTM 950 Supermoto! I'm looking forward to getting involved here and maybe even helping others when and if I can... Am using Dreamweaver 8 together with some php and now phpmyadmin and MySQL via webfusion ISP I'm self taught in dw8 and learning php/myadmin and MySQL stuff from scratch..."my mind is going - I can feel it!!!" I've run a static site for a year and a bit now selling antiques and the like (see www.vintage-home.co.uk). I like trying to do things myself and not just buying a 'site-in-a-box' kinda thing. Bear with me - there's not too much more of this... With around 300 static product pages I think it's now time to introduce my first simple database. I intend initially to keep the 'framework' of static pages but replace the core 250-300 static product pages with one master php page linked to a database. I've setup a local test server with the help of 'Easy PHP' and created some sample pages that are linked to the database with recordsets, bindings and the like - my pages are 'working' fine, getting and displaying stuff from the DB, using variables, IF's and the like and with variables passed via URL etc. Even at this early stage - I'd like to know something about keeping my database secure and hack-free (once I go live with this stuff) and how to enable folks bookmark (add to favourties) my dynamic pages?... I've tried a search or two here at freaks - but I'm not sure which keywords would best return what I'm looking for at this stage. Initially, the database will just supply bulk fill to the main display page - a single table with no customer input...I know I could do so much more but I'm doing this one step at a time. I'm sure that's more than enough for now - and I'm sorry if this is in the wrong part of the forum ??? Kind regards and thank you in advance for any assistance rendered... "...open the bomb-bay doors HAL..." mikey_b
×
×
  • 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.