Andress Posted November 3, 2008 Share Posted November 3, 2008 This is where I am getting stuck and I appreciate help with it, I understand what each basic PHP function does, and I can generally tell you what a script is doing but when I take an idea I have a hard time turning it into script. Let's take a classic example, how to make a cup of tea. Get a water kettle Fill the kettle with water Turn on the stove to hi Put kettle on the stove Heat to boiling Get a teacup Put a teabag in the teacup Pour boiling water over the teabag Let steep for 5 minutes. Remove and throw away teabag. Add suger or creamer to taste in tea. Done So now how do I figure out what functions/events I need to make this work? If anyone is willing to spend a little time with me via email so I can get over this frustrating hump I would really appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/ Share on other sites More sharing options...
rastlin Posted November 3, 2008 Share Posted November 3, 2008 Could you include me in those emails as well? I would be interested in this as well.. Stephen Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681310 Share on other sites More sharing options...
Maq Posted November 3, 2008 Share Posted November 3, 2008 Making a cup of tea is not a classic example of how to use functions in PHP, let alone make any sense, at least to me... If you want to learn, read a tutorial, that's what they're there for. I'm not sure how many people are going to sit there for hours holding your hand through this. You haven't even mentioned what you're trying to accomplish, sounds to me you want to learn the basics of PHP. Have you even attempted to do this on your own? We're willing to help but you have to show some kind of effort. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681316 Share on other sites More sharing options...
NathanLedet Posted November 3, 2008 Share Posted November 3, 2008 Making a cup of tea is not a classic example of how to use functions in PHP, let alone make any sense, at least to me... If you want to learn, read a tutorial, that's what they're there for. I'm not sure how many people are going to sit there for hours holding your hand through this. You haven't even mentioned what you're trying to accomplish, sounds to me you want to learn the basics of PHP. Have you even attempted to do this on your own? We're willing to help but you have to show some kind of effort. I agree with this Making a cup of tea is a step by step procedure. In terms of using PHP, it would simply be step1.php, step2.php, step3.php, step4.php, etc. PHP runs on the server and returns HTML based on certain things. If else statements, loops, arrays, etc. etc. etc. make PHP an interactive language. Based on x, do y. Based on y, do z, etc. It's not a step by step thing. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681327 Share on other sites More sharing options...
ngreenwood6 Posted November 3, 2008 Share Posted November 3, 2008 The best place to start is with little stuff that you have already used or seen before and trying to duplicate it. That works best for me because I already have the idea in mind. After you decide what to code then you have to figure out how to go about coding it. Then I would get piece of paper out and write down what I need and the order in which I would need them. Then as you think you have it figured out start coding it. I guarantee once you start there will be things you forgot about or missed when you originally planned it out. But while you think about it right it down and remember to add it. The main thing I try to make sure I take care of is error handling. For example with a user registration. You do not want the user to be able to enter no password for their username. So you have to add in error handling. Hope that helps some. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681333 Share on other sites More sharing options...
Andress Posted November 4, 2008 Author Share Posted November 4, 2008 Thank you all for the advice, the tea example was just that an example. Ngreenwood6 I appreciate your comments that does help quite a bit and will help to put me on the right track. As far as effort... well I have read a few books, taken some video courses but all of them just go over the functions etc. of PHP they do not have you apply that to any type of example. I do get stuck when I wish to write code from a plan I have wrote up. In any case when I get something going I'll post it up for suggestions and improvement. Also, I can raw code HTML without a problem, taught myself quite awhile ago so I'm not ... hum how do I say this, expecting anyone to write my code. As to what I'm doing, I want to improve on a script I have adding some new items to it. I do not wish to go into detail at this time of what this code is but again thank you for your responses. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681685 Share on other sites More sharing options...
laffin Posted November 4, 2008 Share Posted November 4, 2008 Myself, I begin with layout / data first. Making a simple html form or outline helps a lot. This will also help in u visualizing what data u will need. Such as a registration forms, blog outlines. with the data i need, i decide on how to store that data db/flatfile/outside source. with just that, i begin coding, as the data gives a good direction to how to handle the data (input validation/error handling) than finally the core processing code, whut the heck we do with all that data. it may take some time, but giving yerself an outline of the finish product is a great way to start. Anyways good luck Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681736 Share on other sites More sharing options...
DeanWhitehouse Posted November 4, 2008 Share Posted November 4, 2008 Hang on, what do you want? Have you used something like echo(); ? That is a php function, so duh dah, you know how to use a function now. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681761 Share on other sites More sharing options...
DarkWater Posted November 4, 2008 Share Posted November 4, 2008 Hang on, what do you want? Have you used something like echo(); ? That is a php function, so duh dah, you know how to use a function now. Actually, echo isn't a function. It's a language construct. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681772 Share on other sites More sharing options...
DeanWhitehouse Posted November 4, 2008 Share Posted November 4, 2008 Shh, lol, i couldn't think of one he/she has definitely used. But it show the principle Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-681777 Share on other sites More sharing options...
Maq Posted November 4, 2008 Share Posted November 4, 2008 As far as effort... well I have read a few books, taken some video courses but all of them just go over the functions etc. of PHP they do not have you apply that to any type of example. That should be plenty of information. PHP isn't exactly the most extensive language... As far as examples, make your own! Do your cup of tea example with the information you've learned so far and if you get stuck post your code and we'll help you along the way. Quote Link to comment https://forums.phpfreaks.com/topic/131229-need-a-little-tutoring-how-to-turn-and-idea-into-script/#findComment-682039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.