Webmaster Discussion Forum -  Revenue Sharing Forum  webmaster talk related topic
3000+ Free Tutorials, Read and learn from Picture and text
FREE Tutorials on Flash, Photoshop, PHP, 3DS, MySql and more.
Add your tutorials and get more traffic !

» Free SEO Tools
» Check Page Rank
» Check Page Rank multi datacenter
» Check Fake Page Rank
» Alexa Traffic Rank
» Bulk Page rank Check
» Link Popularity
» Check domain Instantly
» Short url
» MD5 Encrypt
» Meta Tags Extractor
» Surf using Proxy
» Keyword Density Analyzer
» Keyword Analyzer
» Welcome to WMH
Registration at WebmastersHome is completely FREE and takes only a few seconds. By registering you'll gain:
  • Full Posting Privileges.
  • Access to Private Messaging.
Register now
Partner

Text Link Ads
Web Hosting
Flash Tutorials
PHP Scripts
Web Hosting providers
Offshore Software Outsourcing
Web Directory
Software Directory
Your Text Link
Earn More
Simply Add a Post and view ad network advertisement on this post.


Go Back   Webmaster Discussion Forum - Revenue Sharing Forum webmaster talk related topic > Design and Programming Talk > General Web Design


php pages?

General Web Design


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-05-2005, 10:32 AM
eyece eyece is offline
Junior Member
 
Join Date: Jul 2005
Posts: 13
eyece is on a distinguished road
iTrader: (0)
Default php pages?

how do they work? i have finished reading the php guide at w3schools
but they didnt explane how this stuff works... take this page url for example
Code:
http://www.webmastershome.com/newthread.php?do=newthread&f=10
i want to know how to use things like ?thing=otherthing
i always thort that they were variables and and there velues, and i still think they are
but how the heck to they work? what code do i put in my .php file to be able to get velues from the url?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Revenue Sharing Ads ( Read More ):

  #2 (permalink)  
Old 08-06-2005, 10:59 PM
gchick gchick is offline
Junior Member
 
Join Date: Jul 2005
Posts: 13
gchick is on a distinguished road
iTrader: (0)
Default

yes..i want to learn that too...anyone that can help...pleasee?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-07-2005, 04:57 AM
eyece eyece is offline
Junior Member
 
Join Date: Jul 2005
Posts: 13
eyece is on a distinguished road
iTrader: (0)
Default

i have found out how to do it.......... so here is a little tut.......

================================================== ===========
================================================== ===========



<?php
function GetQuery($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType)
{
case "text":
$theValue = ($theValue != "") ? $theValue : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
switch (GetQuery($_GET['ver_name'], "text"))
{
case "NULL":
include("error.php");
break;
case "velue":
include("/contenturl.php");
break;
default:
include("error.php");
break;
}
?>


================================================== ===========
================================================== ===========

ver_name: the id you want for the hook, so if it was "lollys" then the hook would look like this...
pagename.php?lollys=bleh

error.php: is the page that is dissplayed if theres a problem, like if somone entered a wrong velue, one that was not hooked.

velue: is the end peace, eg: pagename.php?ver_name=velue
so you can have diffrent pages for diffrent velues,

/contenturl.php: is the location of the content file of the page, this file will have all of the page content in it, so after the script reads whats in the url bar it will know where the content its ment to dissplay is.

to add more pages or more options, just copy and paste
case "velue":
include("/contenturl.php");
break;
under its self, change the velues, you can copy them as many times as you want, here is a full finshed version:
Code:
<?php function GetQuery($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? $theValue : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } switch (GetQuery($_GET['pagenumber'], "text")) { case "NULL": include("error.php"); break; case "1": include("directory/page1.php"); break; case "2": include("directory/page2.php"); break; case "3": include("directory/page3.php"); break; case "hiddenpage": include("directory/so_top_secret.php"); break; default: include("error.php"); break; } ?>
if anyone needs anyhelp understanding this, email me, or add my msn
killjoy.j@ihug.co.nz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-24-2005, 09:55 AM
ethic ethic is offline
Moderator
 
Join Date: May 2005
Posts: 139
ethic is on a distinguished road
iTrader: (0)
Default

it's realy a good code, you can also search in search engine forum to get more about it

Regards
Ethic
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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


All times are GMT. The time now is 12:18 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0