Edward
Members-
Posts
1115 -
Joined
-
Last visited
-
Days Won
27
Everything posted by Edward
-
Delaying A Form Submission
Edward replied to giantsfan24's topic in Modern Javascript: Develop and Design
Thanks Hartley San, i am starting this Modern Javascript book just right now, so i may have some questions soon, i was working on other object orientated stuff but now its time to get this done and dusted by new year. -
Hey Larry, I was wondering if you would know this, will Yii 2 be completely in HTML5, since this is the new standard for HTML? Also any feedback from the big boys at Yii 2 on when the alpha will be coming out? Eager to get started learning this.
-
Delaying A Form Submission
Edward replied to giantsfan24's topic in Modern Javascript: Develop and Design
The common way is to disable the submit button with Javascript. eBay and all the other sites do that. You would require a php flag method just in case the user disabled js. -
Monday, September 24, 2012 Currently i have been working on the Modern Javascript Develop and Design book, i am up to page 250, i am working through 20 pages per day from Monday - Friday. The book is easy to understand but js has odd behavior unlike PHP, many things there that can trip you up as Larry says. In the other half of the day i am building my practice version of my website. I am not doing review and pursue in the js book, for me i think its a waste of time, my aim is to get this book completed as soon as possible. Ive got plently of pages in my site waiting for js to be applied to, so as soon as i learn these particular parts, i will be coding them into my site, so that's my review and pursue, the real thing. From what i can see so far is most of the JS stuff i need is basic, objects and stuff like that there would be no need for as PHP will handle this stuff on the server side.
-
Monday, September 24, 2012 Despite what i said in my earlier posts about frameworks i have decided it would be best i use one. I think when we are building a web site we need something concrete to build in that is stable tried and tested a framework can offer that. Last thing you want is your web site crumbling beneath you. The other reason is the documentation, if i make my own php framework and work into it, how am i going to explain to a co worker how it all works, at least with Yii they can read their documentation or even Larry's new ebook to see how it works, documentation is something i don't have the time to write.
-
Monday, September 24, 2012 I am currently using Dreamweaver CS5.5 i am aware CS6 has been out for a while now, i just ordered the new Adobe Classroom in a book for Dreamweaver CS6 and Illustrator CS6. I will be upgrading to CS6 in October. I have read books before to learn Fireworks and Photoshop, but i gather and i have heard from other web designers that Adobe Illustrator is the best tool for making web graphics as it pixel perfect. So my plan is to learn this Illustrator CS6 100% along with CSS which my skill is weak in now, and when i talk about graphics, i want awesome graphics for my website, its important to me. From what i can see i think CSS needs a hell of a lot of practice/experience to get some great CSS3 graphics, and i think its going to be a lot more work than learning PHP as its a form of art. Maybe some of you will disagree but for me anyway Art is one of my weak points, i am stronger with code logic. I am currently using Blueprints grid framework CSS yes its awesome easy to use and understand, but its just foundation, i am gonna have to add a down of my own id's and classes for it really to be awesome.
-
Monday, September 24, 2012 What can i say, well Ive done quite a bit of work since my last log, but i guess that's what you would expect, huh? Okay Ive coded 12 dynamic PHP pages of my site now, i am finding things are quite easy for me now, pretty much anything i code works 100% first time. Larry PHP and MySQL book has really helped me a lot, i think the hardest part of my site was probably logging users in with all there info and listing products into the site. Once this stuff was completed most of the actions of the site were just updating or view info from the database by triple or quadruple joins, sounds hard but its actually quite easy. Most of the things i thought were difficult with a bit of practice just become a second nature. I did loads of validation and quite serious code at the beginning of my site, this was necessary for practice, now i know if i wanted i could just validate or add filters anywhere. But what i done now is just code in pages and leave this stuff out because the practice version of my site will not be final. I felt that it would be a better idea to see how the data was fetched and manipulated page by page. The other advantage is i am seeing repeated code i mean code being used more than once, i can see code that can be added into a User and Product class. So what i am saying is i am getting an idea for classes that i can construct to help me with the site for a final version.
-
That's really cool, love to see these projects. One thing i forgot to tell you, get yourself a CSS grid framework they will save you a lot of time and clear up ie bugs etc. I am using blueprints css framework and my site looks pro even though i barely done anything, check out http://blueprintcss.org/.
-
I think i could call this a bit more than a project what i am considering to do, projects are built and finished, this is something that isn't going to stop being built, its literally impossible to finish. One point that has just come to my mind is that when i start to employ people to work with me, it would probably better in this situation to use a documented framework otherwise i would have to document my own, which i already don't have time for. Having Yii documentation already done would save my people time. The other reason is that i already have to write my own classes for the structure of the site, so i have little time for this, if i have to write helper classes as well, its going to be more tough. It looks like i have no choice but to give in to Yii 2. So now i am bashing away at getting OOP firmly gripped, believe me Mr Larry, i will be pinching you on all the points in that Yii 2 when it comes up from start to finish, i want to know exactly how the whole structure works. I don't mean it in a bad way but i will be counting on you. I was thinking of sending you some kind of present this Christmas, but will have to see how you do. Thanks Larry.
-
Here is my code that works if it helps, check the directory settings, use a url relative to htdocs not a C drive location. <script type="text/javascript" src="/knowledge_is_power/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "exact", elements : "content", theme : "advanced", width : 800, height : 400, plugins : "advlink,advlist,autoresize,autosave,contextmenu,fullscreen,iespell,inlinepopups,media,paste,preview,safari,searchreplace,visualchars,wordcount,xhtmlxtras", // Theme options theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,removeformat,|,search,replace,|,cleanup,help,code,preview,visualaid,fullscreen", theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,cite,abbr", theme_advanced_buttons3 : "hr,|,link,unlink,anchor,image,|,charmap,emotions,iespell,media", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "/css/styles.css", }); </script>
-
Checkout.Php In Second Example
Edward replied to hbphoto's topic in Effortless E-Commerce with PHP and MySQL
I reckon that is correct rob, the unsigned INT can only go to a max of 4,294,967,295, so if you had a phone number starting with 9 that datatype would fail. BIGINT is only 8 bytes so it works out better than using a CHAR(10) of 10 bytes. -
Checkout.Php In Second Example
Edward replied to hbphoto's topic in Effortless E-Commerce with PHP and MySQL
Can you try type casting the $phone variable for example $ph = (int) $phone; Try that and see what you get now? -
Larry i read this on the YiiFramework.com site: http://www.yiiframework.com/download/ Our next major release Yii 2.0 will be full rebuilt on top of PHP 5.3.0+, leveraging the new language features as well as the feedback we have received on 1.1. Yii 2.0 will not be compatible with 1.1. However, we will try every effort to make the transition as easy as possible. If you have a new project to develop on Yii, do not wait for 2.0 as it will still take considerable time to reach the production quality. The last line is quite scarey, so what does that mean exactly was this a comment written a long time ago, is it okay for us to wait for Yii 2?
-
Delaying A Form Submission
Edward replied to giantsfan24's topic in Modern Javascript: Develop and Design
Possible answer would be to stop repeat submission of one. -
Checkout.Php In Second Example
Edward replied to hbphoto's topic in Effortless E-Commerce with PHP and MySQL
Why don't you insert the phone number into the database as a string, a VARCHAR SQL datatype rather than an integer. -
Ha, don't think i will be putting it up on github. How about your project, why don't you post up your source files so we can have a look. I just want to clarify reasons i won't be using a framework. 1. I will never be in the drivers seat if I were to use one. 2. I believe frameworks are better if you are a web developer and need to finish projects quickly. 3. I have the time to correct all errors in my own framework and i enjoy learning, if i use another framework it bores me. 4. Since a framework contains 1000's of files if someone inserts hacking code into a file, chances are you will never find it. 5. Most of the framework files you don't even require, this means extra loading time and a slower system. 6. I also see people asking stupid questions about how to do basic practical php with frameworks. 7. They only work one way and for some of the things i need to do, its going to take a long time to figure out how to get that framework to work for my task. 8. Lack of documentation for some frameworks, which means waiting and depending on others that know. 9. Frameworks will die out eventually or the current version, and when the current version dies out, there will be no more development for it. Whereas our projects live on. 10. You will never know how everything works exactly without spending thousands of hours, whereas with your own code your knowledge will be solid. Anyway i just think for my project frameworks will not be necessary, i am not saying that they are not good for someone else. If i was a web developer and i had to get some projects done quickly i would definitely use it. But on the other hand you can never win full customization of php for your own project, its going to be a hell of a lot faster, and are definitely going to feel much happier with the code. Tuesday, August 28, 2012 Built up most of my mvc now, had to deal with some small url issues, now i have come across another one, if i type in localhost/index page will load the css and image files, but if i type in localhost/index/ the css and image files will not load. So i am dealing with the slash problem, files seem to be trying to load of the next directory. Will probably figure this out quite soon, haven't checked online yet, but its an interesting mvc problem.
-
That what I'm going to do now write my own framework. I don't want to use yii because it's not my code. I am going to extend the mysqli class and add my own methods.
-
Headers
Edward replied to Paul_Blackpool's topic in PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
This is awesome. -
Thanks this is one of the best posts I've seen here, caching which is important seems to be a neglected topic in today's php books. I see this appearing frequently in frameworks.
-
I have decided to change my avatar to something a little more appropriate for the forum. I hope you like it.
-
Wednesday, August 22, 2012 Product listing page is going well, i have done all the main parts and including php validation with error form error classes apart. I have the image upload part of the page to finish tomorrow. I am noticing with my website, i am not really going to be able to complete it without starting to add in Javascript, its just impossible without it. Maybe i was wrong about what i said yesterday about going into frameworks so soon, i think i am going to spend more time building my site pages in php, then do a crash learning course with Larry's Modern Javascript book. The worst thing i find is just working through books, learning and forgetting stuff, i have learnt it before but have forgotten, so at least now i have a website with pages for the js to be added to i should be able to finally get this once and for all. I need to work on a multiple image selector with js where i can also pick a default image to show from all the images uploaded. Another hard thing i need to work on is a category selector in which you can pick a category within a category and perhaps a few more levels down. There would be no limit to how many child categories would branch from the parent. Generally though i am finding i am getting more tired with this kind of coding work than i would with anything else, as i am having to plan as i go along as well as writing code, then realizing there are some things i need to go back and change. I guess its going to be a hard struggle till the end of getting a version 1 built.
-
When i was logged into Knowledge is Power as Admin, i clicked "Add Page" in the administration section, then add_page.php section is loaded. Then i entered some sample data which did not meet full validation. I then clicked on the browser back button which reset the form data, then clicked on the browser forward button, which brought me to this error: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Document Expired This document is no longer available. The requested document is not available in Firefox's cache. As a security precaution, Firefox does not automatically re-request sensitive documents. Click Try Again to re-request the document from the website. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ So what does this mean? How can this error be prevented? Is this something that frameworks like Yii handle automatically?
-
Excellent Larry, really excited about working on something new like this, i have been reading all over about Yii 2, sounds like a big improvement on the first. If you can include Yii of how to do the same stuff as in your books that would be awesome.
-
Larry did you say your new Yii book would be based on Yii 2.0? I can't find a downloadable version of Yii 2.0 and they say on the yiiframework.com site that they still have a lot to do to finish. So how can you write for something that is not even complete? Also because Yii 2.0 will be a complete rewrite of Yii 1 does that mean that the other two books plus your old tutorials will be invalid for this new framework? Do you know when when Yii 2.0 will be officially released?