Tran-Gate
Oct 18 2008, 03:42 AM
Hey guys, I am a very, VERY, curious person on finding out how things work on the computer if I find them interesting and I can't stop thinking about the thing until I find the answer. The sooner I find the answer, the less time I get a headache. So I was wondering how websites work. I mean how everything would be put together. Like how a game would be put together linking object files and libraries(i think). How would you export a website template onto an actual webpage and how would you edit an HTML file to make it fit the template exactly. How would you know how tall(length) your website template would be? How does PHP work with HTML and how could you put together MySQL and PHP together. I think that MySQL is a database manager, right? But how would you access the database/website from your computer? And how does PHP work with MySQL? So many questions. I am sorry for asking so many questions. I would at least appreciate if you(the reader) would at least answer the questions you DO know so I could learn something and stop wondering so frequently. Another favor I want to ask you is to try to make your posts/replies descriptive so I could possibly picture it. =) Thank you in advance~!!
Comment/Reply (w/o sign-up)
jlhaslip
Oct 18 2008, 04:55 AM
Hello, tran_gate, welcome to the Trap17. Good questions, and I am certain that you will be getting lots of replies to the questions you ask. I will offer this reply to kick off the flurry. HTML is the language of choice for most web-sites. The name says it all... Hyper Text Markup Language. The purpose of HTML is to provide information available via the internet in a 'structured' fashion. By structured, I mean that the page should have a Title (heading), Divisions of the page (sub-headings), paragraphs, lists, and so forth. HTML provides the means to 'structure' the content of a page. CSS (Cascading Style Sheets) offer a means to 'style' the page. All the headings can be modified, sized, coloured, etc and font-styles added using CSS. The styling can be held in a linked, external page, in the head of a page, or 'in-line' with the element it is styling. Many pages on the web are 'static' pages, meaning that the content of the page is written once and rarely changed, except by the page Author and then re-uploaded to the Hosting Account. Dynamic pages, on the other hand, often use a server-side scripting language like PHP or ASP to modify the site content based on user-made choices. If you see an URL containing a 'query string such as ?id=1&member=ralph, php will use that information to do something. What it does depends on the particular script and the actual values contained n the query string. Example: '?act=admin' might mean to produce the Admin Panel of a site. PHP is used to provide the HTML content of a site based on the query string and often is used to read/write information from a Database. Again, the 'query string' is used as a 'seed' to select the DB contents, and then writes the html content onto the page, which is then styled using CSS. Is that what you needed to know?
Comment/Reply (w/o sign-up)
xpress
Oct 18 2008, 05:34 AM
Hmmm......You asked for an entire web development course in a single question I don't know much about templates. But I will tell you something about HTML, PHP and MySql. First, How does HTML work with PHP.Actually HTML doesn't work directly with PHP. PHP is a server side scripting language, like javascript which is for client side. A scripting language actually does something in response to an event(s). Since PHP is server side language, first we need a Web Server, to process the PHP code and PHP language and its libraries. We embed the PHP code into HTML page with <?php and ?> tags. The code will be on the server side. The client cannot see that. When a user requested a page with PHP, the server executes the PHP code, and will show the result in HTML page. That is the html part in the PHP page will be displayed. To make it simple, I will give you an example.For example, you want to develop login page into some xyz.com site. So, the login page has two fields...username and password and a button to submit them. Let the page be login.html. The fileds username, password and submit are a part of a form in the login.html page. The form generates the event(I already told you, scripting language needs an event to start) when you click submit button. The form has an option( action what to do). When you click the submit button it executes the action. Since you want to login, let the action be processlogin.php. That means, when you click the submit button, the processlogin.php page will be initiated at the served and the username and password will be sent to it. (Sending information to server invloves two methods GET and POST. They are somewhat technical. So I will explain them simply. When you click the button, if you can see the username and password in your browsers address bar it is GET request. If they don't appear at address bar it is POST request.) First let us assume our login.html page will do the following things.1. It displays the fields username, password and submit button. 2. If the userclicks the submit button, it sends the username and password to processlogin.php page. So, let us come to the server side. Assume our processlogin.php page will do the following things. 1. First it receives the username and password. 2. It connects to the database. (MySql, for example) 3. It verifies the username and password pair. 4. If the pair matches it gives you welcome message. Or if it fails, it will tell you invalid username or password. 5. Disconnect from database. How PHP connects to the database? PHP has some methods to connect to database, for example mysql_connect. Using this method mysql connects to some database we specify. After that PHP executes some query at database(using mysql_query method. For example, assume this query select * from logindetails where name='username'). Let us call it result. Next our PHP code compares the username and password with the result. As per the result, it executes the 4th step. That is it displays the HTML part of our processlogin.php page. And it will disconnect from database. simple.... I tried my best to make it simple and general rather than technical. If you know something about database and HTML you'll understand it easily. If you can't understand anything or something, ask me and I am glad to expalin it in detail.
Comment/Reply (w/o sign-up)
shadowx
Oct 18 2008, 11:51 PM
Aha! A question i could write a whole book on! But xpress got most of it down already! Let me talk about HTML and templates, HTML has already been described and it was the first language i ever learned, followed closely by javascript, then PHP, MYSQL syntax, CSS a little of VB and ive stopped there! IF you wanted to make a templste you would usually use a recognized format, for example you would draw it up in a graphics program first to create the graphics, perhaps having a section to the left containing a list of links, a large header image at the top and the content in the remaining space. To make the template fit the screen you have two options. The first is to use flexibly sizing. Within HTML you size objects with code like : Width=40% height= 100% so if i was sizing an image it would take up 100% of the browser's vertical space and only 40% of its horizontal space, so the image would be stretched from top to bottom, no matter what size window you had. If you have a screen which is 800px by 600px it would fill that space, or if you had a screen the size of a cinema screen it would still fill up all the vertical space. so you can see that if i was sizing a template i could use percentages to make sure a top image only took up 10% of the space leaving 90% for the webpage content. Or you can use static sizing using pixel values like: height=100px width=800px (you dont need to add "px" to the end but i usually do) So in this example the image would be 100px wide which is a VERY optimal size for a header image or any other part of a website as 800x600 is the second most common screen size so you would not loose out visitors. So if i were to create a template using pixel values i would make sure that all my content fits within 800px wide. That way 99% of computer users can see ALL of my website! Good times! As i said the first step in making a template is to draw it out on paper or a computer. You then create the individual elements. So you would draw the entire template and then cut and paste the little buttons and other graphics and save them individually. If you dont already know HTML try learning it, its pretty easy stuff! As for how do i know how tall to make the template, i dont need to. If i make a table that is 20 pixels high and i put in 100 lines of text that use up 400px of space the table will automatically get bigger to fit the text in (unless i tell it not to but why would i do that?!) So no matter what happens the HTML template will ALWAYS be tall enough for the content inside it. Also when you specify a background colour or something that will fill the whole page of the background. eg bgcolor=black would make the background black, no matter how long my page was, whether it was one page long or a million pages long, the background is always black, so theres no worries about the page turning plain white half way down! As touched on by xpress the interaction between PHP and a MYSQL database is fairly simple. There are a few steps: 1) Connect to the database: $link = mysql_connect("Server", "username", "password"); 2) Select the database: mysql_select_db("database_name", $link); NOTE: "$link" is a variable as shown by the dollar sign. When doing the first step you must assign a variable to that function. Basically the first step creates a link to the database and that link is stored within the $link (or whatever you want to name it) variable. Its like a telephone call and the $link variable keeps the call open. Within this there is no connection! 3) execute a query: (using xpress' example:) $result = mysql_query("SELECT * FROM table_name WHERE field='VALUE'", $link); NOTE: See the $link variable? It tells the code what connection to use. Also note ive added a WHERE clause, so if i put in a username where VALUE is it would look through the database and return any and all rows with the username i tell it to find. Useful! 4) Get the data from the $result variable: We use a variable called an array. An array can store lots of info for example: $array[0] = "ZERO"; $array[1] = "ONE"; That single variable can contain two (or a million!) different sets of data. So in my example of the query it might return 3 rows so we use: $row = mysql_fetch_array($result); So now the variable $row contains ALL of the data returned from the database ready for me to look through it, check it, show it to the user etc..... And they are the basic steps involved in using a MYSQL database with PHP. As i understand it (im not sure on this, even after about 2-3 years of personal experience!) MYSQL is simply a database format. In fact Microsoft Access has support for mysql code/queries. PhpMyAdmin is a tool used for managing these databases. (so you can imagine PhpMyAdmin is like Microsoft Access. It isnt a database in itself it is more like a program or tool used to make the database look friendly and easy to edit! I hope that helps PHP is an amazing language! So much can be done with it. In fact what language powers this forum? PHP! alongside CSS (for formatting) Javascript (the shoutbox (technically AJAX but basically Javascript!) and for the quick reply) MYSQL (to get the data our of the database, this data includes user login info and post data etc..) HTML of course to build the actual page. and i think thats it! SO if you were good enough you could make your own forum, shopping cart, login systems, contact forms, newsletter mailing lists, text based games (like those text based RPGs) Profile sites and sites like myspace etc... loads of stuff! To make graphical games you would need to learn a language like Java or flash which do indeed use libraries and object/class files. But i never got on with those!
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : Website Structure Php Mysql Html- Php Or Html?
- which do you use? (54)
Well being a HTML its easy for me but what do people use the most? Is it HTML or PHP. It depends
really on which you learnt first. So im gonna have a poll.Post HTML for Html and PHP for php and we
will see which is more popular....
Flippingbook Html Edition
- download FREE version (6)
You can create professional online albums/books with this simple and convenient tool: FlippingBook
HTML Edition . The main attraction with this Javascript+SWF application is the page-flipping or
page-turning feature, like we are used to do with physical publications like books, magazines, etc.
http://www.page-flip.com/downloads.htm this free version has several limitation however: up to 10
pages only, and you gotta retain the copyright link embedded in it. of course there is the paid
edition too, in case you want to use it beyond the limitations of the free version....
My Website
- (23)
Hey guys, check out my website at SnD Gaming I made the flash thing all by myself....
Free Phpnuke Themes
- Cool-looking themes for your website (5)
Hi, i'm new and I would like to start to post in these forums by sharing you all a link to a
website that contains FREE PHP-Nuke PRO themes. Many of those templates include its own V2 ShoutBox,
a Flash Navigation Bar, Flash Headers, Forums matching skin and many other cool features. You can
even play your music in your website with some of them!! Check them out! them are perfect for host
a gaming website or personal homepages http://phpthemes.net/ ...
Help Creating A Profile Website
- how do i make a profile website (20)
Ok this is my idea: I am making a website about anime. Its function is add anime, review anime,
search anime, anime information. Users can make a profile. People can make a profile which they can
edit to theire likes with html to give it a fancy look.(this is what my problem is about) What i
would like to know is how can i accomplish this. I already have the database for the anime titles
etc ready, the only thing that needs to be done is the profile section. If you have any tutorial,
tip or guide i would really really appriciate it. Thx in advance. ...
How To Make A Website
- (If you're trying to drive people away from your site) (30)
Alright so there are many topics out there of how to make a website that everyone will love and want
to go to, but I can't seem to find any about how to make a website that people will hate and try
to run away from, so here are some pointers for those who are trying to make the worst website:
Step one: COLORS Be sure to use a vivid and bright background color, and a non-noticeable text
color. Nothing wakes people wake up more than a florescent yellow background with white text. Make
people work to try to read your website. After all, you have some great content...
Import From Excel File Into Mysql Database
- (13)
Has anyone tried using the excel import function that comes with phpmyadmin
http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
to import the data to , there is a link on the bottom left corner which says "insert data from a
text file into the table" - although it says text file it still can be used to import an excel file.
When you click on this link you will be taken to a page where you will be asked for the file name
(the...
Html Editors That Work With Asp Php
- wondering mind (10)
Out of the many editors that i have seen not to many support asp or php those that do its more of
converting so i was wonder which ones do have full blow asp and php capabilities on them?...
Has Anyone Designed A Website For A Wow Guild?
- (4)
I belong to a WOW guild and we're considering a website for our members. Has anyone any
experience designing and running such a site? For a start, we're only interested in a basic
website for our members so we can show member character stats, announce raids and have a forum so we
can all leave messages for each other and discuss strategy and levelling tips. I know there are
templates available and I'm wondering if it would be just as easy to use one of the premade
templates rather than create a site from scratch. Any comments would be greatly appreciated ...
Website Help
- (5)
Hi Can someone help me with transferring data from my forum to another forum. I would like to know
how to transfer members and all that. Can someone help me with that do you just backup the mysql and
just load it in the new one or wat?...
Accessing Mysql From Javascript
- Javascript to communicate with database (5)
I found a nice program which allows you to put quizzes on your web site. You can design your own
questions, set the layout of your page, and there is also a possibility of having the results
emailed to you. It further offers a facility to store the results and all that, all you have to do
is put a link in the program, telling it which page takes care of that. However, when I look at the
HTML code the program generates, I see that most of it is written in Javascript. Obviously, it also
uses variable names, but as I don't know any Java, I was wondering if those variab...
How To Add The Flash In Our Website ?
- Animated image in website make the site atractive, but take more time (4)
Animation in this world: We see in most of the website that company icon, logos, memorandom,
Advertisement, smily,even todat Button etc. in the website are animated in a sequencial manner so
any body who see this get impressed, even so many time i also get impressed and want to give thanks
that one who creates this logic a fantastic idea, adobe website we read some articles, i want a
proper process or command from starting to end till image(how many types of image) animated in my
website. what software, hardware, required to do complete this task. any idea, tutorial, not...
Website Design Discussion/help
- (4)
Can we make this a thread where you can ask questions about websites design/help regarding related
stuff? Are the experts willing to come in & answer questions every now & then? Some questions I
have: I have been told frames are bad design? What's your take on this? Also on this page:
http://eien-no-ai.nu/15/index.html -- is there a program that can get the automate the picture
buttons to look like that or is it something you have to do manually? Just that I've seen this
kind of formatting quite often so wondering if it's a generic look you can get fr...
Stop Your Html Codes From Being Stolen
- Stop your Html codes from being stolen on your HTML pages. (16)
Hello people! Obviously a lot of people use these little scripts to stop you from right clicking on
websites/HTML pages etc. I know many many people use near enough the same kind of coding as the one
I just made. I decided not to put this in the Tutorials section because I know alot of other codes
do exactly the same thing as this one I am going to be sharing with you! This code may be
re-distributed if you wish. I have no copyright on it, but please put some kind of "Thanks for the
no right-click script". Here it is: QUOTE oncontextmenu="return false" onselectsta...
Flash Media Into Html/css Website
- does anyone know how to import a flash into a webpage with transparenc (3)
Hi I need some help , Im designing this website for school studies However, I made a flash drop down
menu, works perfectly, but you know how flash has a background when you export it in to a SWF file?
For example my flash is width= 800, and height = 200 but my div box on my html page for my
navigation is only 50 px my buttons is width of 50px and the rest of the content is the drop down
animations i want to insert it into my navigation div box but i want to set the flash background to
transparent so that when the drop down menu comes down it overlaps the text or whateva...
Help Me Flash My Website.
- web designing (7)
Hey...guys ...I have a website ...which is sort of a personal website.. But now I want to change it
to a blog site for my college... I want the site to be cool...and awesome Its an engineering
college....so I want the site to look...techie...sci-fi...you know what I mean... I know that I can
make it look that way if I use..flash ... I want the site to look just a little bit like the
www.2advanced.com...u will what I mean if u visit that site.. I have no experience in flash so
what I want is -how to include flash in my website -what softwares do i need -where can i g...
Help Needed For Alumni Website.
- (8)
I'm planning to start an Alumni website for my college mates, I searched for any Alumni CMS but
couldn't find one. So If anyone of you know any Alumni or Community CMS, please share it with
me. I need a community CMS where each member Can have his own page, and somewhat related to orkut.
If there is any add-on MODs for Joomla or Mambo please do share them too....
Displaying Html In Flash
- Using ActionScript (9)
Webdesign Frequently Askd Questions
- is it posible to design a sercheingin in your website. (12)
what i wanna no is is it posible to incorporate a custom search engin into your own website. for a
while now i have bin wondering is it posible to do this as i would like to try something like this
out. but i have heard of there being a way to do this in pearl but i no nothing of pearl does
annyone have anny tips or info on this? (i use frontpage and dreamweaver)...
Web Design Help
- I need help designing my website homepage if possible? (5)
Hey Trap17 Users! /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"
/> I'd like to get some help from experienced Trap members, to help me get my homepage of
Central-Gaming design page up. /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
alt="smile.gif" /> If possible, I'd like to have the following used: HTML PHP Maybe some
jscript Also, what I'm trying to do is create a homepage (A good homepage) for Central-Gaming.
(My site). /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin...
Creating A Good Website, How?!
- (19)
Creating a good website, How?! I looked at many forums, searching on now to create a good website,
by good I meant good website interface. For example, Trap17 have this amazing flash header, and nice
design… I searched and searched, I found that many people started with a photoshop picture, then
they make it come true by requesting a website coder (A.K.A. Programmer) to code the whole website
for it. If, I said if, I were good a art, I can design a good nice picture off photoshop, and I
know how to code, does that means I can make a good website? Please post any comm...
Help! Php Or Just Html?
- i want to start buliding my website. which is better, php or basic htm (16)
i try to start this topic in webhost category but it seems like i cant. i dont have the permission
so i just post my topic here. im sorry mod.. i want to build a website which contains: - Links to
videos - Informations - photos - flash i don't know if i should use php or just HTML. guys,
what are your opinions..??...
Excellent Free Website Templates
- (29)
Site also includes 60 free logo templates, 63 free banner templates, 84 free newsletter templates,
website arrows, abstract images, and much more. Fantastic resource...
http://www.templatesbox.com/templates.htm ...
A Twist On Basic Authentification
- html help (4)
Alright, i am working on a website where a number of different users from different companies will
be looking hooking into one website. What i want is to know how i can differentiate between the
users based on the information passed by the webserver. I've been told to that information
will be passed along html_user(and if i have a distinct user then i can just query the database with
that info and get what i want) But how does this work? I am sorry i know this is cryptic i'm
kind of searching to see if this strikes a bell with anyone. So to sum, many user...
How To Create Smallest Website
- (22)
I wonder if any one create smallest website on earth? any webmaster can share this things .. .if
they can make how could it be? /wink.gif" style="vertical-align:middle" emoid=";)" border="0"
alt="wink.gif" />...
Need A Logo For Website Can't Get Into Ideas
- (11)
Hi friends i'm running site on computinghost server called http://onecore.net i think again i
need some help,for good touch to the site so pleasse help me can you think of any good logo idea,i
want simple,creative,techno-anime style yet smoot for eyes. can you think of any good idea,mymind
is just wandering here and there /unsure.gif" style="vertical-align:middle" emoid=":unsure:"
border="0" alt="unsure.gif" /> hope u understand that .... Please send in any dieas for logo almost
anything....
Vb And Mysql
- connecting VB with mysql database (3)
hey....i have heard a lot about PHP and MySql, there are a lot of articles about it and every bit of
help is easily available...its a lot easier to set up PHP with MySql....but talking about VB...i
didn't get anything convincing... I know it can be done...if not as easy as Php. I have a
school project in which i have to connect VB application to a mysql database ...please tell me the
easiest way to do it... I have books which tell a lot about VB and oracle....about there
connectivity and database usage..but there is no mention of MySql...I think its not a popular ...
A Small Html Problem
- How to display foreign characters correctly when designing a site. (5)
I was wondering how I could solve a small problem. I was told that some people see accented and
umlauted letters (such as " é " and " ë ") as question marks (" ? ") on my website. I come across
the same thing sometimes when looking at websites which use non-English characters. Funnily enough,
the other day, I looked at a site and the apostrophy ( ' ) was also shown as a question mark.
That is a very common character usually, I would think. I thought it had something to do with the
character encoding settings, and let me also mention I use Mozilla Firefox as my brows...
What Is The Best Free Html Editor?
- (24)
im looking for any kind that is free really.... i use windows but if you have one for a different
platfor, go ahead and add it for reference for other users. If you have one for normal text editor
and wysiwyg, add them both. i have been using notepad as my normal html editor but im looking for
something different... at least so i can see the different colors of the codes. Right now i am
downloading moxilla's seamonkey suite but im not sure how good it is... i will post a review if
i ever use one. If you have used the html editor you suggest or you just heard abou...
Psd --> Editable Html
- (4)
Here's the deal. I am new at working with web objects in photoshop. I have CS3, and I created a
really nice template. I'm told I have to do something with slicing. So I have the template, and
it has images, buttons, and text on the buttons, and text fields, etc. How can I export this to HTML
and images, and be able to open it up in dreamweaver in an editable web page? I've tried
exporting to "web and devices" and exporting as HTML and Images, but when I open it up in
dreamweaver, it looks right, but it is all images. Thanks...
Looking for website, structure, php, mysql, html,
|
Searching Video's for website, structure, php, mysql, html,
See Also,
|
advertisement
|
|