Log in

View Full Version : I Need help so bad.. :(



Total_me
07-18-2009, 04:27 AM
Hello,
I want to ask how to do in same file index.php links?
I think I know how to do but i don't know why this code don't working:

<?php
if (isset($about)) {
echo "about me: I'm a student...";
}
elseif (isset($contact)) {
echo "contact me8654894654";
}
else {
echo "Hello Every1!";
}
?>
Can any one help for me? :(
Thanks

traq
07-18-2009, 04:32 AM
umm... What is it supposed to do?

Total_me
07-18-2009, 04:36 AM
umm... What is it supposed to do?
I think it should show different informacion in same page :(
like .php?about (should show about me: I'm a student...) and .php?contact ( should display: contact me8654894654 )
you know what i mean? :S I don't know how to explain :( It should be a lot informacion in same page but differents .php?link :)

X96 Web Design
07-18-2009, 05:04 PM
I think this is what you want:


<?php
if(isset($_GET['about'])){ //If index.php?about:
echo 'About Me....';
}
elseif(isset($_GET['contact'])){ //If index.php?contact:
echo 'Contact Me';
}
?>

And so on...

Hope this helps,
X96

Total_me
07-19-2009, 12:24 PM
thanks