PHP and MYSQL

JKaizer said:


.phtml doesn't say there is php coding in there. index.phtml needs to be changed to index.php.
There. I changed them all to php. Still nothing.
 
Do you have Apache and php installed on your machine?
 
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?
 
Not really sure, I know you have to install Apache...

I know there's an .exe that will install Apache, PHP, and mySQL all on a machine... but I dunno. Never done it myself.
 
Oh crap, I uploaded it, except I try to view it and Print Shop tries to open it. I am NOT re-installing the print shop once I wipe my drive. Well it may work for you, just go look here. Also maybe the name "index" could make it all screwed up as well.
 
Err, I can't remember how to change default opening things... >_>

If you can figure that out, change .php to your browser.

Anyways, there is nothing wrong with the code. I don't think comcast supports it... lycos.co.uk does... O.o;;

...gyah. This is strange. o_o
 
The only problem with that is it's a pain to change if you ever change servers.

...unless you make it a variable. XD

<nerd time>
If you hvae something that changes a lot (like an e-mail address, IM name, or URL) then you could try using a variable.

I'm gonna show how I could make my AIM name *let's say I post it on a couple pages* be a variable, so all I have to do is edit one page and it'll reflect on all my pages.

So, assuming you've read my earlier post, make a new file labelled "common.php"

PHP:
<?php
$aim = "ToxicKaizer";
$msn = "[email protected]";
?>

Simple enough, ne? You can change "$aim"/"$msn" to whatever you want, but it has to be numbers and letters, and much always begin with a letter.

Now, be sure to include it, so open up layout1.php and at the top put
<?php include("common.php"); ?>
So now all the variables will be on all your pages (becaues layout1.php is already everywhere)

Now, go to where you'd put the variable.
Code:
You can IM me on AIM any time, at <?php echo("$aim"); ?> and if I'm there, we can have a chat! ^^;
Simple enough, ne? The echo command just, well, echos the code inside the quotes.
Code:
<?php echo("Lala<b>bebe</b> ^"); ?>
Will get you
Code:
Lala[b]bebe[/b] ^

...that easy enough to understand?


And just to note, all php lines must end with a semi colon ; If it isn't there, you'll get a parse error. =\


Err... any questions now? XD
 
I uploaded it to something else, not really my server, but I have access to it. The server uses PHP, and it worked as it should. And yes, even with the relative urls. So there was no problems except for my computer. But I'm going need my own server in order to even test my own site if I used the php like that. Either that or install all that stuff. -_-
 
Most hosts that are run on a *nix system allow php, so meh...
 
Yes, the system is Linix I think or Unix, I'm not positive. I think I'll buy a book on PHP, so then I can learn it even when my computers off. I've found books to be better then websites at least for teaching you coding I have no idea why, maybe because I can take them everywhere, and it doesn't burn your eyes when you sit reading it for 3 hours straight :P
 
I should buy a book on php... maybe then I might learn something during school. XD
 
I usually just use URLs, even though I do a lot of moving XD

Oh well, to late to switch!
 
JKazier I know only some PHP codes.Can you tell me a site which has more codes.ANd Wow yes PHp is wonderful.It's helped me a lot.Shyper is wonderful.It completely supports PHP.SO guys pls use it.And Pokejungle In shyper should we use only links with PHP!like https://....
ANyway what is the full form of PHP and MySQL!
 
Last edited:
How would ig et that to work on Yahoo/Geocities sites? I checked the it said it supports PHP. Everytime I try to check the .php page I made, it opens up some download thing.
 
Since when did Geocities support PHP? O__o


Anyways, that's your computer. You need to set it up to make your browser the default application to open it.


@Cool Cracker: https://www.php.net
 
Back
Top