Piggymoo - watch anime & tv online

Read this concerning spamming and off-topic posting...
Anime A-C
Anime movies
Ah! my goddes
Air
Aishiteruze Baby
Avatar
Ayakashi
Banner of the stars
Battle angel
Berserk
Big O
Black Lagoon
Bleach(dub)
Bleach(sub)
Blood+(dub)
Blood+(sub)
Busou Renkin
Card captor Sakura
Chobits
City Hunter
CLANNAD
Claymore
Chrno Crusade
Code Geass
Cowboy Bebop
Crest of the stars
Anime C-F
Death note(dub)
Death note(sub)
Desert Punk
Detective conan
Devil may cry
D.Gray-man
Digimon
Ef - a tale of memories
Eureka 7
Ergo Proxy
E's Otherwise
Elfen Lied
Elemental Gelade
Evangelion
Fate/stay Night
Fooly Cooly (FLCL)
Fruits basket
Full metal alchemist
Full metal panic
Galaxy Angel
Gantz
Gatekeepers
Goshusho-sama Ninomiya-kun
Gundam 00
Gunslinger girl *New season 2!*
Anime F-M
Ghost in the shell
H2O
Haruhi Suzumiya
Hayate no Gotoku
Hellsing
Higurashi no Naku Koro Ni
Ichigo 100%
Innocent Venus
Inuyasha
Kanon
Karin
Kasimasi
Kenichi
Kimi ga nozumo eien(Rumbling hearts)
Koi kaze
Learn Japanese
Love Hina
Lucky star
Maburaho
Mai HiMe
Mai Otome
Majin Tantei Nogami Neuro
Maria-sama ga miteru
Naruto
Anime N-Z
Nodame Cantabile
Noir
Ouran high school host club
Paradise Kiss
Persona
RahXephon
Ramna 1/2
R.O.D -The TV-
Samurai Champloo
Sayonara Zetsubou Sensei
School days
Serial experiments Lain
Shakugan no Shana
Shigofumi
Shuffle!
Sky Girls
Slayers
Strawberry panic
True Tears
Trigun
The twelve kingdoms(juuni kokki)
This ugly yet beautiful world
YU YU Hakusho
Zero no Tsukaima
Zombie Loan
PHP Tutorial #1: The Basics

 
Post new topic   Reply to topic    Piggymoo.com Forum Index -> webdesign
View previous topic :: View next topic  
Author Message
Neggi
baby piggy
baby piggy


Joined: 08 Mar 2008
Posts: 4
Location: (UK)


Add reputation for this poster

PostPosted: Sun Mar 09, 2008 10:45 pm    Post subject: PHP Tutorial #1: The Basics Reply with quote


I might post one of these every couple weeks if I have the time, just thought I'd help out anyone in need of some PHP advise.

If you have any questions about PHP or JavaScript, please feel free to ask me!

PHP Basic - Tutorial#1.
The easiest thing to do when working with PHP is assign and echo variables.

Here's an example:
Code:
<?php
$example = ("Hello, this is an example.");
echo($example);
?>

Comes out to:
Code:
Hello, this is an example.


Variables are used a lot in common PHP pages, and can be toyed around with in many ways.
Math is one of the most common ways of manipulating variables.
For example;
Code:
<?php
$var1 = 50;
$var2 = 3;
$var3 = 78;

echo("The sum of 50+78x3 equals ".($var1+$var3*$Var2).".");
?>

Comes out as;
Code:
The sum of 50+78x3 equals 284.


You can grab variables from the page URL too!
Have you ever noticed that in some websites, for example; Google, links can refer to URLs like "http://www.google.com/search?hl=en&q=example"?
That's because the index page of Google uses PHP to search for the variable defined by the "&q" string.
Here's an example for a webpage with the URL "http://www.nogginanimations.com/?p=home";
Code:
<?php
$page = $_REQUEST['p'];
if ($page=="home") {
echo("This is the home page.");
} else {
echo("This is not the home page.");
}
?>


That's about all I can bother with for today, but stay tuned for more!
Back to top
View user's profile Send private message Visit users myspace pageVisit poster's website
clutz1988
piggy
piggy


Joined: 04 Jan 2008
Posts: 69
Location: good ol' UK

Reputation: 9.8Reputation: 9.8Reputation: 9.8Reputation: 9.8Reputation: 9.8Reputation: 9.8Reputation: 9.8Reputation: 9.8Reputation: 9.8
Add reputation for this poster

PostPosted: Mon Mar 24, 2008 10:04 pm    Post subject: Reply with quote


I...Love...You
I've been trying to get a logout button to work on my website for ages as i couldnt get it to put &SID into the URL.
again...I LOVE YOU Embarassed
_________________
This sig sucks, i threw it together in 10 mins on photoshop.

"Tea tastes like ass juice, I know this because I've tasted tea."
Back to top
View user's profile Send private message Visit poster's website
Neggi
baby piggy
baby piggy


Joined: 08 Mar 2008
Posts: 4
Location: (UK)


Add reputation for this poster

PostPosted: Sun Mar 30, 2008 7:34 am    Post subject: Reply with quote


heheh, you're very welcome! Very Happy
Glad I could help someone out!
Back to top
View user's profile Send private message Visit users myspace pageVisit poster's website
pig2cat
The king
The king


Joined: 01 Jan 1970
Posts: 4201


Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1
Add reputation for this poster

PostPosted: Tue Jul 15, 2008 6:40 pm    Post subject: Reply with quote


j0rdan01 wrote:
I knew that, and I hate and will NOT learn PHP for the obvious reasons or it's poor, a failed attempt at a language, used my millions and overrated and easy.

Anyway, lessons learnt for at least 1 person, congratulations.

Hmm I Prefer php over other languages since it's simple and really easy to use html with :O (and its the only language I know quite well ^^)
_________________

Piggymoo redesign:
Scripting forum: 1st section done, second put on hold
GFX: 1st section 50%, second put on hold
scripting frontpage: 70% done
make update cms: 30% done
Back to top
View user's profile Send private message
ezxen
God
God


Joined: 09 Mar 2007
Posts: 2426
Location: Ascended plain

Reputation: 96.4Reputation: 96.4Reputation: 96.4Reputation: 96.4Reputation: 96.4
Add reputation for this poster

PostPosted: Thu Jul 17, 2008 4:27 am    Post subject: Reply with quote


I got a question . say i was building a forum form scratch and wanted to get a quote system going . COuld someone show me how that would look .

Like When the quote button is clicked it copy's the text from the post
_________________
Ask not what Piggymoo can do for you but what you can do for Piggymoo
I am the Alpha and the Omega
Back to top
View user's profile Send private message Send e-mail Visit users myspace pageVisit poster's website AIM Address Yahoo Messenger MSN Messenger
pig2cat
The king
The king


Joined: 01 Jan 1970
Posts: 4201


Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1Reputation: 589.1
Add reputation for this poster

PostPosted: Thu Jul 17, 2008 10:23 am    Post subject: Reply with quote


ezxen wrote:
I got a question . say i was building a forum form scratch and wanted to get a quote system going . COuld someone show me how that would look .

Like When the quote button is clicked it copy's the text from the post

if you want it to be copied onto a reply page(like here on this forum), it's really easy
to just make a link to quote, with the post ID in it(posting.php?mode=quote&p=68138)
get in your posting file the parameters from the url(with $_HTTP_VARS or $_GET)
run an sql query which gets the data from the text section of the post($sql = "select `text`, `poster` from `database` WHERE `ID` = '$pnumber' limit 1";
$result = mysql_query($sql);
$lala = mysql_fetch_array($result);
$text = $lala['text'];
$poster = $lala['poster'];
)
pretty much that actually
then just return it in the textform
<forn>
<textarea name=bla>
[quote= <? print $poster; ?>]
<? print $text; ?>
[/ quote]
</textarea>
_________________

Piggymoo redesign:
Scripting forum: 1st section done, second put on hold
GFX: 1st section 50%, second put on hold
scripting frontpage: 70% done
make update cms: 30% done
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Piggymoo.com Forum Index -> webdesign All times are GMT + 1 Hour
Page 1 of 1

 
ZOMG Topsites - Anime and More Anime Rankings Topsite - Best Anime Sites AnimeA
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2008 phpBB Group
Flower Power phpBB theme by Flowers Online. modified by piggymoo
DMCA, C&D, Legal, privacy