Wow Web Designs Forums Home

Search
   
Members

Calendar

Help

Home
Search by username
Not logged in - Login | Register 


help $_GET
 Moderated by: Aycan  

New Topic

Reply

Print
AuthorPost
reggiex
Member
 

Joined: Mon Oct 3rd, 2005
Location:  
Posts: 124
Status:  Offline
Mana: 
 Posted: Sat Jan 13th, 2007 07:16 am

Quote

Reply
hi , i need help on returning the value from the URL. example: http://localhost/page.php?12445

12445 - is the value i wanna get.
how will i return to that value..

i used to do this. i will place a variable  in the URL.like.
http://localhost/page.php?variable=12445

then ill return to that value using  $_GET['variable'] which is 12445

what i want now is i don't want to put "variable" in the url just "12445" like http://localhost/page.php?12445

how will i get that value? can it still be done with this $_GET[]?

Thanks..



GemX
Member
 

Joined: Fri May 25th, 2007
Location:  
Posts: 9
Status:  Offline
Mana: 
 Posted: Fri May 25th, 2007 08:41 pm

Quote

Reply
You can do it with .htaccess
Go and check google for htaccess tutorials. You will find mod rewrite.
At your Apache server you need to have mod rewrite turned on to work properly.

pixle_dude
Member


Joined: Wed Jun 14th, 2006
Location: Sydeny, Australia
Posts: 152
Status:  Offline
Mana: 
 Posted: Sun Sep 9th, 2007 04:29 am

Quote

Reply
Ok, try this:
<?
$variable = $_GET['variable'];

if $variable == "";
## Action here for nothing.
Else
if $variable == "12445";
# Do Actions (EG: include "12445page.php"

Else
if $variable == "other_vatiable";

# Do A Diffrent Action (EG: include "12445page.php" ?>


Also, If you want it so its just http://www.example.com/page.php?=12445

Something like...

<?
$variable = $_GET['?'];

if $variable == "";
## Action here for nothing.
Else
if $variable == "12445";
# Do Actions (EG: include "12445page.php"

Else
if $variable == "other_vatiable";

# Do A Diffrent Action (EG: include "12445page.php"
?>

I dont know if that one works.. may need a double ??


 Current time is 07:46 pm




Powered by WowBB 1.7 - Copyright © 2003-2006 Aycan Gulez
Page processed in 0.1394 seconds (10% database + 90% PHP). 16 queries executed.