vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using $_GET (https://vborg.vbsupport.ru/showthread.php?t=138601)

KingPuyol 02-06-2007 11:52 AM

Using $_GET
 
I want to know how to make those PHP links like:

index.php?page=hello

index.php?page=player&id=747
etc..

Someone please tell me how, and if there is another way other than $_GET, then please tell me.
I'm not a beginner, but teach me as a beginner please.

AN-net 02-06-2007 03:43 PM

do you want to know how read it into the php file or how to make a link to a php file?

also you made a contradiction, you are beginner or you aren't. you can't be both, sry:(

harmor19 02-06-2007 03:54 PM

I wrote this I hope it helps.

KingPuyol 02-07-2007 06:04 AM

Quote:

Originally Posted by AN-net (Post 1176056)
also you made a contradiction, you are beginner or you aren't. you can't be both, sry:(

What I meant is I know how to do it but I make mistakes most of the time, so I said it's better teaching the easy way.

Quote:

Originally Posted by harmor19 (Post 1176063)
I wrote this I hope it helps.

Thanks but can you also tell me how can I do the sub sub pages, like index.php?act=mods&do=download&modid=45

You got it, OK now teach me the HARD WAY!

And can you also tell me how can I use the CASE and ARRAY

Marco van Herwaarden 02-07-2007 04:11 PM

Quote:

Originally Posted by KingPuyol (Post 1176591)
And can you also tell me how can I use the CASE and ARRAY

See http://nl2.php.net/manual/en/control...res.switch.php and http://nl2.php.net/manual/en/ref.array.php

KingPuyol 02-07-2007 05:32 PM

Thanks Marco, but can anyone also tell me how can I do the sub sub pages, like index.php?act=mods&do=download&modid=45
__________________
One extra thing, what is "global $anything, $anothervar"
I read about it and it's:
An associative array containing references to all variables which are currently defined in the global scope of the script. The variable names are the keys of the array.
So I wanted to know what's the use of it?

Marco van Herwaarden 02-07-2007 05:47 PM

Just create if branches in your script:

KingPuyol 02-07-2007 08:15 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1176934)
Just create if branches in your script:

I didn't understand what you meant!

AN-net 02-08-2007 01:37 AM

if($_REQUEST['modid'] == 46)
{
do something;
}
if($_REQUEST['page'] == "home)
{
do something else;
}

please though run your data through the vbulletin GPC if your using vbulletin or sanatize incoming data.

harmor19 02-08-2007 02:48 AM

PHP Code:

if($_GET['act'] == "mods")
{
   echo 
"List mods";

   if(
$_GET['do'] == "download")
   {
       echo 
"download mod ID: ".$_GET['modid'];
   }




All times are GMT. The time now is 11:58 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01378 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete