Php Basics - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Graphics & Multimedia » Php Basics


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 06-08-2005   #1 (permalink)
Gaia
Senior Member
 
Join Date: Jun 2005
Location: under a rock
Age: 23
Posts: 665
Send a message via AIM to Gaia Send a message via MSN to Gaia Send a message via Yahoo to Gaia
Default

Some small basics of PHP.

Before I start, let me just say that there are many ways to do certain things in PHP, these are just my own ways of doing them.

Below is how you declare a PHP page. Of course, PHP pages have a .php extension...so index.php would be your PHP file.
And for those who don't know, PHP, stands for Hypertext Preprocessor. Doesn't really go with the abbreviation does it...it used to be
called Personal Home Page tools, then got changed once it became a more functional code.

Code:
<?php

[PHP CODE HERE]

?>
To display text in a PHP page you use echo. (also known as print).

Code:
<?php

echo "Your Text Goes Here";

?>
You can use HTML within a PHP page as well. You just have to watch out for the use of single/double quotations. If you place double quotes in an echo that is encased with double quotes, you'll get an error.

Code:
<?php

echo "You can <a href='index.php'>click here</a>";

?>
Use single quotes when using HTML within a PHP echo.

Or you can switch it up and do it like this:

Code:
<?php

echo 'You can <a href="index.php">Click here</a>';

?>
A variable is used to store information..Integers, strings, or anything else.

To define a variable, you use the dollar sign '$'

Code:
<?php

$variable = "Variable 1";

<?
So, to call a variable, you simply insert it into your echo.

Code:
<?php

$variable = "Variable 1";

echo "This is $variable";
?>
Copyright, Gaia of Eternal Realm

Only did a bit, don't know if many are interested in it, if so, tell me and i'll add more. Also, if you have any questions about this tutorial, just ask :)
__________________
http://eternal-realm.net/images/sigs/knife.gif
http://img304.imageshack.us/img304/4...rlpower9rm.jpg
Do we have to die for love or do we love to die?

Please don't Instant Message or Private Message me for graphic requests. If you want a graphic made go to this forum and someone will surely help you out.

For those who give a %*#$
Gaia is offline   Reply With Quote


Old 06-10-2005   #2 (permalink)
SeoGuy
Senior Member
 
Join Date: Oct 2005
Posts: 1,343
Default

nice tutorial. i know nothing about coding php so this was really helpful.
__________________
<span style="colorurple">Link removed</span>
SeoGuy is offline   Reply With Quote

Old 06-10-2005   #3 (permalink)
Frozen
Senior Member
 
Join Date: Apr 2005
Location: Cairns, I think
Age: 18
Posts: 883
Default

good tut =D
__________________
<center>
http://i11.photobucket.com/albums/a1...iggynature.png

Frozen Pronounced Fro~Zen
-----------------------------------------
My Deviantart
-----------------------------------------
Gifts
[+][+][+]
[+][+]


</center>



Frozen is offline   Reply With Quote

Old 06-10-2005   #4 (permalink)
Gaia
Senior Member
 
Join Date: Jun 2005
Location: under a rock
Age: 23
Posts: 665
Send a message via AIM to Gaia Send a message via MSN to Gaia Send a message via Yahoo to Gaia
Default

Thanks, glad it was a help :)

I'll be sure to add any other PHP Tutorials i make in this forum too.
__________________
http://eternal-realm.net/images/sigs/knife.gif
http://img304.imageshack.us/img304/4...rlpower9rm.jpg
Do we have to die for love or do we love to die?

Please don't Instant Message or Private Message me for graphic requests. If you want a graphic made go to this forum and someone will surely help you out.

For those who give a %*#$
Gaia is offline   Reply With Quote

Old 06-10-2005   #5 (permalink)
Tribe No 1 Fan-
 
Posts: n/a
Default

That tutorial just confused me more...
  Reply With Quote

Old 06-10-2005   #6 (permalink)
2432
Senior Member
 
Join Date: Jun 2005
Location: England
Posts: 247
Send a message via AIM to 2432 Send a message via MSN to 2432 Send a message via Yahoo to 2432
Default

ah, pretty good. Nice job
__________________
~ Rubbersquirrel
2432 is offline   Reply With Quote

Old 06-11-2005   #7 (permalink)
Gaia
Senior Member
 
Join Date: Jun 2005
Location: under a rock
Age: 23
Posts: 665
Send a message via AIM to Gaia Send a message via MSN to Gaia Send a message via Yahoo to Gaia
Default

Quote:
Originally posted by J-Two@Jun 11 2005, 03:20 AM
That tutorial just confused me more...
Maybe if you tell me what you were confused about, i can clear it up for you.

__________________
http://eternal-realm.net/images/sigs/knife.gif
http://img304.imageshack.us/img304/4...rlpower9rm.jpg
Do we have to die for love or do we love to die?

Please don't Instant Message or Private Message me for graphic requests. If you want a graphic made go to this forum and someone will surely help you out.

For those who give a %*#$
Gaia is offline   Reply With Quote

Old 06-12-2005   #8 (permalink)
xtrasux
Senior Member
 
Join Date: Apr 2005
Location: New Zealand
Age: 20
Posts: 487
Send a message via MSN to xtrasux
Default

thanks for that, really helpful
__________________
<div align="center">http://img396.imageshack.us/img396/1338/xtrasux5ux.gif</div>
xtrasux is offline   Reply With Quote

Old 06-12-2005   #9 (permalink)
Gaia
Senior Member
 
Join Date: Jun 2005
Location: under a rock
Age: 23
Posts: 665
Send a message via AIM to Gaia Send a message via MSN to Gaia Send a message via Yahoo to Gaia
Default

no problem :)
__________________
http://eternal-realm.net/images/sigs/knife.gif
http://img304.imageshack.us/img304/4...rlpower9rm.jpg
Do we have to die for love or do we love to die?

Please don't Instant Message or Private Message me for graphic requests. If you want a graphic made go to this forum and someone will surely help you out.

For those who give a %*#$
Gaia is offline   Reply With Quote

Old 06-12-2005   #10 (permalink)
2432
Senior Member
 
Join Date: Jun 2005
Location: England
Posts: 247
Send a message via AIM to 2432 Send a message via MSN to 2432 Send a message via Yahoo to 2432
Default

very useful, i dont know that much about PHP
__________________
~ Rubbersquirrel
2432 is offline   Reply With Quote

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basics of sql alan86 Programming 4 05-12-2010 08:16 PM
Got the Search Engine Optimization basics covered, what's next? alexa Search Engine Optimization 1 07-12-2006 06:26 AM
The Basics Of Brush Making Sanjiun Graphics & Multimedia 1 08-18-2005 05:32 AM


footer left
All times are GMT. The time now is 09:33 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0 RC6

Iphone 4 | Debt Help | Cheap Home Insurance | Loans | Breast Enlargement

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49