FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Create a Script for me for 60+ FRIH$

 


assex
Help me here please!!!!
I need a script in PHP that displays different content on a Web Page if a variable is 1-30. Suppose the variable is 'x', if I type in the name of the page as a link like this: page.php?x=3, it should display what I want when 'x' equals three. The same way, it should display different content when I enter 'page.php?x=19'.
This should be done in such a way that I can edit the content to be displayed whenever I want. Please help me. I'm giving 60 FRIH$ or more as an award. If you're interested, PM me or post a new thread here.....

NOTE: I want a sample web page that works.
n0obie4life
Code:
<?php

$page = intval($_GET['page']);

echo "You are on page $page";
echo "<br />";
for ( $x=0; $x < 30; $x++ )
{
echo "Page " . $x . " - <a href=\"page.php?page=" . $x . "\">Click here to view</a>";
echo " <br /> ";
}
echo " <br /> ";

if ($page == 1)
{
content
}
elseif ( $page == 2 )
{
conent
}
...etc.

?>


Yes, not really good, but that's the grasp..
assex
Hey 0obe: It doesn't work! Sorry....you're not getting the FRIH$ Didn't you read the above line:
Quote:

NOTE: I want a sample web page that works.
n0obie4life
http://bondings-world.frihost.net/page.php

(currently only page 1 and 2 work).
assex
Alright 0obie, you got it! Now show me the source code.....
SORRY to disappoint you but I was browsing yesterday and I found this Site full of tutorials:
http://www.phpbuilder.com
There I found out what I wanted.....so TOO BAD!!!!!!
But, as a prize to show my gratitude I'll just give 30 FRIH$ to you for at least attempting this.....
Notify me if you want more or lock this topic if it's fine for you!!!!!
n0obie4life
No problem doh, I spent less than 5 minutes Razz.

I'm closing this. Good luck with your website doh Smile.

-close-
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Miscellaneous -> Marketplace

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.