Jump to content
Larry Ullman's Book Forums

Jonathon

Members
  • Posts

    1064
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Jonathon

  1. I'm just pasting directly from the post not the editor. But thanks though :-)
  2. Well remove the 'greater than 0 clause' and use an if statement to see if quantity did equal 0. If so maybe print a css class that shows an out of stock icon or something?Or even just print some text if its out of stock?
  3. The problem with search engines are that they are outdated almost instantaneously. In your situation, you obviously want your products to be sold, so you want them in Google etc, but when they're out of stock, I wouldn't want them not in Google, because the next day they could be back in stock and many people will be prepared to wait for a product to come back in to buy, which is good for your business. The truth is that removing links from Google isn't actually that quick. You can request its removed from webmaster tools, but I don't know how easy it then is to index the page again. I genuinely think that if it was me i'd show every product but where there was no stock i'd indicate no stock "Out of stock - back soon"
  4. Good work! If not there are posts on here about how to do it. It's fairly simple to get a working mail server locally so I found.
  5. Have you configured Xampp to be able to send mail yet? It isn't a default setting.
  6. Upload a file called ".htacess" to your server. <IfModule mod_rewrite.c> RewriteEngine on # For sales: RewriteRule ^shop/sales/?$ sales.php # For the primary categories: RewriteRule ^shop/([A-Za-z\+]+)/?$ shop.php?type=$1 # For specific products: RewriteRule ^browse/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/([0-9]+)$ browse.php?type=$1&category=$2&id=$3 # For HTTPS pages: RewriteCond %{HTTPS} off RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule>
  7. Much as you do have to start somewhere, at some point you will want something that isn't documented well or you will need to modify it (at a PHP / MySQL level) to meet your needs at which point you will be fairly helpless. The stuff on Yii isn't helping you understand the language or what it's doing at a rudimentary level, it's showing you how to build an application and much as I don't know what you've read, I an assuming its a tutorial on how to implement something to Yii, are you learning or perhaps just copying what somebody else has written? By all means get as much out of Yii as you can but you really need to learn procedural PHP and then OO PHP to have any chance of using the language and framework well. PHP is not like CSS and HTML, they are pretty easy to grasp, PHP is quick to pick up (procedurally) but to really become strong at it takes time and exposure and OOP I would say is a level ahead in terms of logic/organisation. Finally a big part of being a decent programmer is being able to debug well, if your new to PHP then you have no experience in errors and how to deal with them.
  8. For the second example you don't need to test it on a live server you can do it locally. In general you don't have to use SSL but you should think of your customers, there safety and experience and if anything, many people expect to see the HTTPS in there URL when buying things, browsers such as chrome make it noticeable when your are in a SSL state, so it might put some people off if they can't see they are secure.
  9. The moveable regions of the text area are often due to the browsers. The best way in my opinion is to use css give the textarea an id and reference the height and width in the css form #textAreaIdName { height: 400px; width: 600px; } I also suggest the firefrox web developer toolbar that is extremely useful for working with css inside the browser and editing it rather than having to go back and update files with rules that may not work.
  10. As far as I understand FB doesn't use normalized data anymore it uses non relational databses such as cassandra, so I'm not entirely surprised with the data it returns, for 99% of websites non relational databases aren't really applicable, but integrating with them I suppose would bring up this kind of discrepency. I think I would be tempted to just go with the flow and not put extra strain on your own server.
  11. Yes mine are more editors, I had Netbeans a year or so, it is good especially for free. I hear PHP Storm is good think thats $99
  12. Gedit + Context (Free for PC) + Dreamweaver (Not free) Text Wrangler + BBedit for Mac (not free)
  13. <?php $link = mysql_connect('localhost', 'root', 'kingso6'); if (!$link) { die('Could not connect: ' . mysql_error()); } ?> Just try this in a file on its own What does it return? Why do your scripts have different passwords?
  14. Looks like it may have been due to not quoting. A string, you could perhaps try to escape the single quotes. So Where title=\'' . $title . '\'. Not sure if it works but you can try.
  15. are you sure that your username and password are correct? Did you actually set them to that?
  16. You have called your connection variable $bdc right at the start then later in the script you try to access it using $dbc.
  17. You're more than likely looking in the wrong place. Its the line below. XAMPP php.ini files are normally C:\xampp\php\php.ini
  18. Remove the semi colons from the php.ini file lines too. A semi colon is like a php comment, you'll possibly need to restart apache too. The values in php.inii currently have no meaning as they are still commented out I believe.
  19. As an alternative, what happens if you back up the full website and then save the tar / zip and see if when you unzip it it has all the sql back ups? I know some hosts will try and get in touch with other companies when transferring things over, might cost a small fee, but probably worth it if there's that much data. Best of luck though
  20. Hi Larry, I was just wondering in the 3rd example of the book the admin script uses 1 script to add a new print and that script can also add a new artist if they don't exist. In the 4th edition you move to separate scripts, 1 for adding a new artist and 1 to adding a new product. Is there any reason you made the change? (Out of curiosity) Thanks Jonathon
  21. I don't think it does. It isn't anything big really, I was just wondering, i copied a load of code the other day from a formatted post and reposted it with edits and it went all to pot so I thought I'd ask. Thanks Larry :-)
×
×
  • Create New...