Page 1 of 1

plz help me in making of a script

Posted: Tue Mar 23, 2010 4:36 pm
by sehrawat350
hello brothers

i have to make a new php script to grab the last number of a url

for example

Code: Select all

http://www.example.com/index.php?id=34
so this script grab the 34 number

i want to make this script but i dont have much knowledge of php

plz tell me how to start writng this script

thanks

Re: plz help me in making of a script

Posted: Tue Mar 23, 2010 6:51 pm
by Sofw_Arch_Dev

Code: Select all

 
<?php
 
$foo = null;
if( isset( $_REQUEST[ "id" ] ) ) {
    $foo = $_REQUEST[ "id" ];
}
 
?>
 
A book on PHP Web Development will be money well spent.

Re: plz help me in making of a script

Posted: Mon Apr 05, 2010 6:42 am
by siji86
Hi,

You can use the following $_GET['id'] in your php script inorder to get the value of id in the $_GET variable.

:D

Re: plz help me in making of a script

Posted: Mon Apr 05, 2010 8:07 am
by learnerabn
Tell me what type of website do you want to develop?