Including BBCode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Yeha that variable fine... i knew about that since when you first posted about it... its the next bit i dont understand about.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

well instead of sitting there and wondering what the function does, do some homework for yourself and save yourself from asking questions n prevent people saying its simple.. Noone expects a newbie php programmers to understand it all, however, EVERYONE expects the newbie to WANT and WISH to learn.

php.net is a php bible for php programmers... check it out, love it, marry it.

especially this link and I think you will understand it all:
http://www.php.net/manual/en/function.isset.php
isset -- Determine whether a variable is set
good luck
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

ook
try this simple example:

Code: Select all

<?
if (!isset($_POST['submit'])) {
    //show form
    echo "<form action="me.php" method="post" name="comment">";
    echo "<input type="text" name="Message">";
    echo "<input type="submit"\ name="submit" value="Submit">";
    echo "</form>"l
}else{
    include("include\bbcode.php");
    $message = $_POST['message'];
    $message = bbcode($message);
    echo $message;
}
?>
something along those lines
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Who is foo and bool... too f00king complicated.. that page dont do anything for me.. this i dont understand either

Code: Select all

bool isset ( mixed var &#1111;, mixed var &#1111;, ...]])
^Whats that supposed to mean? Couldnt someone like put me out of my misery and like *cough*hint*cough* where in my code it goes, cuz its 2:20am and im getting stressed :\
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

it means that isset returns a boolean value, true or false, and it has to have atleast one variable. The [ ] mean taht the rest are optional, but can be included to check also
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

@tim:
since the recent outbreak of people calling me rude lately i decided to help him out a tad bit more than i would have before! lol
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

I feel liek retarded because i dont even know what boolean means... i've been in this forum for like 2 years now and i still dont know what boolean is.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

Illusionist wrote:@tim:
since the recent outbreak of people calling me rude lately i decided to help him out a tad bit more than i would have before! lol
lol your probably helping him more than I was.. so I leave the ball in your court.. By the way, your not rude (even though u bashed me before) haha just joking partner... good luck

:D
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

**MAY OFFEND THOSE WHO HATE A RUDE AWAKENING**

@tim: lol, ya sorry about that, i tend to get carried away sometime, see below! lol

@Dale: And from the looks of your other post your interested in program, a little atleast, but you seem to know very little about programming at all! beging to think your the kind of person i hate to help, someone who just uses other people's code and calls it their own, and doesn't take time to learn things. I mean you have 200 something posts, been here for 2 years, and you don't know wtf your doing. How is that possible? 2 year n00b? no way... you would have atleast had to have learned something... If you are the kind of person that just steals code and doesn't learn the language, then please don't ask for help until your ready to learn and find soem stuff your own! But if your not, then proove me wrong!
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

I've had a pretty heckic 2003rd year being made homeless and put in a safe house and then put under police protection. Then we finally gets a house after like 13 months being in a safe house, and the only time i could get on the net was at my Dad's who frankly doesnt give a <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> about me or my sister. I've barely turned 16 and i've dropped out of school because i get bullied too much and i cant stand it. So its been pretty hecktic so i havent really had much time for talking or learning about programming languages!
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

well, don't u think now would be a good time to start? you've got some tiem on your hands... read over some tutorials, try a few things it suggests... YOu may learn something!

Hope all the best!
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

Ok people, he asked wat a boolean is answer him! lol, A boolean is:

Example: True
Description: One of a special values true or false

Hope that helps!
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

Note: Ok people, he asked wat a boolean is answer him!
I was rude! Start a post talk all about me! While you are yelling at me Im getting more populer :lol: and Me posting back will just boost up my post #!
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Illusionist wrote:it means that isset returns a boolean value, true or false
:-D i stated that already Viper! Nice try though! But yeah, lets get back on topic, so Dale, check that code out the sample code i posted, and see if that gives you a better idea of using isset()... Then try and put somethign together and if you still have problems, ask again!
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

Code: Select all

<?php
if( $name == "The Hidden Viper" ) { 
$<span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> ==  "true";
} elseif {
echo "there is no else if, if the name fits the shoe";
}
?>

hahaha Sorry man I couldnt resist.. I am joking with you
Post Reply