Jump to content
xisto Community
Sign in to follow this  
farsiscript

Php Variables And Url Forwarding Tutorial - PHP/URL forwarding

Recommended Posts

hi all

this tutorial is about php get variable and url forwarding

you can move variable in url with php with out html form

 

make one page with this code :

 

<?php$what = $_GET['what'];$Xisto = $_POST['Xisto'];echo "Your name is : " . "$what" . "and Your Trap username is : " . "$Xisto";?>
save this file with name "name.php" then upload name.php at your hosting ,

then turn your browser at this url :

http://forums.xisto.com/no_longer_exists/

when page is displayed it show this text :

 

 

Your name is : farsi and Your Trap username is : farsiscript

 

With $_GET tag in php you can take variable form url

when you write search engine for your site this script can help you to get variable form url

for example do you see music web site ?

 

music website has this part :

A B C D E F G H I ................................................. Z

if you click at one of alphabet it show you albums with alphabet name

you can Get variable form url

 

for example for musc web site name.php :

<?php$alfa = $_GET['alfa'];echo "$alfa";?>
then You must link A at your page to name.php with this action

 

<a href="name.php?alfa=A">A</a>

 

when visitors click at A in page name.php write A at page

you can make Mysql Search engine

 

I hope This tutorial Help you to get variable form url

Share this post


Link to post
Share on other sites

hey you seem to know alot about php coding, how long did it take for you to learn as much as you do now? did you just learn it by yourself or did you take a class?? because i myself would like to know how to set up phpscripts myself becuase i dont really understand much at all. i can only edit stuff i can understand abit.

Share this post


Link to post
Share on other sites

thanks dear BOAWso sorry iam late in posting because i had travelI learing php with looking at script code and tutorials i learn many thinks in Xisto forums . its really good programming forums .thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.