![]() |
PHP and MYSQL
Hi Guys Recently I've heard a lot about PHP and MYSQL!I've heard that these are very useful.But I
know only HTML and JAVASCRIPT.Can anyone brief me about these.What they are and How they work! And how I can use them to enhance my site!!! Thanks! --Cool [email protected] |
Err... mySQL really isn't needed... that's more efficient if you're storing huge loads of information...
php has it's uses, one of which is making your site dynamic. There's another thread in here that has a bunch of ways to do that... |
Hmm..It's not that JK.just that I want to know 'bout them!What do you mean by Dynamic!It does sound explosive.And Can you give me the link to the other thread.
Also if you know 'bout any site that has a good tut on either of them or both Please tell me! |
Dynamic...
Quote:
With normal HTML, if you wanted to add a link to the sidebar, you would have to do it on every page, and it's tedious work. That's where php comes into play. I don't really get that one code everyone seems to use, and I got one of my own. First, make sure you have a php compliant webhost. That's defiantly important. =p Okay, I'll make up a quick little webpage. Code:
Now, as my site grows bigger, and I have 20 differnet content pages, it's gonna become a pain to add in a link to the sidebar. I'd have to edit all 20 pages, just to add that one link. And what happens when I want to add yet another? I have to edit all 20 pages again. That's where PHP comes in. I can turn the above single file into 3 seperate ones, and it'll make my updating life very easy. I'm gonna break it down into three files, "layout1.php", "index.php", and "layout2.php". On all my pages, everything up to where the main content begins is the same. Code:
Then, I go back to index.htm and rename it to index.php. The .php at the end tells the webserver that there is php coding in there. So, at the moment, index.php is looking like this: Code:
PHP Code:
Code:
Now, like the beginning bit, the end bit is the same throughout all my pages. So I'll take this bit here, and put it in a new file labelled layout2.php Code:
PHP Code:
If you have any more questions, feel free to reply with 'em and I'll try to answer. =) |
Wow!That's brilliant tutorial!It's da bomb!It's helped me a lot!Thanks JK!You are my buddy.Yeah well were you online all yesterday cause I saw you postin in 5 forums!LOL
*takes time to slowly read through this*Hmm...If have a doubt I'll ask you. |
Mmm, it's no problem. :P Glad to be of service.
|
I tried it and it wasn't working. It showed up as:
<?php include("layout1.php"); ?> Welcome to my site! There isn't any news because I just started it. =) <?php include("layout2.php"); ?> It showed the PHP code, but it was fine when it was just layout1 included with the rest. Also, my computer is dumb and the print shop was trying to open my PHP files, don't worry I got rid of that. |
Had to bump this topic, I need the PHP tutorial, but I'm having problems with figuring out shyper.....
|
Quote:
|
OMgosh!!!!
IT ACTUALLY WORKS!!!!!!!! w00t! Sorry, things don't usually work right for me.....^^ wow! you guys can check out my site at http://pokejungle.shyper.com |
Looking good PJ! ^-^
So the PHP helped you out? |
Very much so! Now I can update my links + affiliates really quick....
And I can can have a Pokemon of the Week on EVERY PAGE! *YAY* |
^_^
It does make it easier to update. ~_~ |
Ya, thanks for the tutorial, it really helped!
PS: Shyper has a GREAT page editor! You can edit it with HTML, or you can actually change the page.... |
Well I copied what you did to see if it works, it didn't. No I didn't put any colors in though. I don't know why it didn't work, I'll try it again. :/
|
That's strange... it should work perfectly... o.O;;;;;
...you do have layout2.php right? |
Yes, but the only thing I did different was used phtml instead of php ending. I'll go try again...
|
Did you change the code to fit that then?
*is kinda dumbfounded* |
1 Attachment(s)
Quote:
|
Quote:
|
1 Attachment(s)
Quote:
|
Do you have Apache and php installed on your machine?
|
1 Attachment(s)
Beats me. But it did work at first. Just without the second one. So I'm guess I do. Plus I have the layout1 and 2. Maybe those are the problems.
|
I see nothing wrong... X_x;;
There's nothing wrong with the coding... I'm pretty sure your machine doesn't have it installed. You'd have to have installed it yourself, and most of the time it's just easier to get webspace. Try uploading it to the a php compliant host... then we'll see where the error is. ^_^ |
I have no idea if comcast supports php or not, I'll upload it anyway. If it works then I guess the problem is solved. Anyway, how would I install it in case it is my computer?
|
| All times are GMT -8. The time now is 4:52 PM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.