Dreamweaver CS5.5 has added improvements to make it more compatible with PHP and MySql. This tutorial will show you how to use DW and create a multi-page form that you can then insert into a database. If you are intending to email this form instead, you should still find this tutorial useful. This tutorial will not show you how to make a dynamic site in DW. I might cover that later in another tutorial. To do this tutorial, it is assumed you already know how to create a dynamic site in DW, and also that you have a testing server installed on your computer (or a database system you can use online).
Getting Started
1. Create a new page in Dreamweaver and save it as myform1.php.
2. In the Insert Panel, make sure you have Forms selected and click on Form.
Note: If you don’t see the Insert Panel, you can show it by clicking on Window>Insert.
3. This will put a form box on your page. Click inside the form box and click enter a couple times to give yourself some room.
Our Database
Now that we have a page. We need to make sure our database is setup and ready to be used. We are going to accomplish this now and then we’ll start adding form elements to our page. I’m using PhpMyAdmin. Regardless of what you are using to manage your database, the instructions will be similar enough that it shouldn’t pose any problems.
1. In PhpMyAdmin, create a new database and call it myform.
2. Create a new table and call it users. It needs to have 6 columns for this tutorial.
3. Our first column is going to be our primary key. We are going to name this user_id.
- Set its type to INT
- Set its length/values to 11
- Set its attributes to unsigned
- Set its index to PRIMARY
- Make sure Auto-Increment (AI) is checked or selected.
4. The remaining columns won’t need as many options. Set them as this:
- firstname varchar 20
- lastname varchar 20
- email varchar 30
- username varchar 15
- password varchar 15
5. Click Save.
Creating Form Elements
Now that we have our database setup, we’re going to setup our multi-page form. Back in Dreamweaver:
1. In the Insert Panel, click on Text Field.
2. This brings up the Input Tag Accessibility Attributes box. Fill it out as show in in the graphic. Also make sure you put each form element on a new line.
3. Create two more text fields and set their settings like this:
Text Field
- ID: lastname
- Label: Last Name:
Text Field
- ID: email
- Label: E-Mail:
4. Now add a button from the Insert Panel. It’s ID should be submit. Leave the label blank.
5. Now our form should look something like this:
Making Minor Changes in Code View
Now that we have our first page form created, we still need to make a slight change to the code. We’re going to do this here.
1. First, create a new page and save it. Let’s call it myform2.php
2. In DreamWeaver, back on our myform1.php file, click on Split view so we can see the code.
3. The Form Action is blank right now. Change it so that it says myform2.php. It will look like the code below when you are done:
4. Save the page myform1.php
Creating the 2nd Form Page
Our first page is complete now. If you test it in Live view, you’ll see that when you click submit – it goes to myform2.php but nothing happens. What we are going to do now is capture that information and store it.
1. Open myform2.php.
2. Create a new form as before.
3. Create 3 hidden fields in the form using the Insert Panel.
4. Click on one of the hidden fields and you’ll notice down in the Properties box that it is named hiddenField. The other two are named hiddenField2 and hiddenField3. Change each hidden field so they are named the following:
- firstname
- lastname
5. Click on Split View so we can see our code.
6. At the very top of our file, put this:
<?php $firstName=$_POST['firstname']; $lastName=$_POST['lastname']; $eMail=$_POST['email']; ?>
What we are doing here is setting 3 variables. It is taking the firstname field from our form on the previous page and assigning to it a variable called $firstName. Whenever we call this variable, it will actually be calling whatever was put into that field earlier.
7. Back in Design view. Click on the first hidden field. In the properties box, you’ll notice the value is empty. Past this into it:
<?php echo $firstName;?>
This is storing our variable for firstname on this hidden field.
8. Go ahead and make the values for the next two hidden fields the following:
<?php echo $lastName;?>
<?php echo $eMail;?>
Creating the Remaining Form Elements
Now we have created our form on the first page, we’ve given the form a place to store it on the second page and now we are going to create the last two fields for our form and then we’ll make it so it inserts into a database.
1. In myform2.php, create two more Text Fields from the Insert Menu. Their settings will need to be set to the following:
Text Field
ID: username
Label: Username:
Text Field
ID: password
Label: Password
2. Create a button and its ID should be submit.
Our form should look like this now:
3. Click on the password field so it is selected. In the properties box, change its type to password. This will prevent the field from showing the password to people when they type it in. Like most password boxes.
That’s it! Now we’ve created both of our forms and up to this point, they do exactly what they need to do. Next, we are going to add the database to DreamWeaver so we can interact with it.
Finishing Touches
1. In DW, in the databases panel. (IF it isn’t showing then use the horizontal menu to reveal it: Window>Databases)
2. Click the Plus sign and choose MySql Connection.
This brings up the MySql Connections box.
3. Fill out the box with the appropriate settings.
For Connection Name, localhost will work fine.
MySql Server: localhost. Even if you are using an online server, localhost very well might work.
Fill in your username and password for the database and then put in your database name. Then click Test.
4. In the Server Behaviors panel (Window>Server Behaviors) click the Plus sign and choose Insert Record.
Make sure the Insert Table is set to Users. If you’ve done this tutorial word for word – then DW should automatically detect what it needs to do. Make sure each column is set to do the following:
user_id is not getting any information as we set it to automatically increment.
If something isn’t being detected correctly, you can use the value dropbox and the Submit as: areas to correct them.
5. When you are done, Click Ok.
6. Save all your files.
7. Now go back to myform1.php and choose Live Mode.
8. Fill out the form, fill out the form when you get to myform2.php and click submit.
9. Look in your database and all the information you filled out should be stored!
That completes this tutorial. If you have any questions, ask in comments or feel free to email me. Thanks!
I admit, I tend to lean towards the left when it comes to social issues. I think that a young mother who is single and just had a kid – she should get benefits from the government to help her get her feet on the ground. The real issue though is with those who abuse the system.
A crackhead that lives in my building recently asked me if I wanted to buy some of her food stamps at a discounted rate. I told her I wasn’t interested and she kept lowering and lowering the price I’d have to pay in order to get them from her. I ended up just telling her to push off, as I didn’t need them. In all actuality, I think using food stamps to buy food would be quite embarrassing and I can’t help but wondering how little dignity this woman must have to go around and trying to sell them.
This incident sort of has me…well, I guess I’m having conflicting thoughts on it. I most certainly support people who need them and receive them. But, people like this woman…I mean she is selling them. That says to me she doesn’t actually need them. So, what’s the point? More importantly, how could our system be better so that assholes like her can be weeded out of the system?
But, that brings up another thought. If we take away these benefits from these idiots – then what? My guess is that they’ll turn to crime and that can’t be good for people like me.
It is very interesting – where I live – I have learned from talking to people that a group of people in this neighborhood have a very convoluted system set up. What I mean is that these people are most definitely drug addicts and what they do is this: They’ll sell each other food stamps and whatnot whenever they need a fix. Then – they’ll buy foodstamps off someone else when they absolutely need food. It’s like this interconnected network of drug addicts and the irrational methods they have to accomplish their short term goals. E.g. food or drugs.
I’m not entirely sure, but I think selling food stamps is against the law. I’ve thought of reporting these assholes when they try and sell them to me. But, really, what would that accomplish? Would these people care if they went to jail? Would they straighten up? My guess is they’d get punished and then continue their lives like nothing happened. So why even bother with it?
It makes me sick. Well, the older people not so much. But there are some people here who are younger than I am – and they collect all these benefits from the government and the only thing they do – any day of the week – is they argue with each other and have fights in the hallway. They’re worthless. They are like a bunch of rabbi infested animals. But what sucks even more is I can’t do anything to stop them or straighten them out. I’ve even told them how much more practical it’d be to have a job and how much more money they’d have – but they don’t care.
Truth be told, this really gets to me. Particularly the fact that there are so many people here who do absolutely nothing with their lives but create tension between each other. I’ve even told some of them that they are worthless and all they did was tell me how people like me keep them down. But that isn’t true. They put more effort in putting their shoes on in the morning than they do in trying to better their way of life. How is that my fault? I try to explain that – but they just tell me I’m stupid and that’s that.
The real issue here though is that these assholes are the reason honest people have such a hard time getting benefits when they do need them. That isn’t fair. I feel strongly about supporting social issues – but it is things like this that really dig under my skin. It just makes me sick.
In either gameplay mode, you’ll need to unlock (progress far enough) the shipyard. This is only a second level tech item for the Eco/Tycoons, so you should have access to it quickly. It is the Anchor Icon in the picture. Any questions about the game – post it in comments and I’ll answer it pretty quickly.
If you see that your tools or certain resources are disappearing for no reason – don’t fret! It is because you have houses or something leveling up. This requires resources.
You can temporarily stop this if you need to by clicking on a house and then clicking on the icon in the red box found at the top right of the info window that pops up. This will turn off automatic leveling up and allow you to level them up one-by-0ne when you want; or just clicking it again will allow them to level up automatically again.
The only bad thing about Anno 2070 is that it doesn’t give you a lot of great advice on how to succeed. But, at the same time, that is sort of what makes it so great; it comes down to a lot of trial and error. More importantly it makes you plan ahead better when you start figuring out what the hell is going on.
So, if you’re like me – then you probably ended up with your income being negative and slowly started painting yourself into a corner where it wouldn’t improve. So, here are some tips that I wanted to share it with anyone struggling in the same way.
1. Goals for the most part aren’t based on the idea that they need to be completed asap. Give your town time to grow.
2. BUILD MORE HOUSES! In Chapter 2 for instance, it will start you off with building 10 homes. Build more than that. Look at this picture:

Here I’ve built the research laboratory and built the tech homes in the exact circle that it encompasses. This ensures that every resident in these homes will have an activity to do and it will also go towards them leveling up later.
Look at the second picture. It shows a concert hall:
I’m not done building houses around it. But what I’ve tried to do is build the eco homes within the radius of that concert hall. With some tea farms, these houses will upgrade in minutes. REMEMBER: Build a solid foundation of homes and it will generate income for everything else you need.
3. Build more smelters and Basalt crushers. I added 4 additional ones of each. This helps replenish your building materials faster.
4. Draw out your roads while you are waiting. Add another city center so you can map out your roads further onto the island. Make sure you leave some room for other things you’ll need later. E.g. Laboratory, etc, etc.
5. Pretty soon, you’ll end up having your credits in positive.
6. Also —Make sure you increase the total storage space you can have.
7. When items such as coal – or what have you – get maxed out in storage – PUT THEM IN YOUR ARK! This will allow you to store items you can simply transfer back to the warehouse later when you need them. By moving them to the ARK, it will allow your town to continue manufacturing these items and not stopping.
9. Also, I’d run the game in windowed mode. The reason is – when you use fullscreen and go to another application, it doesn’t run in the background. In windowed mode, you can check your email or do whatever and the game will continue to run in the background. (When you are waiting for building materials or want your money to increase – this will help pass the time!!! I’m earning credits right now!) Also – I’ve realized sense writing this that the Continuous Play mission isn’t the best play to let the game play while you’re not paying attention. Shit happens and you want to be paying attention just in case.
That’s about all the advice I have at this moment. If you have anything to add – do so in the comments so other people can see them. Thanks!
There is something I’ve been seeing a lot of lately on gaming websites across the internet and it gets under my skin: Gamers across the globe (not all, but enough that it isn’t so hard to find what I’m talking about.) trashing the games they play. Previously, I wrote something about fanboys and that isn’t what this is about. What I’m talking about is the nonstop bitching about this game and that game in general.
On one hand, you’ll have a gamer bitch that it is taking too long for Valve to release Half-Life: Episode 3 and on the other you’ll have a gamer bitch about how unfair it was that Valve released Left 4 Dead 2 sooner than expected. Then – and I see this a lot – you’ll have people who say they won’t buy a certain game because they’ll only get 20 hours of game play out of it. I am telling you, this incessant bitching is the closest thing to perpetual motion you can find. I’d say that these gamers were being a bunch of little whiny girls, but that wouldn’t be true because usually the girl gamers don’t whine and complain about lilliputian issues.
I can’t help but think of the movie Jay and Silent Bob Strike Back. You know, the part at the end where they are going around and beating the crap out of everyone who posted something negative about them online. These precious little crybabies online – I’d like to visit their house and give them something serious to cry about. Their freaking idiots.
That might seem harsh, but let me tell you a little about my gaming history. When I was growing up, I had an Atari 2600. Around the time I was 12 or so – the NES came out. Now let me tell you, this was an incredible moment for me. Super Mario Bros. was amazing! It had unbelievable graphics, amazing sound and for the first time in my life; there was a game that had some sort of plot to it. When I got it, I would take a break about every 10 minutes and run around the house yelling about how awesome the graphics were. It was incredible.
Some time later the SNES came out and I was – once again – completely blown away by the graphics in Super Mario World. I couldn’t believe it. To me, it was the pinnacle of gaming. I mean for God’s sake, the freaking background had different levels of scrolling! Once again, I was completely blown away by it.
This hasn’t changed as I’ve gotten older either. When Prince of Persia 2008 came out – I was completely enthralled with the awesome graphics it had. I had never seen a game look like that and the level of creativity on a lot of the scenery was just exhilarating. I’ve always appreciated and absolutely loved the creativity of the games I play. Oblivion completely uprooted my world as a gamer. I had never, ever, ever seen anything like that. The moment you come out of the sewer in the beginning and are told to work on your next quest or just explore the world gave me goosebumps. Not to mention the other 19,491 reasons Oblivion was an awesome game. So imagine that Oblivion is Super Mario Bros. Then that means Skyrim is Super Mario World. And tomorrow I get to be completely blown away again and it makes me so excited I can hardly stand it!
Just look at some other series of games out there; Mass Effect, Dragon Age, Call of Duty, Final Fantasy, etc, etc,. Lost Odyssey, GTA Games, Red Dead Redemption, Bioshock 1 & 2, the Halo Franchise, Little Big Planet, Battlefield 3, Drakensang, Risen, and on and on and on. None of these games suck. None of these games fall short of blowing my mind away and making me excited as hell that companies continue to make games.
Yet, every site I visit; I see the same thing: bitch. bitch. bitch.
It is incomprehensible that gamers would love gaming so much but feel such a need to bitch about the games they play. I don’t understand it. Consider for a moment that I enjoy 3D Modeling as a hobby. Now keeping that in mind, I would give absolutely anything to work for a gaming company. What I don’t know; teach me. You need someone to work 16 hours a day? I’ll work 20. Let me be a part of this awesome industry.
Now, all of us love the idea of working for a gaming company. If this isn’t true then why are there a trillion wannabe colleges springing up that offer classes for this field?
The reason I’m saying this is because what does the average gamer do for a living? I’m the Director of Marketing for an Inc. 500 Corporation and I run a web design company on the side. Another gamer I know use to work in a gas station. Another in food service. And yet another installs home theaters for millionaires in Nashville. But, the truth is there aren’t that many developer jobs available, so we must contribute as gamers any way we can. Yet, the contribution we end up giving to the industry we love is bitching and attacking the developers? Really? How pathetic is that? To top it all off; it’s video games that allow us to temporarily escape our lives and enter an amazing world.
Take the “I’ll only get 20 hours out of this game, so I’m not gonna buy it” argument. This is nonsensical. A brand new game cost $59.99. If you only play a game for 20 hours, then you are being entertained for only $3 an hour of your time. That’s a pretty good deal! I mean hell, how many of us go to the movies and spend $50 on just two people and leave after 90 minutes? Even if you only make $10/hour, that means you have to work 6 hours to purchase 20 hours of entertainment! Oh freaking boo hoo!
Do you see? This is ridiculous. I’m curious what other people think. Do you think gamers should bitch and complain about every single game that comes out? Or do you think they should be thankful that these developers don’t start mailing out grenades to all these assholes?
I was asked today; “If hundreds of lions were taken out of Africa and placed in Siberia – and let’s say that they could survive; if you could see them in 10,000 years, do you think they would be 100% the same as lions still in Africa?”
I said no, I think they would change and adapt to their newer environment. Then I was threatened, called a socialist communist and a Darwinism worshipping sinner that was attempting to ruin America with my Atheist views.
OSCommerce can be kind of tricky if you aren’t use to working in php. Sometimes, something as simple as adding an image can prove both frustrating and time consuming. Searching online doesn’t offer much help because of all the people who have asked this question – rarely do they get a clear, direct answer. The purpose of this post is to help those who may be having this problem. I am going to tell you how to add an image to your home page in OSCommerce with code variations that do different things.
Home Page Text
The text on your home page is found in a file called “index.php” which can be found in this location:
/catalog/includes/languages/english/index.php
The ‘catalog’ folder is the standard folder that OS-Commerce is installed in. If you installed your store into a directory called “store” in your website’s root directory then the actual path would be:
http://yoursite.com/store/catalog/includes/languages/english/index.php
yoursite.com being whatever domain you actually own.
Looking at the File
When you download the file and open it in your favorite text editor program, you’ll see some code. The part we need will look like this at the beginning:
define(‘TEXT_MAIN’, ’This is the default…
If you delete everything written in this area so you can start from scratch, you will have this left:
define(‘TEXT_MAIN’, ”);
Or to demonstrate this better:
define(‘TEXT_MAIN’, ’This is where all of your additions will go‘);
Adding the Image
To add an image, just insert the following code:
<img src=images/your_graphic.png>
By inserting that code with nothing else, you’ll have the following:
define(‘TEXT_MAIN’, ’<img src=images/your_graphic.png>’);
If the image is wider than the main text area, then you’ll want to define exactly how big you want the image. (Or you may want to do this anyways…)
To define the image size – your code would look like this:
<img src=images/your_graphic.png width=”500″ height=”90″>
Where the width and height are how many pixels you want the image to be.
If you want to tell the image how to align itself, you would use align=”how”. For example:
<img src=images/your_graphic.png width=”500″ height=”90″ align=”center”>
Your available options for align being left, center and right.
Lastly, if you were to have a bunch of text also – the end result may look something like this:
define(‘TEXT_MAIN’, ‘<b>Hey! Welcome to a store!</b> We offer many things.<img src=images/your_graphic.png>’);
The above demonstrates some other things you may want to know. Typical html code snippets work as well. Such as the bold tags above.
That concludes this post and I hope some people find it useful. Thanks!









