Jump to content
Killersites Forums

Beginners Questions


Virtual-Instructor
 Share

Recommended Posts

:o I can't believe how much information is here! :blink: I don't care who you are if you are new to this be prepared to have your brain melt within the first few hours.

 

Ok so to date I have started 3 different topics in this forum and instead of starting a new one everytime I have a question, I think that this will be the last one that I start and I will post all of my noob questions here. It keeps things cleaner for those who actually manage the forums.

 

So before these question, a little of background is in order so that anyone who anwsers will understand my knowledge base. I started with static web sites about 7 years ago using MS Front Page. It was easy to work with and I had mild success in creating a few mildly successful albeit very static web sites. I never really took a formal course like the one I'm currently engaged in on HTML. I just sort of Gumped my way through it using premade examples and a book of code explinations. I lost all of my resources three years ago in a fire along with everything that I had ever created. I do this to highlight that I'm not a formally trained programmer. I've worked with various projects both personal and professional over the years and picked up a few things here and there, but never anything concrete. So when I ask questions, I'm not trying to be a pain, I'm just trying to make sure that I understand what I'm learning.

 

So after many frustrating :bash: hours trying to get past the first few videos, I think I'm making some progress; at the very least I'm learning some very cool things and am already developing idea's on how to deploy some of this stuff on the project that I have in mind. But I digress. I have two questions that I would like to pose.

 

1. To simplify the process, should I invest the money into a program like Dream Weaver or MS Expressions? If so I would like to hear from anyone that has used either. My thinking here is that as I observe this process taking place I am beginning to realize that I am way out of my league here, and I'm wondering if a WYSIWYG developer may help to soften the blow to the ol' noodle. Sort of let the WYSIWYG take care of the HTML and I'll focus on processing it using PHP.

 

2. I have now finished all the videos in folders 1 & 2 of the PHP basics series. (I need a break while my brain stops smoking :raised: ) I need a little more clerification on PHP Includes to make sure that I understand them. At first it was a little confusing, but when Steph started talking about Top and Side Menu's it started to make a little more sense. I don't know if I'm looking for a more direct explination or just a confrimation here. If I have understood them correctly, Includes allow you to attach pregenerated blocks of code to PHP pages. Where things get fuzzy is in classifying what these inclusions are. Allow me to clarify them by posing a direct question. Using Stephs Top and Side Menus as an example. Is the Inclusions a folder or a page in the projects folder? If it is a page are the child menu's pages as well or are they simply blocks of code. I guess I'm a little confussed on how to structure and classify Inclusions. It sort of makes scense, but I don't quite think that I have a firm grasp on it. On the heels of the Includes, do you have to know and or understand CSS in order to make them work?

 

I know that I must be a royal pain in the back side with all of my questions, but I do appriciate all of the help that I have beend getting.

Link to comment
Share on other sites

Answer to question #1: You said you've used FrontPage in the past. Expression Web (EW) might be something easy for you to adjust to since it still has many or the same functions that you are familiar with except they are now standard compliant. EW also has PHP support where you can run your php files without having to upload them to your site or run WAMP. Additionally, EW can be purchased as an upgrade if you have any of the Adobe products or the Microsoft Office program.

 

I am not sure what the cost is for Dreamweaver but it's still a good program to use if you prefer to use it instead of EW.

 

Finally, you don't need to buy either one. I believe you can download both of them for a 30-day free trial. Also, there are many other free open source html editors out there that you can used instead. Some are fully loaded with everything you need while others have just enough functions to be sufficient in coding. I believe Andrea and/or Kyle has a comprehensive list somewhere on this forum.

Link to comment
Share on other sites

1) Depends. I personally would encourage you to try and stick it out and continue using a basic text editor -- at least for a little while. I started with Dreamweaver, and used their WYSIWYG tools when I first was getting started, but I found it limited me, since quite often I would run into issues that I couldn't fix without fully understanding the code, or Dreamweaver itself was generating bad/unnecessary code. Eventually, I had to force myself to stop depending on Dreamweaver and learn to do tings by hand, and it makes coding so much faster now. There's nothing wrong with using a tool like Dreamweaver or Expression, but keep in mind that you can get too dependent on it when you are first getting started.

 

That said, I definitely wouldn't stick with Notepad as an editor. Something simple like Notepad++ adds syntax highlighting, find/replace functionality, etc that will help you out while still encouraging you to learn how to code by hand.

 

2) Includes: Basically, these are blocks of code you want to include in multiple places in your website. An include can contain just about anything: plain text, HTML, Javascript or PHP -- it just depends on what you need. They come in handy for things like menus or header/footer areas of websites, which will repeat in multiple places within the site. I'm not quite sure if I understand your "page" versus "folder" thing, but you "include" a single file that contains the code you want to add to the page. And wherever that <?php include() ?> line is, the included code will be inserted.

 

Let's assume you are using an include to add your main menu to your website. What happens if you need to change that menu -- perhaps add or remove an item? If you have an include, you can make that one change to the include file, and all of the files in your site are updated, since they all use the include. Otherwise, you would have to update every file in your website manually, which could be quite time consuming.

 

Whether you need to know CSS to work with an include depends on the contents of the include. In most cases, I would say yes, you will want to know CSS, since the include will mostly be including HTML code that you will want to style with CSS.

Link to comment
Share on other sites

My thanks to both of you for your responces. You have both given me food for thought, and in the end I believe that I will most likely employ a combination of the responces, but I will cross that road at a later time after I have further explored the available training availalbe on killer sites.

 

I want to take a minute and try to further clarify my question on includes. While I believe that I have understood Ben and have my mind wrapped around the topic, your statement indicates that I haven't sufficently articulated myself; so please let me clarify. When I think of HTML it is typically on a single level, due in large part to my relative inexperiance. When I think of HTML code I think of code that does only one thing....create pages. Until now I never considered that code could simply be written without displaying an entire page. Yet it now occurs to me that I could write code that only contained my navigation menu's. Or more to the point of the project that I am working on, a menu of forms for students and Mentors (if you don't understand what I mean by student and mentor, see my profile, that should explain it). Getting back to attempting to articulate myself; I understand (currently) the hierarchy of web sites in like this. You have the main site, a folder which contains multiple pages of the site with each page being an individual file. However that being said I also understand that you can have sub folders which contain things like images or flash presentations that run on the site. Now with all of that being said, I think what I am trying to clarify in regards to PHP Includes is the storage of those codes. If you understand that if we take something like a menu, then in my mind that is a page (single file) of code. In the video Steph points out that you can store those files in a sub folder of the parent folder of the site. So in the folder that contains all of the individual pages for the site, you could have a folder that contains all of your code libraries for things such as menus or footers or anything else that you want to use repeatedly within the site. You would then use the PHP Includes function to quickly add those items to the web page that you are writing code for.

 

To date I honestly can only mentally see a web site in two dimensions. I believe that I am at the point where the light is beginning to come on when I will be able to see them in that third dimension, so if I pose a question that I have not quite articulated properly then please let me know. I hope this sheds some light on what I am trying to say.

Link to comment
Share on other sites

This is how I see it: HTML is code that will allow you to place pictures and text, recently video

CSS is code will allow you to style the elements inside the HTML code

 

HTML actually defines what content would be included in the web page while CSS defines how that content would be presented on the web page.

Link to comment
Share on other sites

HTML actually defines what content would be included in the web page while CSS defines how that content would be presented on the web page.

 

Wait a minute! Am I understanding you correctly here? CSS is what drives the page layout and HTML drives what is on the page. In other words if I want to maintain the same layout accross the entire site, save for a few forms, then I need to utilize CSS?

Link to comment
Share on other sites

Wait a minute! Am I understanding you correctly here? CSS is what drives the page layout and HTML drives what is on the page. In other words if I want to maintain the same layout accross the entire site, save for a few forms, then I need to utilize CSS?

Yes. That is what CSS is intended to do -- to make it easy to style things consistently across your entire website. HTML is for creating the actual content that will appear in the page, and CSS is for styling that HTML content and making it display (fonts, colors, positioning, etc.) the way you want.

  • Upvote 1
Link to comment
Share on other sites

Yes. That is what CSS is intended to do -- to make it easy to style things consistently across your entire website. HTML is for creating the actual content that will appear in the page, and CSS is for styling that HTML content and making it display (fonts, colors, positioning, etc.) the way you want.

I'm beginning to get a better understanding of what I am doing here. Now that I am finally on my weekend I will be able to put some proper study time in over the next few days. So just to recap. CSS controls a common layout, html controls the content, and if I have really understood this, PHP can be used to control the, shall we say, interactivity of a site (putting in forms and getting back results). This stuff is very cool.

 

Maybe I should go back to college for multi media and web design. I've got idea's popping up that I can't wait to get started on.

Link to comment
Share on other sites

I'm still getting over just how much information is contained in these videos. Ok I have two questions for this post. One is simple and the other not so much.

 

First things first. It is possible that I was trying to do a bit of reorganization at a point not to long ago, but I just want to make sure that in the PHP basics folder of videos, there should only be two folders. I would just like someone that is familiar with the series to verify. The reason that I ask is that I have a third folder and I discovered tonight that the third folder contains some duplicate videos that are in the PHP Misc folder. I'm thinking that I attempted to condense this information and make it easier for me to track where I am in my studies; however I was reviewing the txt document that comes with them to see what is next up in the cue and found that the series on functions that I am curently watching is contained in the PHP misc folder.

 

The second question goes back to an earlier post that I had going when I was having trouble getting WAMP installed and running. I was reviewing the mail function in the video tonight and instead of entering stephs email, I added my own. Two things happened, on the code did not deliver the $result that I was looking for, and two, part of the page displayed but the other half of the page returned an error. The gist of what I understand is that the mail function failed due to yet another port issue. I am wondering if there is anything quick and easy that I can do to get this function to work as intended. I am very intrested in the mail function as I think that it is going to be one of the main functions that I deploy with my site.

 

If you need more information on the code that I was running at the time of the error please let me know I will be happy to post the code on the thread.

Link to comment
Share on other sites

This http://killervideostore.com/video-courses/beginners-php.php is the full list of what is included in the beginner's PHP course. I believe those files come in three zip files, so yes, you should have three folders for those videos.

 

In regards to your PHP error... If it is a port error like you say, that's a pretty common error when working with the mail() function on your local computer. You should be able to edit your PHP ini file to fix that http://forums.devshed.com/mail-server-help-111/how-to-set-up-php-ini-to-send-mail-from-106329.html, though I usually skip that side of things and do any mail() related testing on an actual web server.

Link to comment
Share on other sites

:clap: So I'm finally getting into the meat and potato's of these video's. Because I have worked with dbases in the past, I already had an idea of the structure that I wanted to create. So now I am getting into the MySQL videos and beginning the early development work that will become the foundation of my site. I can't articulate how excited I am :D . As I begin the development process I will posting very heavily with questions regarding specifics. As such the posts will become more detailed. Therefore I welcome any input that you all have, and when I finally get around to launching the site, I sincerly that you will all be among my first visitors. In addition I have made a few decisions that I would like to share with you all. First I have decided to go with Expressions Web as a WISIWYG. I still want to make the transition to Dreamweaver, but the cost is just too high for the suite that I need. Second, I have learned through experiance that the best sites start with a solid plan. Therefore I will be utilizing MS Visio for my layout plans and have got a pretty good start going. This means that any of you that have these programs please let me know and I will share some of these files with you if it will help with understanding.

 

B) Ok so with the BS out of the way let me get to the two questions that I have for this partiuclar post. The questions are pretty detailed so please bear with me. But before I get into those questions a little information about what I am doing may be helpful, so lets start there.

 

I am a member of a MS Flight Simulator X virtual community. You can learn more about the community by visiting www.bostonvirtualatc.com. Within the community I am the Director of Pilot training. Over the last two years I have struggled to develop the most realistic and informative virtual training program in existance. I firmly believe that what I am doing can and will eventually have long lasting effects and impact on our participants, which is why I am so passionate about it. I don't do this alone. I have a core staff of six other insturctors who help me organize and teach the material. For legality reasons, our instructors as called Mentors. Those who seek the training are classified as students. Both categories are participants or members. This may seem a little useless at the moment but it will become clear as I start asking questions. The way the program works is people send emails to me which I then distribute to the staff for assignment and the Mentors teach the needed material. Currently this is cumbersome and inefficient. I am trying to move everything to the dbase so that the information is for all intents and purposes automated and easily accessable. Keeping all this in mind let me move into my questions for this post.

 

1. My first question is in relation to MySQL conventions (I believe thats what the nerds call them). So this afternoon I spent several hours getting my main dbase called STC laid out. There are currently 8 tables in the dbase. I developed the tables with the idea of moving information in and out of them to make things easier on my staff and students. Specifically, in MySQL conventions, how does text capitalization effect things? I guess what I am really asking, should I specifically deploy capitalization when working with the tables. For example, should table names be capitalized with the columns (because the proper term escapes me at the moment) in lower case? Or should I use all lower case text when creating data fields. I know that what ever method I use my code will have to exactly duplicate that method when writing my code. So I guess what I really want to know from the expericance pool is which method works best? Capitalized, or lowercase?

 

2. One of the things that I have taken away from my experiance is that sites can be driven to display specific information based upon a users permissions. As of yet I have not figured these out completely, but I am of the thinking at the moment that this is somehow tied to the dbase, I just haven't quite wrapped my mind around it just yet. With that in mind my second question deals specifically with member categories. As I mentioned, I currently have two levels of participant. Mentors and Students. Obviously the Students will not have a need to access all the tools that Mentors will need. Allow me to illustrate with an example. In the dbase I have a few tables that will help you to understand. The first one is Members. In the members table I have the following fields. BVAID (each member of the community has one and no two are the same), FNAM (first name), LOG (Login), PASS (Password), STD (Standing, more on this in a moment), EML (email address. So named because I read somewhere that this is a reserved word or something in MySQL), SKYPE (Skype ID), RAT (Rating), MENTOR (this is a boolean Yes or No), Student (Also a boolean). The standing table contains data relating to some specific standings such as MENTOR, STUDENT, DISCIPLINE and so forth, it also has a data field for reason. So getting down to brass taxes here, what has occured to me is that perhaps I have organized this improperly somehow. My thinking in this case was to immediately parse the dbase MEMBERS table and check the true/false categories for student and mentor 1 indications and based upon the results display or hide specific fields and informatoin, that is to say control what the user sees. In this case it can only be one or the other. I haven't figured out how to establish this rule just yet, but as I said, I'm just getting my feet wet here. What I want to know is should I have a seperate table that lists out the specific Classificatioins such as mentor, student and the like or should I condense all this information into a single table? I want to be able to quickly run reports of who is a mentor, student and other things that will be important for myself or my staff need to have access to quickly. To be clear, I am trying to establish a relational dbase here.

 

Ok so that does it for this post. I'll let anwsers come in for a day or two before I move on. Please if you are going to respond to this one, please do so using the quick reply. I think this will help to keep things cleaner and all the responces located in the same general area.

 

Thanks in advance to anyone who responds.

Edited by Virtual-Instructor
Link to comment
Share on other sites

1. I usually keep table and column names all lowercase, and separate words with undercases (example: "my_column_name"). It is common practice to uppercase any MySQL code (For example: "SELECT * FROM table_name") so that helps keep things readable. That tends to be my personal preference though -- I don't think there is a specific way of naming your rows/columns that you HAVE to do as long as you are consistent. For specifics, see http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html. This also talks about some general naming conventions that is worth a look: http://www.interaktonline.com/support/articles/details/Design+Your+Database-Database+Naming+Convention.html?id_art=24&id_asc=221

 

2. A couple comments:

 

-- Personally, I would use full names when naming my columns for readability reasons. "first_name" rather than "FNAM", "email" rather than "EML" etc. It's slightly longer to type, but will save you some time if you come back to the project after a while and don't have to reacquaint yourself with your database setup. Also, if you aren't already, I would suggest using lowercase names for your columns/tables (I'm assuming you are though, and that you've uppercased them here on the forum just to distinguish them from other text.)

 

-- As far as I know, "email" is not a reserved word. I've used it fine in the past.

 

-- In regards to specifying the role of the user, student or mentor, I would approach this slightly differently. I would have two tables:

 

Table 1: Roles

-- role_id: (primary key, autoincrementing)

-- role_name: varchar(32)

 

Table 2: Members

-- all your other columns...

-- role: int

 

Your "roles" table would contain entries for each specific role you had. In your case, you'd probably want 2 rows in this table so far, one for "mentor" and one for "student". Each would have a specific number assigned to them that would match up with the "role_id". For example, if your "mentor" role had a "role_id" of 1, then any mentors within the members table would also have a role of 1. This would make it easier for you to figure out who has what role, makes adding additional roles easier in the future, and cleans up your database as much as possible so you don't need to add extra columns every time you add a new role or repeat unnecessary information.

 

-- If you are going to implement roles, you'd usually have some sort of login system, where users would login using a specified username/password to access a special area of the site intended just for them. I have a couple series on PHP logins in the KillerSites video library: http://killersites.com/university/ within the PHP section, including one that is procedural based and one that uses MVC/object oriented programming. I'm not sure how far you have gotten in your current videos, since I don't want to suggest something that would be too over your head for your current point in the learning process, but they might be worth a look.

Link to comment
Share on other sites

1. I usually keep table and column names all lowercase, and separate words with undercases (example: "my_column_name"). It is common practice to uppercase any MySQL code (For example: "SELECT * FROM table_name") so that helps keep things readable. That tends to be my personal preference though -- I don't think there is a specific way of naming your rows/columns that you HAVE to do as long as you are consistent. For specifics, see http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html. This also talks about some general naming conventions that is worth a look: http://www.interaktonline.com/support/articles/details/Design+Your+Database-Database+Naming+Convention.html?id_art=24&id_asc=221

 

2. A couple comments:

 

-- Personally, I would use full names when naming my columns for readability reasons. "first_name" rather than "FNAM", "email" rather than "EML" etc. It's slightly longer to type, but will save you some time if you come back to the project after a while and don't have to reacquaint yourself with your database setup. Also, if you aren't already, I would suggest using lowercase names for your columns/tables (I'm assuming you are though, and that you've uppercased them here on the forum just to distinguish them from other text.)

 

-- As far as I know, "email" is not a reserved word. I've used it fine in the past.

 

-- In regards to specifying the role of the user, student or mentor, I would approach this slightly differently. I would have two tables:

 

Table 1: Roles

-- role_id: (primary key, autoincrementing)

-- role_name: varchar(32)

 

Table 2: Members

-- all your other columns...

-- role: int

 

Your "roles" table would contain entries for each specific role you had. In your case, you'd probably want 2 rows in this table so far, one for "mentor" and one for "student". Each would have a specific number assigned to them that would match up with the "role_id". For example, if your "mentor" role had a "role_id" of 1, then any mentors within the members table would also have a role of 1. This would make it easier for you to figure out who has what role, makes adding additional roles easier in the future, and cleans up your database as much as possible so you don't need to add extra columns every time you add a new role or repeat unnecessary information.

 

-- If you are going to implement roles, you'd usually have some sort of login system, where users would login using a specified username/password to access a special area of the site intended just for them. I have a couple series on PHP logins in the KillerSites video library: http://killersites.com/university/ within the PHP section, including one that is procedural based and one that uses MVC/object oriented programming. I'm not sure how far you have gotten in your current videos, since I don't want to suggest something that would be too over your head for your current point in the learning process, but they might be worth a look.

 

Ben thanks for the great advise. I am considering your suggestions with regards to roles, but I still have to wrap my mind around the point that you are trying to make. If I have understood you correctly, the roles table would contain the specific names of roles such as mentor and student along with a role_id. In the members table I replace the mentor and student booleans with a single role column and update that with the role integer that coresponds to the roles table? Please let me know if I have understood this correctly.

I also appriciate you suggestions on naming conventions. After having read through more of the material, this actually makes more sense and I will be doing some update work on the dbase tables within the next 24 hours (after going through somemore of my videos).

To anwser your question of where I am with my videos, on the TXT suggested order of viewing list, I am working from file 3 PHP MySQL Basics. When my brain and body finally colapsed last night after 16 hours of study and practice, I was just starting on the Connecting Video pt 3. I expect to have finished this file sometime this afternoon and be moving on to PHP CRUD + Pagenatioin before I expire this evening. In the video series that I have I have seen videos that relate to Login's but I'm not quite there just yet, that I believe is file 5. So there will be more questions to come.

 

I will say this for the videos, they all assume that I am already an HTML programmer, when really I am not. I have some very light experiance with it but have always relighed on my WYSIWYG editor to do that for me. I confess that I would like to learn this informatoin as I am very currious how to make certain things happen. I would also like to learn to write forms from scratch, specifically how to make them appear as sized pop up windows versus opening as an additional tab. But this to me seems to be getting ahead of myself. For the project that I am working on, I am finding that understanding how all this interactivity works first is going to make the html that much easier. With what I am learning and the speed that I am learning it, I doubt that it will be very long until I am ready to start putting entire pages together.

Link to comment
Share on other sites

New question. This one is simple and to the point. I have noticed that there are a large number of variables that are used in these videos. My question is; Can you create a library of Variables in the same way that you do things like menus and other functions that are called on a regular basis? My thinking here is that with a little forethought and planning I should be able to keep this site relatively clean by keeping things that will be used on a regular basis in a single location.

Link to comment
Share on other sites

the roles table would contain the specific names of roles such as mentor and student along with a role_id. In the members table I replace the mentor and student booleans with a single role column and update that with the role integer that coresponds to the roles table? Please let me know if I have understood this correctly.

Correct.

 

I will say this for the videos, they all assume that I am already an HTML programmer, when really I am not. I have some very light experiance with it but have always relied on my WYSIWYG editor to do that for me.

Yes, if you are doing PHP videos, it sorta assumed that you will have a good handle on HTML and CSS. PHP and HTML/CSS aren't completely separate -- obviously PHP adds additional functionality, but at it's core, browsers are simply displaying HTML and CSS to visitors, even if its processed through the PHP engine first.

 

I confess that I would like to learn this informatoin as I am very currious how to make certain things happen. I would also like to learn to write forms from scratch, specifically how to make them appear as sized pop up windows versus opening as an additional tab.

That really isn't PHP, but either HTML (for forms) or Javascript (for popup -- they are also called "modal" -- windows.) You have the "Complete Web Programmer" course, right? That series includes a few videos called "PHP and Javascript Form Validation" which may help you get an understanding of forms. The focus is on the PHP and the Javascript functionality, and I assume that you have at least a basic understanding of forms, but it should at least give you something to point you in the right direction.

 

have noticed that there are a large number of variables that are used in these videos. My question is; Can you create a library of Variables in the same way that you do things like menus and other functions that are called on a regular basis?

Yes, you can create PHP files that you include into your project that are used to store various configuration variables. Obviously you wouldn't need to do this for temporary variables, but for variables that will be reused multiple times during the course of the application, that makes sense.

 

That's actually where object oriented programming and MVC comes in -- as a way to organize your web app, separate the various types of code you write and prevent unnecessary code repetition. Further videos in the Complete Web Programmer series talk about OOP and MCV, so you'll get to those in a bit. This also has a very good explanation of OOP: http://net.tutsplus.com/tutorials/php/object-oriented-php-for-beginners/

Link to comment
Share on other sites

Ben has anyone ever told you that you are too smart for your age? Thanks for the great information. I am looking forward to it. In my last post I stated that I was going to be going with expressions web. Well as luck would have it something has turned up in my life since then and I am now the proud owner of Dreamweaver. With that in mind I've got the creativity engine running on all cylinders. :clap: So you can start expecting more specific questions in relation to both programs.

Link to comment
Share on other sites

Greetings to all, time for another specfic question. Two actually. So I am chomping at the bit to get starting on building my site. I will be using Dreamweaver among other programs, but Dreamweaver will be the primary developer that I use to build the site.

 

Question 1: I don't believe that this is something that Steph has covered as yet. When beginning a new project in HTML how do you determine what file type to use. In dreamweaver is has the Create new column. Here are listed options such as HTML, CSS, PHP and the like. One of the things that are confusing me is the use of extensions. For instance, if you are running PHP code somewhere on the page, does it have to have a .php extension or can I still go with .html and simply add the php code to the page code?

 

Question 2: When creating my php code for my site to store in a file for include statements, is this where I should specify PHP and CSS pages?

Link to comment
Share on other sites

1) You basically have four options: .html for HTML files, .css for CSS files, .js for Javascript files and .php for PHP files. If you use PHP anywhere in the page, the file needs to end in .php.

 

I think I understand this. But if that is true, then how do you use php code in a html form and still give it an .html extension?

 

2) I'm not sure if I understand this question. Perhaps you can go into a little more detail.

 

Actually, I was so tired when I wrote this post I didn't realized I was posting the same question twice. You actually anwsered the question for me already.

Link to comment
Share on other sites

:o OMG BEN! Man up to this point I thought that I had seen some intresting stuff, but when I started your videos on CRUD today it completely blew my mind :clap: ! This is what I have been looking for. :clap: I will say this however :huh: you fly through this information so fast I'm going to have to watch these several times before I can wrap my mind around it. Never the less this is still outstanding infromation. :D

 

:raised: Now I need a little help here so that I can keep up with what you are doing and try these examples for myself. As you know I am going to be working with dreamweaver. I have some tutorials on DW that I probably need to get to, but I don't really want to stop what I'm doing at the moment. So what I would like to know at this point is how to use dreamweaver to do what you were doing. In the video you made several files. I'm getting ready to start the fourth. Would creating a new php document in DW do the same thing that you were doing in CODEA (I believe it was). If that is so then how do I veiw the pages without an index, or in this case is the index a mute point. Finally, since I have already started working with my dbase I should be able to replace the "Records" dbase that you call in your video with my "STC" dbase correct? If that is so I would also assume that I should be able to do the same thing with tabels and just substitue what you are typing for your examples with the correct information that I am using for my table; is that not correct?

 

If this works the way that I think it will, then I should for all intents and purposes be able to start laying the foundation for what I am doing within the next few weeks as alot of what I am seeing ties directly in with what I am planning.

Link to comment
Share on other sites

Sorry about the pace of the videos... Most of my PHP videos assume that you know enough PHP that I can go a bit faster and do a bit less explanation than Stefan's videos. If you have questions, you can always post here.

 

Yes, you can use Dreamweaver to do what I was doing. You would just want to stick to the code view, not the design view. Creating a new .php file should be the same as creating a new php file in Dreamweaver. You should be able to use a different database if you want, but you'd obviously need to make sure your database connection settings/tables/column names were correct. I just happen to like Coda for most tasks, since Dreamweaver is bloated with a lot of features I don't use and Coda is a bit faster.

 

If that is so then how do I veiw the pages without an index, or in this case is the index a mute point.

I'm not completely sure what you are asking. If you are talking about an "index.php" file, no, that isn't absolutely necessary. That file (and even an index.html file if you are working only with HTML) isn't always needed. It's just usually suggested that you create one, since the server looks for a index.html or index.php file as the "home" file, and that's the one it will display if you don't specify a filename (like http://www.yourdomain.com/").

Link to comment
Share on other sites

You know Ben at some point we should try and hook up on Skype. :D You are a wealth of information. Ok so I took your advice in regards to naming conventions in my dbase and in doing so realized that I could still cut more corners. So today I would like to ask a specific question to which I think I understand what the anwser should be, but I would still like to run it past you to get your input on the topic. Let me address one table and then the other as I think it will help you understand what I am trying to do.

 

I currently have 9 tables in my dbase, and am planning 3 more to help handle the data that will be needed on my site. This question deals with two of them specifically. The first table is the aircraft table (if you are confussed please refer to earlier posts which outline the sites purpose). The aircraft table has the following fields, id, ac_man, ac_model, ac_type, publisher, and role. Two points to note here. First I am thinking of using your idea to deploy a roles table for my members, but after considering the number of superfluous bits of information that I will be using, I was considering creating a single table called disposition to handle them. Things like Mentor vs Student, Stock Aircraft vs Payware Aircraft and a few others that escape me right this second, could all be placed into a single table and I could then simply use the integer value related to that table. The second point here is in the aircraft table, all fields with the exception of id and role are varchar. ID and role are both integers. Just so that you understand the ac_man is the Aircraft Manufacturer, and ac_model refers to the specific aircraft model. For instance; ac_man = Cessna, ac_model = 172.

 

Moving on then..... The second table is the logbook table. As you may have guessed, this table will contain all the records for flights. In this table there are two fields that directly relate to aircraft entries, but only one that is directly related to the aircraft table. So here is where my brain gets just a little fuzzy as I am thinking of the end result. If I have done things correctly I should be able to allow all members to access their logbooks by parsing the dbase for their BVA Id. What I am hoping to do is to return results that contain all of the information regarding their flights including the type of aircraft that they flew. Here is the rub. While working on my naming conventions it occured to me that I can eliminate three of the four fields which were being used to handle Aircraft data and simply go with a single field in which we would enter just the record number for that particular aircraft. Now the specific question. It has occured to me that when the records return, it will only display the number of the record. So how then do I return the concatination string 'Cessna 172' from the aircraft table. My gut is telling me to use either a variable or what we in the industry refer to as a type tag which would look like 'C172'. Of course I tend to believe that this is also going to be a variable as I would be passing one value to a table in order to return another value which would be echoed out.

 

I've watched your CRUD videos three times now and to date this is some of the best information that I have gotten out of this series as of yet. As I watch them I am beginning to see the lines connect in my mind between what I want to do and how to make it happen. Its all beginning to make more and more sense, but I still have a long way to go.

Link to comment
Share on other sites

I do have a skype account -- "falkencreative" -- but I'm not usually on unless I'm there for a specific reason. You can always PM me if you want to set up something. I'd be happy to chat for a bit if you have questions.

 

Things like Mentor vs Student, Stock Aircraft vs Payware Aircraft and a few others that escape me right this second, could all be placed into a single table and I could then simply use the integer value related to that table.

Perhaps I don't completely understand you... but I would highly suggest you keep aircraft roles and member roles separate, in two tables. Its highly likely that airplane related roles will need different columns than your member roles, and you want to keep things as simple and as efficient as possible. This is basically the goal of database normalization: http://databases.about.com/od/specificproducts/a/normalization.htm

 

It has occured to me that when the records return, it will only display the number of the record. So how then do I return the concatination string 'Cessna 172' from the aircraft table.

That's where joins come in, or selecting data from multiple tables at a time. For example:

 

SELECT table1.row1, table1.row2, table2.row1 FROM table1, table2 WHERE table1.row1 = "1" AND table1.row2 = table2.row1

 

See http://www.tizag.com/mysqlTutorial/mysqljoins.php and http://mysqljoin.com/ for some examples.

Link to comment
Share on other sites

Very specific question here. I have installed dreamweaver and I am beginning to work with it throught the video series. I beleive that I have all the information that I need plugged into dreamweaver. I entered in the following code into the codes editor just to make sure that everything was working

 

<!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>db-connection</title>

</head>

<?php

phpinfo();

?>

<body>

</body>

</html>

 

When I clicked on the "Live View" button in dreamweaver, it gave the following message.

 

Sorry, we can't find "db-connection.php". We suggest that you check the spelling of the web address or search above

 

So now my question is where have I gone wrong. This works for WAMP using word pad, but for some reason DW won't display it. Not sure why. Now it should be worth mentioning that I had to make some code alterations to my local host files in WAMP in order to get this thing to work to begin with, but I'm not sure if the same thing will apply here. The only thing that I did was adjust my WAMP settings to port 81 instead of 80. Something tells me that this is going to be at the root of my problem but I'm not sure how to go about fixing it.

 

Any suggestions?

Link to comment
Share on other sites

Yes, I imagine changing the port is the cause of the issue.

 

To fix that, I believe you would need to adjust the sittings of your site within Dreamweaver. (You have a site definition set up within Dreamweaver, correct? See attached screenshot, though yours might look slightly different depending on what version of Dreamweaver you are using -- that's where you handle setting up a site within the Files palette.) When you set up options for database connectivity, there should be a screen that asks "What URL would you use to browse to the root of your site?". You probably need to adjust that to "http://localhost:81/" or whatever your URL should be.

 

 

Dreamweaver1.png

Link to comment
Share on other sites

the title of your page can be whatever you want it to be. Maybe you should try WampServer (WAMP) and put all of your web files in the www folder once its installed. I personally use Apache 2.2.19 and PHP 2.3.6 but thats only because i know how to customize it to what i want it to do. Since you are just starting out WAMP can do everything for you all you have to do is save your main page as index.php because thats the default page that PHP reads in each folder. Save that script you posted as index.php in the www folder (after you install WAMP) and then type "localhost" in your web address bar WITHOUT the quotes.

Link to comment
Share on other sites

the title of your page can be whatever you want it to be. Maybe you should try WampServer (WAMP) and put all of your web files in the www folder once its installed. I personally use Apache 2.2.19 and PHP 2.3.6 but thats only because i know how to customize it to what i want it to do. Since you are just starting out WAMP can do everything for you all you have to do is save your main page as index.php because thats the default page that PHP reads in each folder. Save that script you posted as index.php in the www folder (after you install WAMP) and then type "localhost" in your web address bar WITHOUT the quotes.

Just pointing out - the issue Visual-Instructor is having doesn't have anything to do with the title of the page or the server software. He already has WAMP installed and working. The issue is getting Live View within Dreamweaver set up properly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...